twotracks
twotracks · effects · schema v6Two-reel tape loop emulator with record, overdub, scrub and Lofi character. Phase 1 ships reel A: patch stereo audio into L/R inputs, arm with the ARM gate or REC gate, and the tape records destructively (REC mode) or additively (OVERDUB mode, with a DECAY knob that fades previous passes by 0.50–0.90× per loop). A draggable blue playhead scrubs the cursor within the current window (START/END markers); rate is varispeed (1.0 = forward unity, negative = reverse, 0 = frozen). Mode toggle selects TAPE (one-shot: record one pass then play, play once then stop) or LOOP TAPE (loops continuously). Transport state is reflected by REC/ARM/PLAY/OVERDUB LEDs. Gate inputs for all transport events so gates or sequencers can drive the transport via cable. Save tape exports the current buffer as a stereo 48 kHz 16-bit WAV. Phase 2 adds reel B, EQ, and filter; Phase 3 adds Lofi saturation; Phase 4 adds CV ins and persistence polish.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
audio_l_in_a | audio | Left audio into reel A's record path. While reel A is recording or overdubbing, this is what gets written to the tape; pairs with the right input. audio signal |
audio_r_in_a | audio | Right audio into reel A's record path, partnering the left input. audio signal |
rec_start_a | gate | Reel A record START gate: a rising edge starts (or restarts) recording onto reel A from the head of the tape. Drive it from a clock/button to capture a take hands-free. gate / trigger |
rec_arm_a | gate | Reel A record ARM gate: a rising edge arms reel A so the next pass (or the next REC START) drops into record — the "ready to record" toggle. gate / trigger |
overdub_a | gate | Reel A OVERDUB gate: a rising edge toggles overdub (sound-on-sound) mode, layering new input onto the existing loop instead of erasing it. gate / trigger |
audio_l_in_b | audio | Left audio into reel B's record path. While reel B is recording or overdubbing, this is what gets written to the tape; pairs with the right input. audio signal |
audio_r_in_b | audio | Right audio into reel B's record path, partnering the left input. audio signal |
rec_start_b | gate | Reel B record START gate: a rising edge starts (or restarts) recording onto reel B from the head of the tape. Drive it from a clock/button to capture a take hands-free. gate / trigger |
rec_arm_b | gate | Reel B record ARM gate: a rising edge arms reel B so the next pass (or the next REC START) drops into record — the "ready to record" toggle. gate / trigger |
overdub_b | gate | Reel B OVERDUB gate: a rising edge toggles overdub (sound-on-sound) mode, layering new input onto the existing loop instead of erasing it. gate / trigger |
outputs
| id | cable | what it does |
|---|---|---|
out_l | audio | Left channel of the mixed stereo output — reels A and B summed per the A/B crossfader (and any cross-feed), post per-reel EQ/filter and the global LOFI stage. audio signal |
out_r | audio | Right channel of the mixed stereo output, the partner of OUT L. audio signal |
params
| id | label | range | default | curve |
|---|---|---|---|---|
rate_a | Rate A | -3..3 | 1 | linear |
mode_a | Mode A | 0..1 | 1 | discrete |
echoes_a | Echoes A | 1..5 | 3 | discrete |
start_a | Start A | 0..1 | 0 | linear |
end_a | End A | 0..1 | 1 | linear |
overdub_flag_a | Overdub A | 0..1 | 0 | discrete |
playhead_a | Playhead A | 0..1 | 0 | linear |
eqLow_a | EQ Low A | -12..12dB | 0 | linear |
eqMid_a | EQ Mid A | -12..12dB | 0 | linear |
eqHigh_a | EQ Hi A | -12..12dB | 0 | linear |
filterMode_a | Flt Mode A | 0..3 | 0 | discrete |
cutoff_a | Cutoff A | 20..20000Hz | 20000 | log |
reso_a | Reso A | 0..1 | 0 | linear |
rate_b | Rate B | -3..3 | 1 | linear |
mode_b | Mode B | 0..1 | 1 | discrete |
echoes_b | Echoes B | 1..5 | 3 | discrete |
start_b | Start B | 0..1 | 0 | linear |
end_b | End B | 0..1 | 1 | linear |
overdub_flag_b | Overdub B | 0..1 | 0 | discrete |
playhead_b | Playhead B | 0..1 | 0 | linear |
eqLow_b | EQ Low B | -12..12dB | 0 | linear |
eqMid_b | EQ Mid B | -12..12dB | 0 | linear |
eqHigh_b | EQ Hi B | -12..12dB | 0 | linear |
filterMode_b | Flt Mode B | 0..3 | 0 | discrete |
cutoff_b | Cutoff B | 20..20000Hz | 20000 | log |
reso_b | Reso B | 0..1 | 0 | linear |
ab | A/B | 0..1 | 0 | linear |
a2b | A→B | 0..1 | 0 | linear |
b2a | B→A | 0..1 | 0 | linear |
lofi | Lofi | 0..3 | 0 | discrete |
monitor | Monitor | 0..1 | 0 | discrete |
controls
| control | what it does |
|---|---|
| A→B | Cross-feed A→B (0..1) — routes reel A's playback into reel B's input/record path; with overdub this builds layered, evolving tape loops (raise carefully — it can run away). |
| A/B | A/B crossfade (0..1) — blends the two reels in the output: 0 = reel A only, 0.5 = both at unity, 1 = reel B only. |
| B→A | Cross-feed B→A (0..1) — routes reel B's playback into reel A's input/record path (the mirror of A→B). |
| Cutoff A | Reel A filter CUTOFF (20 Hz..20 kHz, log) — the corner of reel A's playback filter (active per FILTER MODE). |
| Cutoff B | Reel B filter CUTOFF (20 Hz..20 kHz, log) — the corner of reel B's playback filter (active per FILTER MODE). |
| Echoes A | Reel A ECHOES (1..5) — sets the feedback/repeat behavior: how many times the recorded loop re-circulates (and decays) like a tape echo. |
| Echoes B | Reel B ECHOES (1..5) — sets the feedback/repeat behavior: how many times the recorded loop re-circulates (and decays) like a tape echo. |
| End A | Reel A loop END (0..1) — the right edge of the playback window within the recorded tape. |
| End B | Reel B loop END (0..1) — the right edge of the playback window within the recorded tape. |
| EQ Hi A | Reel A EQ HIGH (±12 dB) — high-band shelf on reel A's playback. |
| EQ Hi B | Reel B EQ HIGH (±12 dB) — high-band shelf on reel B's playback. |
| EQ Low A | Reel A EQ LOW (±12 dB) — low-band shelf on reel A's playback. |
| EQ Low B | Reel B EQ LOW (±12 dB) — low-band shelf on reel B's playback. |
| EQ Mid A | Reel A EQ MID (±12 dB) — mid-band on reel A's playback. |
| EQ Mid B | Reel B EQ MID (±12 dB) — mid-band on reel B's playback. |
| Flt Mode A | Reel A FILTER MODE — off / low-pass / high-pass / band-pass selector for reel A's playback filter. |
| Flt Mode B | Reel B FILTER MODE — off / low-pass / high-pass / band-pass selector for reel B's playback filter. |
| Lofi | LOFI degradation (0..3) — a global tape-degradation amount that adds wow/flutter/bit-grit character; 0 = clean. |
| Mode A | Reel A MODE (LOOP vs ONE-SHOT) — whether the reel loops continuously or plays its take once. |
| Mode B | Reel B MODE (LOOP vs ONE-SHOT) — whether the reel loops continuously or plays its take once. |
| Monitor | MONITOR (on/off) — passes the live input signal through to the output so you can hear what you're about to record (input monitoring), independent of playback. |
| Overdub A | Reel A overdub state flag (0/1) — the persisted on/off of overdub mode (the button form of the OVERDUB gate); when on, new input layers onto the existing loop. |
| Overdub B | Reel B overdub state flag (0/1) — the persisted on/off of overdub mode (the button form of the OVERDUB gate); when on, new input layers onto the existing loop. |
| Playhead A | Reel A playhead position (0..1) — the live read position on the tape; scrub it to jump within the take (the card draws it on the waveform). |
| Playhead B | Reel B playhead position (0..1) — the live read position on the tape; scrub it to jump within the take (the card draws it on the waveform). |
| Rate A | Reel A tape RATE (−3..+3) — playback/record speed and direction; 1 = normal, fractions slow it down and pitch it lower, negatives play the tape backwards. |
| Rate B | Reel B tape RATE (−3..+3) — playback/record speed and direction; 1 = normal, fractions slow it down and pitch it lower, negatives play the tape backwards. |
| Reso A | Reel A filter RESONANCE (0..1) — emphasis at reel A's filter cutoff. |
| Reso B | Reel B filter RESONANCE (0..1) — emphasis at reel B's filter cutoff. |
| Start A | Reel A loop START (0..1) — the left edge of the playback window within the recorded tape (you can't drag it past the playhead while rolling). |
| Start B | Reel B loop START (0..1) — the left edge of the playback window within the recorded tape (you can't drag it past the playhead while rolling). |
source
twotracks.ts on GitHub.