resofilter
resofilter · processors · schema v1Multi-mode filter — clean-room TypeScript port of gabrielsoule/resonarium's MultiFilter (Source/dsp/MultiFilter.{h,cpp}). 5 modes drawn straight from upstream's MultiFilter::Type enum and filterTextFunction: LP / HP / BP / Notch / Allpass. All five characters share a single Cytomic / Zavalishin TPT state-variable filter per channel, so the MODE knob is a pure output picker — switching modes mid-render is pop-free. Cutoff 20 Hz – 20 kHz (log), resonance 0..1 (k = 2 − 2·res, edge-of-self-oscillation at the top), per-param CV inputs (cutoff_cv, reso_cv) sum into the AudioParams with a 50 Hz internal one-pole smoother on cutoff to prevent the steep transfer function from clicking on rapid CV jumps. Stereo input (independent L/R SVF state). The card displays the long-form mode name (e.g. "Low-pass") in a label next to the MODE knob — the headline UX feature: the dial updates the text reactively as you turn it. Drive is intentionally omitted (upstream MultiFilter has no drive stage; saturation lives in WrappedSVF / Distortion which is out of scope for this port).
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
audio | audio | The signal to filter (mono or stereo). A stereo source keeps its left/right separation through independent per-channel filter state; a mono source feeds both channels. audio signal |
cutoff_cv | cv | CV control of the CUTOFF frequency — patch an envelope or LFO here for filter sweeps (it adds to the knob position). control voltage (CV); modulates cutoff (additive offset — ±1 CV sweeps the full range, centered on the knob) |
reso_cv | cv | CV control of the RESONANCE — modulate the emphasis at the cutoff for talking/wah-style motion (adds to the knob position). control voltage (CV); modulates resonance (additive offset — ±1 CV sweeps the full range, centered on the knob) |
outputs
| id | cable | what it does |
|---|---|---|
out_l | audio | Left filtered output (with the dry/wet MIX applied). audio signal; L/R stereo pair with out_r |
out_r | audio | Right filtered output. With a mono input it carries the same filtered signal as OUT L. audio signal; L/R stereo pair with out_l |
params
| id | label | range | default | curve |
|---|---|---|---|---|
cutoff | Cutoff | 20..20000Hz | 1000 | log |
resonance | Reso | 0..1 | 0.3 | linear |
mode | Mode | 0..? | 0 | discrete |
mix | Mix | 0..1 | 1 | linear |
controls
| control | what it does |
|---|---|
| Cutoff | The corner frequency the filter pivots around (20 Hz to 20 kHz, log, default 1 kHz) — what 'above'/'below'/'at cutoff' refers to for the selected mode. The CUTOFF CV input adds to this. |
| Mix | Dry/wet balance (0 to 1, default fully wet): 1 is the pure filtered signal, 0 is full bypass (the unfiltered input), and in between blends the two. |
| Mode | Picks the filter response among Low-pass, High-pass, Band-pass, Notch, and Allpass (the chosen name is shown on the card). All five share one filter state so changing mode while audio plays is pop-free. |
| Reso | Emphasis at the cutoff frequency (0 to 1, default 0.3): higher values sharpen the peak and ring more — subtle by default, pronounced toward 1. The RESO CV input adds to this. |
source
resofilter.ts on GitHub.