@maruaudio/dsp/distortion/tone-shape is the chain's distortion stage as a reusable DSP node: the Tone 15.1 Distortion curve evaluated directly as a stateless rational transfer.
k = drive × 100
y = fround((3 + k) · x · 20° / (π + k·|x|)) // 20° = 20π/180
y = 0 when |x| < 0.001toneDistortionShape(x, amount) is the transfer; distortionNodeTick applies it with the stored drive.
Parameters
| Setter | Range the setter enforces | Default |
|---|---|---|
setDistortionNodeDrive | 0 to 1 | 0.15 |
The sample rate passed to initDistortionNode is stored and not read.
Lifecycle
initDistortionNode → setDistortionNodeDrive → distortionNodeTick. There is no reset; the state holds only the drive. Ticks allocate nothing and do no I/O.
When to use it
A soft, level-dependent saturation stage in a chain that must match the chain bit for bit, or wherever a single-parameter drive curve is enough.
Limits
- Mono sample tick, no oversampling.
- Inputs below 0.001 in magnitude give exactly 0: a hard silence gate.
- At drive 0 the transfer is linear with slope (3 · 20°)/π = 1/3.
- The curve is evaluated directly, not through a 4096-point
WaveShapertable with 2× or 4× oversampling.