cocoa delay

cocoadelay · effects · schema v1

Tape-style stereo delay — clean-room TypeScript port of Tilde Murray's Cocoa Delay (GPL-3.0). A 10-second stereo tape buffer read at a fractional position with 4-point Hermite interpolation; the read time is modulated two ways: an LFO (AMOUNT × sin at FREQUENCY) and a slow random DRIFT walk (AMOUNT × random, SPEED). Feedback is bipolar (−1..+1) with a STEREO offset that skews the L/R read times apart and a PAN with three modes (STATIC rotation, PING-PONG channel-swap on write, CIRCULAR rotating the wet image). DUCKING sidechains the wet level by an envelope follower on the dry input (AMOUNT, ATTACK, RELEASE). A multi-mode FILTER (1/2/4-pole or state-variable, with crossfade between modes) low-cuts + high-cuts inside the feedback path, and an Airwindows-style stateful DRIVE (PurestDrive × Spiral saturation, GAIN / MIX / FILTER, run 1–16 ITERATIONS) saturates the loop. DRY + WET set the output mix. TEMPO SYNC locks the delay time to a musical division (1/4, 1/8, dotted, triplet…) of a clock period measured from pulses on the CLOCK gate input; the CLK SRC dropdown labels whether that clock is the rack SYSTEM clock (TIMELORDE) or external MIDI (MIDICLOCK) — both arrive as the same pulse stream. When sync is Off the TIME knob is free-running milliseconds. CV inputs cover the musical params: time, feedback, mix, drive, LFO amount, drift, pan, ducking. CHARLOTTE'S ECHOS is built from four of these engines chained in series.

A tape-style stereo delay (clean-room port of Tilde Murray's Cocoa Delay): audio is written into a 10-second stereo tape buffer and read back at a fractional, modulated position with 4-point Hermite interpolation. The read time is the base delay (free-running TIME, or a musical division of a clock beat when SYNC is on), warped per-sample by an LFO and a slow random DRIFT, with bipolar feedback feeding the echoes back through an in-loop multi-mode FILTER and saturating DRIVE; PAN modes spread the wet image, DUCKING sidechains the wet level off the dry input, and DRY/WET set the final mix. Mental model: think of it as one tape echo where almost every knob can also be voltage-controlled, and where a patched CLK pulse or the rack/MIDI tempo can lock the delay to the beat.

the faceplate

cocoa delayinLaudioinRaudioclockgatetime_cvcvfeedback_cvcvmix_cvcvdrive_cvcvlfo_cvcvdrift_cvcvpan_cvcvduck_cvcvoutLaudiooutRaudioaudiocvgatepitch
11 inputs · 2 outputs · 24 params

inputs

idcablewhat it does
inLaudioLeft audio into the delay — together with inR this is the dry signal that gets written to tape, tapped through the wet path, and summed back into the output.
audio signal; L/R stereo pair with inR — L-only auto-duplicates to R
inRaudioRight audio into the delay; it is an independent channel, NOT normaled to inL — if you patch only inL the right side stays silent (a mono source feeds both channels only if you patch both inL and inR, e.g. via the module's stereo auto-wire).
audio signal; L/R stereo pair with inL
clockgateExternal clock/gate: when SYNC is on, the delay measures the period between rising edges (level crossing up through ~0.5) of pulses here and locks the delay time to that period times the chosen division — it takes two rising edges to establish a period, so the lock engages on the second pulse. A patched clock ALWAYS wins over both the rack SYSTEM tempo and MIDI clock; when SYNC is Off this input has no audible effect and TIME is free-running.
gate / trigger
time_cvcvCV modulation of the TIME knob (delayTime), summed into it with a log-scaled response so a -1..+1 CV sweeps the base delay across its full log range; sweeping it gives classic tape pitch-bend / smear on the echoes.
control voltage (CV); modulates delayTime (multiplicative ≈ octaves — ±1 CV spans the param’s log range)
feedback_cvcvCV modulation of FEEDBACK, summed into the knob (linear). Pushes the regeneration amount up or down per-sample; since feedback is bipolar (-1..+1), negative-direction CV can flip the feedback polarity.
control voltage (CV); modulates feedback (additive offset — ±1 CV sweeps the full range, centered on the knob)
mix_cvcvCV modulation of the WET output level (targets wetVolume, linear). Use it to fade the echoes in and out under control voltage; the dry level is unaffected.
control voltage (CV); modulates wetVolume (additive offset — ±1 CV sweeps the full range, centered on the knob)
drive_cvcvCV modulation of the in-loop saturation amount (targets driveGain, linear). Raises or lowers how hard the feedback path is driven into the stateful saturator per-sample.
control voltage (CV); modulates driveGain (additive offset — ±1 CV sweeps the full range, centered on the knob)
lfo_cvcvCV modulation of the LFO AMOUNT (lfoAmount, linear) — i.e. the depth with which the internal time LFO wobbles the delay read position. It does not change the LFO rate, only how much it warps the time.
control voltage (CV); modulates lfoAmount (additive offset — ±1 CV sweeps the full range, centered on the knob)
drift_cvcvCV modulation of DRIFT AMOUNT (driftAmount, linear), the depth of the slow random tape-drift walk applied to the read time. More CV = more wow/flutter wander.
control voltage (CV); modulates driftAmount (additive offset — ±1 CV sweeps the full range, centered on the knob)
pan_cvcvCV modulation of the PAN angle (pan, linear). Its audible effect depends on PAN MODE — it rotates the static placement, biases the ping-pong, or drives the circular wet-image rotation.
control voltage (CV); modulates pan (additive offset — ±1 CV sweeps the full range, centered on the knob)
duck_cvcvCV modulation of DUCK AMOUNT (duckAmount, linear) — how strongly the wet level is pulled down by the envelope follower riding the dry input. More CV = the echoes get out of the way harder when dry signal is present.
control voltage (CV); modulates duckAmount (additive offset — ±1 CV sweeps the full range, centered on the knob)

outputs

idcablewhat it does
outLaudioLeft of the stereo output: dry × DRY level + ducked wet × WET level, the left half of the combined dry+echo signal.
audio signal; L/R stereo pair with outR
outRaudioRight of the stereo output: dry × DRY level + ducked wet × WET level, the right half of the combined dry+echo signal.
audio signal; L/R stereo pair with outL

params

idlabelrangedefaultcurve
delayTimeTime0.001..2s0.2log
tempoSyncSync0..190discrete
clockSourceClk Src0..10discrete
syncPeriodSyncPer0..30s0linear
lfoAmountLFO Amt0..0.50linear
lfoFrequencyLFO Freq0.1..10hz2log
driftAmountDrift Amt0..0.050.001linear
driftSpeedDrift Spd0.1..101log
feedbackFeedback-1..10.5linear
stereoOffsetStereo-0.5..0.50linear
panPan?..?0linear
panModePan Mode0..20discrete
duckAmountDuck Amt0..100linear
duckAttackAttack0.1..10010log
duckReleaseRelease0.1..10010log
filterModeFilt Mode0..30discrete
lowCutLow Cut0.01..10.75linear
highCutHigh Cut0.001..0.990.001linear
driveGainGain0..100.1linear
driveMixD.Mix0..11linear
driveCutoffD.Filt0.01..11linear
driveIterationsIters1..161discrete
dryVolumeDry0..21linear
wetVolumeWet0..20.5linear

controls

controlwhat it does
Clk SrcCLK SRC — picks which tempo reference SYNC follows when no clock cable is patched: SYSTEM reads the rack's TIMELORDE BPM, MIDI follows incoming MIDI clock (0xF8). Selecting MIDI is what first requests browser MIDI access; SYSTEM never prompts. A patched CLK input overrides either.
TimeTIME — the base delay length in seconds (0.001–2.0 s, log). Used directly when SYNC is Off; when SYNC is on it is only the fallback if no clock/tempo is available. LFO, DRIFT and STEREO offset all warp this value before the tape is read.
Drift AmtDRIFT AMOUNT — depth of a slow random walk on the delay time (0–0.05), the tape wow/flutter character. Higher = more wandering, less stable pitch on the echoes.
Drift SpdDRIFT SPEED — how quickly the random drift walk moves (0.1–10, log). Faster speeds give jittery flutter, slower give long lazy pitch drift.
D.FiltDRIVE FILTER — post-saturator low-pass cutoff (0.01–1.0, normalized; default 1.0 = open) that tames the harshness the drive adds.
GainDRIVE GAIN — how hard the feedback path is pushed into the stateful saturator (0–10). 0 bypasses drive entirely; higher adds progressively dirtier saturation that builds up over repeats.
ItersDRIVE ITERATIONS — how many times the saturate-then-filter stage is run in series per sample (1–16). More iterations stack more saturation and filtering for a thicker, more compressed drive.
D.MixDRIVE MIX — wet/dry blend across the saturator (0–1), how much of the saturated signal replaces the clean one inside the loop.
DryDRY — level of the unprocessed input passed straight to the output (0–2.0, default 1.0). Set to 0 for a fully wet send/return.
Duck AmtDUCK AMOUNT — how strongly the wet level is ducked by an envelope follower on the dry input sum (0–10). At 0 there is no ducking; higher values make the echoes recede whenever dry signal is playing.
AttackDUCK ATTACK — how fast the ducking envelope clamps the wet down when dry signal arrives (0.1–100, log).
ReleaseDUCK RELEASE — how fast the wet level recovers after the dry signal falls away (0.1–100, log).
FeedbackFEEDBACK — bipolar regeneration amount (-1..+1, default 0.5). Higher magnitude = more/longer repeats; negative values invert the polarity of each fed-back repeat for a hollower tone.
Filt ModeFILTER MODE — the topology of the in-feedback-loop tone filter: 1-pole, 2-pole, 4-pole, or State-variable. Steeper poles color the repeats more; changing mode crossfades smoothly.
High CutHIGH CUT — the in-loop high-pass cutoff applied to each repeat (0.001–0.99, normalized; default 0.001 ≈ off). Raising it thins out the lows of successive echoes. (Label/role: this is the HP stage in the loop.)
LFO AmtLFO AMOUNT — depth of the internal sine LFO that warps the delay read time (0–0.5). At 0 the LFO does nothing; higher values give pitch wobble / chorus-like movement on the echoes.
LFO FreqLFO FREQUENCY — rate of the time-warp LFO (0.1–10 Hz, log). Sets how fast the delay-time wobble cycles.
Low CutLOW CUT — the in-loop low-pass cutoff applied to each repeat (0.01–1.0, normalized; default 0.75). Lower values darken successive echoes as they regenerate. (Despite the 'low cut' label it is the LP stage in the loop.)
PanPAN — wet-image rotation angle (-π/2..+π/2). What it does depends on PAN MODE: static placement, ping-pong bias, or the amount of circular rotation applied to the wet signal.
Pan ModePAN MODE — Static (a fixed rotation by PAN), Ping-Pong (swaps L/R as it writes to tape so repeats bounce side to side), or Circular (continuously rotates the wet stereo image). Switching modes crossfades to avoid clicks.
StereoSTEREO — skews the left and right read times apart (-0.5..+0.5) by exponentiating the delay time oppositely per channel, widening the stereo image of the echoes. 0 keeps both channels at the same delay.
SyncPerInternal, not on the card: the seconds-per-beat the main thread bridges in for the selected CLK SRC (SYSTEM/MIDI), since the audio worklet can't read those sources directly. 0 means none available, in which case it falls back to the free-running TIME.
SyncSYNC — Off (index 0) means TIME is free-running; any other setting locks the delay to a musical division of one beat (1, dotted/triplet variants… down to 1/64T). The beat comes from a patched clock pulse, else the chosen CLK SRC tempo.
WetWET — level of the delayed/echo signal in the output (0–2.0, default 0.5), the amount ducking pulls down and what mix_cv modulates.

source

cocoadelay.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo