waveshaper
NODEMemoryless saturation. Rounds the peaks and adds harmonics, at a loudness that does not move with drive.
Parameters
{
"drive_db": 12,
"shape": "tanh",
"type": "waveshaper"
}How it is computed
y = shape(d · x) · c(d) d = 10^(drive_db / 20)
tanh y = tanh(u) symmetric, odd harmonics only
asymmetric u ≥ 0 → tanh(u) even and odd, and a DC component
u < 0 → ½ · tanh(2u)
c(d) is the value that makes a sine at the reference level come out at the
reference RMS. It is a function of drive alone, computed ahead of time.- The asymmetric shape is continuous at the origin and has unit slope on both sides, so small signals pass through as they are and the asymmetry only appears as the signal grows.
- The compensation is matched with a sine. Real music has a higher crest factor, so the match is close rather than exact.
- Drive is one of the three values that can be moved while the music plays.
Using it
The asymmetric shape needs a DC blocker after it.
It creates a DC component by construction, and the simulation refuses a chain that leaves it in. Put a dc_blocker downstream, not upstream.
It is nonlinear, so the chain gains a limiter.
A chain containing this node is simulated before it can be heard, arms the output limiter for the session, and is soft started.
Odd and even are audibly different.
Symmetric saturation produces odd harmonics, which is the push-pull character. The asymmetric shape adds even orders, the second in particular, which is the sweetness associated with single-ended circuits.