Build with this node

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

Ask Studio

@maruaudio/dsp/distortion/taper is a stereo tape processor: a companding encode, a flutter fractional delay, a golden-ratio bias slew, a mid/sub split with a sine-shaped low band, two head-bump band-pass resonators, the matching decode and a soft clip. Coefficients scale by sampleRate / 44100; fixed PRNG seeds make renders repeatable, and dither is left to the engine.

Parameters

cookTaperNodeInto(state, target, input, tilt, shape, flutter, flutterSpeed, bias, headBump, headFrequency, output) clamps nine controls to 0 to 1 into a TaperCooked record and writes the bias slew and head-bump filters to state.

ControlCooked as
inputGain (2 × input)²
tiltEncode amount 2 × tilt; decode max(−1, −2 × (1 − tilt))
shapeEncode, decode and mid split frequencies
flutter, flutterSpeedDepth flutter⁶ × 50 × scale (at most 498 samples); rate 0.02 × speed³ / scale
biasSigned 2 × bias − 1: under-bias below 0.5, over-bias slew above
headBump, headFrequencyBump drive and mix; resonators at 25 + 175 × f² Hz and 0.9375 × that
outputGain 2 × output

Lifecycle

initTaperNode(rate) allocates the 1002-sample delays, slew table and clip history → prepareTaperNodeSampleRate re-stamps the rate and clears history, so recook afterwards → cook → taperNodeTick(state, left, right, cooked) → taperNodeOutputLeft and taperNodeOutputRight → resetTaperNode outside realtime. clearTaperNodeStep (≤ 256 stores, done at taperClearStoreCount) and finalizeTaperNodeClear clear it live, keeping the head coefficients.

When to use it

Tape-style saturation, flutter and head bump on a stereo bus, drums or a mix.

Limits

  • Stereo in and out; the output lags the input by one sample (clip stage).
  • cookTaperNode allocates a record; use cookTaperNodeInto in realtime code. The clamps are the kernel node's conditional clamp.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

No other node imports this one.

Used by