tree.oh.vox
treeohvox · sources · schema v1TB-303 voice slice — clean-room TypeScript port of the voice subset of Robin Schmidt's Open303 (MIT, https://github.com/RobinSchmidt/Open303). 6 canonical 303 knobs (TUNE ±12 st, CUTOFF 40 Hz – 6 kHz, RESONANCE 0..1, ENVELOPE 0..1, DECAY 50 ms – 3 s, ACCENT 0..1) plus pitch / gate / accent_in audio-rate inputs and per-knob CV. The DSP is the TB_303 mode of rosic::TeeBeeFilter (the diode-feedback ladder with feedback HP — NOT a moogafakkin ladder; that is the whole point of Open303), the rosic::DecayEnvelope on cutoff, a simplified AR amp envelope mirroring rosic::AnalogEnvelope, and a polyBLEP saw replacing the BlendOscillator wavetable (the 303 character lives in the filter, not the oscillator). Cutoff is modulated per-sample via Open303's measured-mapping scaler+offset formula. All 6 knobs have an 80 Hz one-pole WtParamSmoother on the audio thread (per PR #435) so knob drags and CV ride pop-free through the steep filter. Accent boosts both amp peak and filter env contribution on accented notes. The full 404 module — sequencer + transpose + slide + waveform switch + TD-3 smiley — is queued as a follow-up.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
pitch_in | pitch | 1V/oct pitch input — patch a sequencer or keyboard pitch CV here to set the note; the Tune knob adds a ±12-semitone offset on top. V/oct pitch CV |
gate_in | gate | The note gate: a rising edge triggers the amplitude + filter envelopes for a new note. The 303's gate length affects how the envelopes overlap between consecutive notes; patch a sequencer/clock gate here. gate / trigger |
accent_in | gate | The accent gate, latched at the moment the note gate fires: when it's high on a note, that note gets the 303 accent — louder, with extra filter-envelope drive for the signature accented squelch. Drive it from a sequencer's accent lane. gate / trigger |
tune_cv | cv | CV that adds to the Tune knob, shifting pitch in semitones (on top of the 1V/oct input). control voltage (CV); modulates tune (additive offset — ±1 CV sweeps the full range, centered on the knob) |
cutoff_cv | cv | CV that adds to the Cutoff knob — the classic patch point for an LFO or envelope filter-sweep. control voltage (CV); modulates cutoff (additive offset — ±1 CV sweeps the full range, centered on the knob) |
res_cv | cv | CV that adds to the Resonance knob, pushing the filter toward self-oscillating scream. control voltage (CV); modulates resonance (additive offset — ±1 CV sweeps the full range, centered on the knob) |
env_cv | cv | CV that adds to the EnvMod knob, controlling how hard the envelope drives the cutoff. control voltage (CV); modulates envelope (additive offset — ±1 CV sweeps the full range, centered on the knob) |
decay_cv | cv | CV that adds to the Decay knob, lengthening or shortening the filter-envelope sweep. control voltage (CV); modulates decay (additive offset — ±1 CV sweeps the full range, centered on the knob) |
accent_cv | cv | CV that adds to the Accent knob, scaling how strong an accented note's boost is. control voltage (CV); modulates accent (additive offset — ±1 CV sweeps the full range, centered on the knob) |
waveform_cv | cv | CV that adds to the Wave knob, morphing the oscillator between saw and square. control voltage (CV); modulates waveform (additive offset — ±1 CV sweeps the full range, centered on the knob) |
outputs
| id | cable | what it does |
|---|---|---|
audio_out | audio | The mono 303 voice — oscillator through the resonant filter and amp envelope. Patch into a distortion/overdrive for a dirtier acid line, or straight to a mixer. audio signal |
params
| id | label | range | default | curve |
|---|---|---|---|---|
tune | Tune | -12..12st | 0 | linear |
cutoff | Cutoff | 40..6000Hz | 1000 | log |
resonance | Reso | 0..1 | 0.5 | linear |
envelope | EnvMod | 0..1 | 0.5 | linear |
decay | Decay | 50..3000ms | 600 | log |
accent | Accent | 0..1 | 0.5 | linear |
waveform | Wave | 0..1 | 0 | linear |
controls
| control | what it does |
|---|---|
| Accent | Accent amount (0..1): how much louder and brighter an accented note (one whose ACCENT gate is high) gets — 0 makes accents identical to normal notes, 1 is the full 303 accent boost. |
| Cutoff | The filter corner frequency (40 Hz–6 kHz, log): the main timbre control. The 303 deliberately tops out around 6 kHz for its dark, focused voice; the filter envelope sweeps up from wherever you set this. |
| Decay | Filter-envelope decay time (50 ms–3 s, log): short for tight blips, long for sustained sweeps; the canonical 303 range sits around 200 ms–2 s, extended here into doom-y territory. |
| EnvMod | Env-mod depth (0..1): how far the filter envelope pushes the cutoff up on each note — 0 is a static filter, high values give the dramatic per-note sweep. |
| Reso | Filter resonance/emphasis (0..1): low for a round bass, high for the whistling 303 squelch that nearly self-oscillates. |
| Tune | Coarse tune in semitones (-12 to +12), added to the 1V/oct pitch input — for transposing the line or tuning to a track. |
| Wave | Morphs the oscillator from saw (0, the classic 303 voice) to square (1) and the blend between. |
source
treeohvox.ts on GitHub.