Comb Filter
FilterscombLight CPU
Tuned resonant delay — plucked-string tones, metallic ringing, flanger body.
What it does
A tuned feedback delay — rings at a pitch, turning any short burst into a plucked-string tone.
Wraps daisysp::Comb (LGPL half of DaisySP). It is a delay line one period long with its output fed back in: frequencies that fit a whole number of times into that period reinforce, everything else cancels, and the result is a row of evenly spaced peaks — the "comb". Freq sets the delay period as a pitch and Decay sets how much is fed back, expressed as a 60 dB decay time. Init needs a caller-owned buffer, so codegen emits a file-scope array sized from the sample rate to reach 20 Hz — roughly 11.5 KB at 48 kHz. This is the Karplus-Strong primitive: a burst of noise into a comb IS a plucked string, which is how the shipped Pluck voice works internally.
Parameters
-
Freq (Hz)
freqThe frequency the comb rings at — its delay period expressed as a pitch. Feed it a click or a noise burst and this is the note you hear, which is what makes the tile a plucked-string voice. ⚠ The bottom of the range is fixed at 20 Hz by the buffer size chosen at build time; asking for less is clamped rather than rejected.
-
Decay (s)
decayHow long the ringing takes to fall by 60 dB, in seconds. Short values give a plucked, damped string; long values ring metallically and can dominate the patch. This is a time, not a 0–1 amount — 1 second is a natural pluck.
Feed it a short burst (a noise blip, a drum, an envelope-gated click) and it rings at Freq like a plucked string. Feed it continuous audio and it becomes a resonant, metallic filter — the body a flanger is built from.
Ports
In
-
Audio In
input -
Freq
frequency -
Decay
decay
Out
-
Audio Out
output
Audio Control
Inputs
- Audio In
- Anything. Short bursts ring; sustained audio is filtered.
- Freq
- Ringing pitch in Hz, 20 and up. Unwired, the Inspector value is used.
- Decay
- Ring time in seconds. ⚠ Wiring this makes the tile pay an expf every sample.
Outputs
- Audio Out
- The combed signal. With a long Decay it keeps ringing after the input stops.
Rules and gotchas
- ⚠ Freq below 20 Hz is CLAMPED, not honoured. The buffer is sized at build time for a 20 Hz floor, and the class silently limits the period to what fits — a sweep heading lower flattens out rather than erroring.
- ⚠ Wiring the Decay port costs an expf per sample. The class recomputes its feedback coefficient only when the decay value actually changed, so an unwired Comb computes it once at boot and never again. Wire Freq freely; wire Decay when you need it.
- This is a feedback structure with no limiter in it. A long Decay plus a loud input builds up, and unlike Delay there is no SoftClip in the loop — put a Limiter after it if you are pushing the decay past a few seconds.
- It rings at Freq whether or not you wanted a note, so it is a filter with a strong opinion. For gentle tone shaping use Filter, Tone or One-Pole; reach for Comb when the resonance IS the sound.
- Feeding it a noise burst gated by an AD Envelope is the classic plucked string. The shipped Pluck tile does exactly this internally and is the easier route if a string is all you want.
Patches using it
- Comb Resonator
touch2
Bundled with the app — open one from the example browser.