Contents

Modulation Effects

Modulation effects use time-varying delays to add movement and spatial width to sounds.

All effects in this file expose dry and wet as their last two parameters (Category A defaults dry=1, wet=0.5 for additive effects). See Effect Parameters Convention for the full spec.

chorus

Chorus - Creates copies with slight pitch/time variations.

ParamTypeDefaultDescription
insignal-Input signal
ratenumber0.5LFO rate in Hz
depthnumber0.5Modulation depth (0-1)
base_delaynumber20.0Base chorus delay (ms)
depth_rangenumber10.0Modulation depth range (ms)
lfo_phasenumber0.25R-channel LFO offset, in turns (0.0–1.0). 0 = mono-equivalent; 0.25 = 90° (default stereo widening); 0.5 = anti-phase.
drynumber1.0Dry signal level (Category A)
wetnumber0.5Wet (processed) signal level (Category A)

Mixes the input with delayed copies that are slightly pitch-shifted by an LFO, producing a thicker, wider sound.

The base_delay parameter sets the center delay time, while depth_range controls how far the modulation sweeps from the base. Larger values produce more pronounced detuning.

Chorus is stereo-native: mono input widens to a true stereo image with the right channel reading the LFO at the lfo_phase offset; stereo input gets independent per-channel processing.

// Classic chorus
saw(220) |> chorus(@, 0.5, 0.5) |> out(@)
// Slow deep chorus
tri(110) |> chorus(@, 0.2, 0.8) |> out(@)
// Fast shimmer
sine(440) |> chorus(@, 2, 0.3) |> out(@)
// Wide chorus with longer delay
saw(220) |> chorus(@, 0.3, 0.6, 30, 15) |> out(@)
// Anti-phase R LFO for maximum stereo width
saw(220) |> chorus(@, 0.5, 0.6, lfo_phase: 0.5) |> out(@)
// lfo_phase: 0 = mono-equivalent (L=R)
saw(220) |> chorus(@, 0.5, 0.6, lfo_phase: 0) |> out(@)

Related: flanger, phaser


flanger

Flanger - Comb filtering with swept delay time.

ParamTypeDefaultDescription
insignal-Input signal
ratenumber1.0LFO rate in Hz
depthnumber0.7Modulation depth (0-1)
min_delaynumber0.1Minimum sweep delay (ms)
max_delaynumber10.0Maximum sweep delay (ms)
feedbacknumber-0.99Delay-line feedback (-0.99 to 0.99) — sharpens resonance
lfo_phasenumber0.25R-channel LFO offset, in turns (0.0–1.0). 0 = mono-equivalent; 0.25 = 90° (default); 0.5 = anti-phase.
drynumber1.0Dry signal level (Category A)
wetnumber0.5Wet (processed) signal level (Category A)

Similar to chorus but with shorter delay times and feedback, creating the characteristic “jet plane” sweep effect. Flanger is stereo-native: mono input widens via the lfo_phase offset on the right channel.

feedback is a named argument: higher magnitudes (toward ±0.99) sharpen and intensify the comb resonances for a more pronounced effect.

The min_delay and max_delay parameters define the sweep range. Shorter delays create more metallic tones, longer delays sound more like chorus.

// Classic flanger
saw(110) |> flanger(@, 0.5, 0.7) |> out(@)
// Slow metallic sweep
sqr(220) |> flanger(@, 0.1, 0.9) |> out(@)
// Fast subtle movement
tri(440) |> flanger(@, 3, 0.3) |> out(@)
// Tight metallic flanger
saw(110) |> flanger(@, 0.5, 0.8, 0.05, 2.0) |> out(@)
// Resonant flanger with strong feedback
saw(110) |> flanger(@, 0.3, 0.8, feedback: 0.85) |> out(@)

Related: chorus, phaser, comb


phaser

Phaser - Creates notches in frequency spectrum via allpass filters.

ParamTypeDefaultDescription
insignal-Input signal
ratenumber0.5LFO rate in Hz
depthnumber0.8Modulation depth (0-1)
min_freqnumber200.0Sweep range low (Hz)
max_freqnumber4000.0Sweep range high (Hz)
feedbacknumber0.5Feedback amount (0–0.99). Higher = sharper resonance.
stagesnumber4Number of allpass stages (2–12). Each pair of stages = one notch.
lfo_phasenumber0.25R-channel LFO offset, in turns (0.0–1.0). 0 = mono-equivalent; 0.25 = 90° (default stereo notch sweep); 0.5 = anti-phase.
drynumber1.0Dry signal level (Category A)
wetnumber0.5Wet (processed) signal level (Category A)

Sweeps a chain of allpass-derived notches through the spectrum, producing a swirling effect distinct from chorus or flanger.

More stages give more notches; higher feedback sharpens the resonance. Both parameters are full runtime params — you can wire a signal to either one.

The phaser output is the canonical Bode/MXR sum (dry + allpass cascade), so expect up to +6 dB peak gain at constructive interference points.

// Classic phaser
saw(110) |> phaser(@, 0.3, 0.8) |> out(@)
// Fast space phaser
sqr(220) |> phaser(@, 2, 0.5) |> out(@)
// Slow deep sweep
noise() |> lp(@, 2000) |> phaser(@, 0.1, 0.9) |> out(@)
// Extended high-frequency sweep
saw(110) |> phaser(@, 0.2, 0.8, 100, 8000) |> out(@)
// Deep, resonant 6-stage phaser with strong feedback
saw(110)
    |> phaser(@, 0.5, 0.9, 100, 5000, feedback: 0.7, stages: 6)
    |> out(@)
// Wide stereo phaser — anti-phase R LFO
saw(110) |> phaser(@, 0.3, 0.8, lfo_phase: 0.5) |> out(@)

Related: flanger, chorus


comb

Comb Filter - Fixed delay with feedback for resonant coloring.

ParamTypeDefaultDescription
insignal-Input signal
timesignal-Delay time in seconds
fbnumber-Feedback amount (0-1)
drynumber1.0Dry signal level (Category A)
wetnumber0.5Wet (processed) signal level (Category A)
dampingnumber0.0Tail high-frequency damping (0-1)

A comb filter creates a series of peaks and notches at harmonics of the delay frequency. The fundamental frequency is approximately 1/time Hz.

damping is a named argument — a one-pole lowpass in the feedback path that rolls off high frequencies in the resonant tail for a darker, less metallic color.

// Tuned resonator at ~220 Hz
noise() |> comb(@, 1/220, 0.95) |> out(@)
// Metallic coloring
saw(110) |> comb(@, 0.01, 0.7) |> out(@)
// Karplus-Strong style pluck
noise() * ar(trigger(4), 0.001, 0.01)
    |> comb(@, 1/440, 0.99)
    |> out(@)
// Damped comb — darker, less metallic tail
noise() * ar(trigger(4), 0.001, 0.01)
    |> comb(@, 1/440, 0.97, damping: 0.6)
    |> out(@)

Related: flanger, delay