Comb filter

ATMOSYNTH built-in module

A filter tuned to a pitch rather than set to a cutoff. It delays the sound by exactly one period of that pitch and adds it back to itself, so everything at the pitch and its harmonics reinforces and everything between cancels — a whole row of peaks and notches at once, which is the sound of a short room, a cardboard tube, or a plucked string depending on how much of it goes round again. Resonance is how much: near one it rings on into a pitch of its own long after the sound that started it, and below nothing the feedback is subtracted instead, which shifts every notch by half a spacing and leaves the hollow, woody sound an octave below where you would expect it. Damping takes a little more of the top off each time round, so the ring dies from the treble down as a string does rather than all at once. Pitch is an input as well as a knob and Pitch depth is how far, in cents — an LFO patched in is a flanger you wired yourself — and Key tracking moves the tuning with the note played, which needs the note routed here: at one the comb rings in tune with whatever is played through it. This module carries code, for the one thing the node vocabulary cannot do: a comb's delay is one divided by its pitch, and nothing in that vocabulary divides. Resonance is an input as well, and its depth how far a signal there moves it; the comb holds what arrives inside the knob's own range, so the ring never runs away.

Four notes played on Keys, passing through it on their way out.

What it is made of

Ports: note input ‘Note’, audio input ‘In’, audio input ‘Pitch’, audio input ‘Resonance’, audio output ‘Out’.

  • ‘in’: audio input · port in · into ‘gen’
  • ‘gen’: Worklet (your own code) · processor name atmosynth-comb · inputs 1 · outputs 1 · runs its author’s code · into ‘trim’ · frequency turned by ‘Pitch (Hz)’ · resonance turned by ‘Resonance (below nothing to invert)’ · damping turned by ‘Damping’
  • ‘pitchin’: audio input · port pitch · into ‘pitchdepth’
  • ‘pitchdepth’: Gain · modulates the detune of ‘gen’ · level turned by ‘Pitch depth (cents)’
  • ‘note’: note input · port midi · into ‘trackdepth’
  • ‘trackdepth’: Gain · modulates the frequency of ‘gen’ · level turned by ‘Key tracking’
  • ‘trim’: Gain · into ‘out’ · level turned by ‘Level’
  • ‘out’: audio output · port out
  • ‘resonancein’: audio input · port resonance · into ‘resonancedepth’
  • ‘resonancedepth’: Gain · modulates the resonance of ‘gen’ · level turned by ‘Resonance depth’
  • ‘Pitch (Hz)’: knob, 20 to 8000
  • ‘Resonance (below nothing to invert)’: knob, -0.95 to 0.95
  • ‘Damping’: knob, 0 to 1
  • ‘Pitch depth (cents)’: knob, -4800 to 4800
  • ‘Key tracking’: knob, 0 to 2
  • ‘Level’: knob, 0 to 2
  • ‘Resonance depth’: knob, -1.9 to 1.9

Patches built on it

2 published patches