Build with this node

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

Ask Studio

@maruaudio/dsp/modulation/warble is a CHOMPI TAPE firmware port of tape-style wow made from a randomly retargeted delay time. On each frame a seeded LCG, (1103515245 r + 12345) mod 2^31, fires an event with probability WARBLE_EVENT_SCALE × rate; an event picks a target delay of 100 to 980 samples and a glide coefficient up to 0.0001. A one-pole (@maru/modulation-f32-slew) glides the shared read time of two 1024-frame linearly interpolated lines toward the target, and a smoothed mix gives out = mix × (delayed − x) + x, every operation rounded to f32.

Parameters

setWarbleFrequency(state, value) sets the mix target to value and the event rate to 30 × value + 0.1, unclamped; both start at 0. Call it with 0.1 for the firmware's starting control. initWarbleNode(sampleRate, seed = 1) takes the LCG seed, masked to 31 bits; the firmware's is 1.

Lifecycle

initWarbleNode allocates the two lines → setWarbleFrequency → warbleNodeTick(state, left, right), reading outLeft and outRight → resetWarbleNode, upstream Init: it clears both lines, rewinds the write pointer, sets delay 10 and zeroes the control and mix, but keeps the glide state and the LCG, as the firmware does. Ticks allocate nothing.

When to use it

Reproducing the CHOMPI TAPE warble exactly, or adding slow random pitch drift to a stereo signal.

Limits

  • Stereo in and out, one frame per tick. Timing is the 48 kHz hardware's: the event scale (about 1/48013) and delay times are in samples, and the sample rate is recorded but does not rescale.
  • Until the first event the read sits at delay 0, the oldest slot, 1024 frames back, because the glide state starts at zero.
  • Frequency 0 passes the input through exactly. Output is bit-exact against the firmware compiled without FMA contraction.
  • The LCG is per instance; upstream shares one function-static LCG.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Value value

Upstream `SetFreq`: mix target `value`, event rate `30 value + 0.1`.

floatsetWarbleFrequency

Dependencies

Dependents

No other node imports this one.

Used by