cofefve delay
cofefve · effects · schema v1Analog BBD/tape-style stereo delay — a clean-room, OWN-CODE engine (the replacement for the retired Cocoa Delay; its own DSP, no GPL lineage). A 10-second stereo delay line read at a fractional position with 4-point Catmull-Rom cubic interpolation; the read time is modulated two ways: a WOW LFO (AMOUNT × sin at FREQUENCY) and a slow random FLUTTER drift walk (AMOUNT × random, SPEED) on a fixed-seed PRNG (deterministic). Feedback is bipolar (−1..+1), clamped just below unity for stability, with a STEREO offset that skews the L/R read times apart and a PAN with three modes (STATIC rotation, PING-PONG feedback cross, CIRCULAR rotating the wet image). DUCKING sidechains the wet level by an envelope follower on the dry input (AMOUNT, ATTACK, RELEASE). A multi-mode TONE filter (1/2/4-pole cascade or state-variable) low-cuts + high-cuts inside the feedback path, and a stateful tanh DRIVE saturator (GAIN / MIX / FILTER, run 1–16 ITERATIONS) dirties the loop. DRY + WET set the output mix. The read pointer eases toward its target so TIME changes glide like a tape motor. 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). When sync is Off the TIME knob is free-running seconds. CV inputs cover the musical params: time, feedback, mix, drive, WOW amount, FLUTTER, pan, ducking.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
inL | audio | Left audio into the delay — together with inR this is the dry signal that is written to the delay line, 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 |
inR | audio | Right audio into the delay; an independent channel that normals to inL when left unpatched (a mono source into inL alone feeds both channels). Patch both inL and inR for a true stereo input, or use the module's stereo auto-wire. audio signal; L/R stereo pair with inL |
clock | gate | External clock/trigger: when SYNC is on, the delay measures the samples between rising edges (level crossing up through ~0.5) of pulses here and locks the delay time to that measured 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; trigger — fires once per rising edge |
time_cv | cv | CV 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_cv | cv | CV modulation of FEEDBACK, summed into the knob (linear). Pushes the regeneration amount up or down per-sample; since feedback is bipolar (-1..+1), CV can drive it negative to flip the polarity of each repeat. control voltage (CV); modulates feedback (additive offset — ±1 CV sweeps the full range, centered on the knob) |
mix_cv | cv | CV 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_cv | cv | CV modulation of the in-loop saturation amount (targets driveGain, linear). Raises or lowers how hard the feedback path is pushed into the stateful tanh saturator per-sample. control voltage (CV); modulates driveGain (additive offset — ±1 CV sweeps the full range, centered on the knob) |
lfo_cv | cv | CV modulation of the LFO (WOW) AMOUNT (lfoAmount, linear) — 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_cv | cv | CV modulation of DRIFT (FLUTTER) 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_cv | cv | CV 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_cv | cv | CV 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
| id | cable | what it does |
|---|---|---|
outL | audio | Left of the stereo output: dry × DRY level + ducked/panned wet × WET level, the left half of the combined dry+echo signal. audio signal; L/R stereo pair with outR |
outR | audio | Right of the stereo output: dry × DRY level + ducked/panned wet × WET level, the right half of the combined dry+echo signal. audio signal; L/R stereo pair with outL |
params
| id | label | range | default | curve |
|---|---|---|---|---|
delayTime | Time | 0.001..2s | 0.2 | log |
tempoSync | Sync | 0..19 | 0 | discrete |
clockSource | Clk Src | 0..1 | 0 | discrete |
syncPeriod | SyncPer | 0..30s | 0 | linear |
lfoAmount | LFO Amt | 0..0.5 | 0 | linear |
lfoFrequency | LFO Freq | 0.1..10hz | 2 | log |
driftAmount | Drift Amt | 0..0.05 | 0.001 | linear |
driftSpeed | Drift Spd | 0.1..10 | 1 | log |
feedback | Feedback | -1..1 | 0.5 | linear |
stereoOffset | Stereo | -0.5..0.5 | 0 | linear |
pan | Pan | ?..? | 0 | linear |
panMode | Pan Mode | 0..2 | 0 | discrete |
duckAmount | Duck Amt | 0..10 | 0 | linear |
duckAttack | Attack | 0.1..100 | 10 | log |
duckRelease | Release | 0.1..100 | 10 | log |
filterMode | Filt Mode | 0..3 | 0 | discrete |
lowCut | Low Cut | 0.01..1 | 0.75 | linear |
highCut | High Cut | 0.001..0.99 | 0.001 | linear |
driveGain | Gain | 0..10 | 0.1 | linear |
driveMix | D.Mix | 0..1 | 1 | linear |
driveCutoff | D.Filt | 0.01..1 | 1 | linear |
driveIterations | Iters | 1..16 | 1 | discrete |
dryVolume | Dry | 0..2 | 1 | linear |
wetVolume | Wet | 0..2 | 0.5 | linear |
controls
| control | what it does |
|---|---|
| Clk Src | CLK 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. |
| Time | TIME — 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. WOW, FLUTTER and STEREO offset all warp this value before the line is read, and the read pointer eases toward it so changes glide. |
| Drift Amt | FLUTTER (DRIFT 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. The walk is a fixed-seed PRNG so renders are deterministic. |
| Drift Spd | FLUTTER SPEED (DRIFT SPEED) — how quickly the random drift walk picks new targets (0.1–10, log). Faster gives jittery flutter, slower gives long lazy pitch drift. |
| D.Filt | DRIVE FILTER — post-saturator low-pass cutoff (0.01–1.0, normalized; default 1.0 = open) that tames the harshness the drive adds. |
| Gain | DRIVE GAIN — how hard the feedback path is pushed into the stateful tanh saturator (0–10). 0 bypasses drive entirely (clean loop); higher adds progressively dirtier saturation that builds up over repeats. |
| Iters | DRIVE ITERATIONS — how many times the saturate-then-filter stage runs in series per sample (1–16). More iterations stack more saturation and filtering for a thicker, more compressed drive. |
| D.Mix | DRIVE MIX — wet/dry blend across the saturator (0–1), how much of the saturated signal replaces the clean one inside the loop. |
| Dry | DRY — 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 Amt | DUCK 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. |
| Attack | DUCK ATTACK — how fast the ducking envelope clamps the wet down when dry signal arrives (0.1–100 ms, log). |
| Release | DUCK RELEASE — how fast the wet level recovers after the dry signal falls away (0.1–100 ms, log). |
| Feedback | FEEDBACK — 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. Internally clamped just below unity so the loop stays stable. |
| Filt Mode | FILTER MODE — the topology of the in-feedback-loop tone filter: 1-pole, 2-pole, 4-pole (cascaded one-poles), or State-variable. Steeper poles darken the repeats more; the state-variable mode adds a mild resonant character. |
| High Cut | HIGH 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 Amt | WOW (LFO 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 Freq | WOW RATE (LFO FREQUENCY) — rate of the time-warp LFO (0.1–10 Hz, log). Sets how fast the delay-time wobble cycles. |
| Low Cut | LOW CUT — the in-loop low-pass cutoff applied to each repeat (0.01–1.0, normalized; default 0.75, where 1.0 is wide open). Lower values darken successive echoes as they regenerate. (Despite the 'low cut' label it is the LP stage in the loop, matching the classic tape-echo tone control.) |
| Pan | PAN — 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 Mode | PAN MODE — Static (a fixed rotation by PAN), Ping-Pong (crosses the feedback so repeats bounce side to side), or Circular (continuously rotates the wet stereo image at a rate set by PAN). |
| Stereo | STEREO — skews the left and right read times apart (-0.5..+0.5) by shortening one channel's delay and lengthening the other, widening the stereo image of the echoes. 0 keeps both channels at the same delay (L and R identical). |
| SyncPer | Internal, 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. |
| Sync | SYNC — 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. |
| Wet | WET — 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
cofefve.ts on GitHub.