Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@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.001

toneDistortionShape(x, amount) is the transfer; distortionNodeTick applies it with the stored drive.

Parameters

SetterRange the setter enforcesDefault
setDistortionNodeDrive0 to 10.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 WaveShaper table with 2× or 4× oversampling.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Drive drivefloatsetDistortionNodeDrive

Ports

  • In ininput · audio · mono
  • Out outoutput · audio · mono

One sample per distortionNodeTick call.

Dependencies

None: this node imports no other node.

Dependents

Used by