Build with this node

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

Ask Studio

@maruaudio/dsp/modulation/chorus is a mono chorus: a sine-modulated fractional delay over @maru/delays-fractional, with optional regeneration and a dry/wet mix.

d = clamp(centre × (1 + depth × sin(2π·phase)), 1, ringLength − 2)
wet = read(d); write(x + wet × feedback)
y = fround(x × (1 − mix) + wet × mix)

The tick reads before it writes, so the delay is at least one sample.

Parameters

SetterRange the setter enforcesDefault
setChorusRate0.01 to 20 Hz1.5 Hz
setChorusDepth0 to 10.7
setChorusDelay1 to 20 ms centre delay3.5 ms
setChorusFeedback0 to 0.90
setChorusMix0 to 10.5
setChorusPhaseOffset−180 to 180 degrees, stored as 0 to 1 cycles; also sets the phase0°

Lifecycle

initChorusNode allocates the delay ring once (50 ms plus two frames at the init rate) → prepareChorusNodeSampleRate → setters → chorusNodeTick → resetChorusNode, which clears the line and returns the phase to the offset while keeping parameters. Prepare re-derives the delay inside the allocated capacity and clears the history when the active length changes. clearChorusNodeStep and finalizeChorusNodeClear clear the line in bounded steps for live replacement. Ticks allocate nothing and do no I/O.

When to use it

Thickening a guitar, synth pad or voice. Several mono states with static phase offsets form a phase-locked stereo field; feedback feeds the delayed signal back into the line.

Limits

  • Mono sample tick; one state per channel.
  • The line stores x + wet × feedback clamped to ±1 at f32.
  • Positive feedback only.
  • Parameter changes apply at once; a phase-offset change jumps the phase.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Rate ratefloatsetChorusRate
Depth depthfloatsetChorusDepth
Delay milliseconds delayMillisecondsfloatsetChorusDelay
Feedback feedbackfloatsetChorusFeedback
Mix mixfloatsetChorusMix
Degrees degrees

Static LFO rotation used when several mono lines form a phase-locked stereo field. Degrees keep authored graph metadata independent of radians.

floatsetChorusPhaseOffset

Ports

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

One sample per chorusNodeTick call.

Dependencies

Dependents

Used by