Chorus Module — BBD Stereo Chorus

Juno-inspired BBD (Bucket Brigade Device) stereo chorus with two delay lines, each modulated by a triangle-wave LFO. Supports three modes: I, II, and I+II.

Files

static/js/synth/modules/chorus.js

Signal Flow

                    ┌──→ dryGain ──┐
                    │               │
input ──→ split ────┼──→ delay1 ──→ wet1 ──┼──→ mix ──→ output
                    │   ↑ LFO1              │
                    │                       │
                    └──→ delay2 ──→ wet2 ──┘
                        ↑ LFO2
  • Mode I: delay1 only (LFO1 at chorusRate, depth chorusDepth)
  • Mode II: delay2 only (LFO2 at chorusRate × 2.5)
  • Mode I+II: both delays active
  • Off: dry signal passes at unity, wet gains set to 0

Parameters

Param Range Default Description
chorusMode off/I/II/I+II off Chorus mode selector
chorusRate 0.1–5 Hz 0.7 Hz LFO rate for delay time modulation
chorusDepth 0–1 0.5 Modulation depth (scales LFO gain to delayTime)

Exports

Export Signature Purpose
paramDefs Parameter definitions for UI generation
build (ctx, params, input, dur) Create two delay lines with LFOs, dry/wet sum
update (nodes, params) Update mode, rate, depth

Build Details

  • Two DelayNodes (max 50 ms), initial delay times 15 ms / 22 ms
  • Two triangle-wave OscillatorNodes started immediately, run continuously
  • LFO outputs connect through GainNodes to delayTime AudioParams
  • Dry/wet gains: mode-off = 1/0, mode-on = 0.5/0.5
  • Mode II LFO runs at rate × 2.5 for a wider stereo effect