Build with this node

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

Ask Studio

@maruaudio/dsp/modulation/vibrato is a fully wet, sine-swept fractional delay of centre × (1 + depth × sin(2π·phase)) samples, read with the linear interpolation of @maru/delays-fractional. The tick writes the input before reading, the conventional DelayNode order, so depth 1 may reach zero delay and a zero-delay read returns the current sample. With the centre bound to 2.5 ms, this is the public web module's Web Audio graph.

Parameters

SetterRange the setter enforcesDefault
setVibratoRate0.1 to 20 Hz5 Hz
setVibratoDepth0 to 10.5
setVibratoDelay1 to 20 ms centre delay6 ms
setVibratoPhaseOffset−180 to 180 degrees, NaN → 0, stored as 0 to 1 cycles0°

A phase-offset change moves the running phase by the difference from the previous offset; repeating the same offset changes nothing.

Lifecycle

initVibratoNode allocates the delay ring (50 ms plus two frames at the init rate) → prepareVibratoNodeSampleRate re-derives the delay inside that capacity, clearing history when the active length changes → setters → vibratoNodeTick → resetVibratoNode, which clears the line and returns the phase to the offset. For live replacement, clearVibratoNodeStep(state, cursor, budget) clears in bounded steps until it returns the line length, then finalizeVibratoNodeClear. Ticks allocate nothing and do no I/O.

When to use it

Periodic pitch modulation of a voice, guitar or keys with no dry signal; any dry blend happens outside. Two states with opposed phase offsets give a phase-locked stereo pair.

Limits

  • Mono sample tick, fully wet.
  • The delay line stores the input clamped to ±1 at f32.
  • The swept delay is clamped to the ring length minus two frames.
  • The phase accumulator is f32; parameter changes apply at once.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Rate ratefloatsetVibratoRate
Depth depthfloatsetVibratoDepth
Degrees degrees

Set a static phase offset for a stereo pair without restarting an unchanged running LFO. The offset is applied relative to the previously configured offset, so a real control edit moves the current phase by exactly the requested difference. Reset and staged retirement restart at this offset.

floatsetVibratoPhaseOffset
Delay milliseconds delayMillisecondsfloatsetVibratoDelay

Ports

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

One sample per vibratoNodeTick call.

Dependencies

Dependents

Used by