WaveStack is on the iOS App Store

Introduction to Sound Synthesis Shaping timbre further

Comb filters

A comb filter mixes a signal with a short delayed copy of itself. The copy adds to the original at some frequencies and cancels it at others, so the response is a row of evenly spaced peaks and notches. With feedback, the peaks narrow until the filter rings at a pitch set by the delay.

The filters covered earlier reduce frequencies above or below a cutoff. A comb filter raises and lowers frequencies across the whole spectrum in a repeating pattern. When a signal is added to a copy of itself delayed by a few milliseconds, frequencies whose cycles fit the delay a whole number of times arrive in step and add, and the frequencies halfway between arrive out of step and cancel. A delay of 5 milliseconds gives peaks at 200 Hz and every multiple of 200 Hz, with notches at 100 Hz, 300 Hz and the other odd multiples of 100 Hz in between. Plotted on a linear frequency axis the peaks are evenly spaced, and the plot looks like the teeth of a comb.

The tool below sends a source through a comb filter. Delay sets the spacing of the teeth, and feedback sends some of the output back into the delay. An LFO can be assigned to the delay, and LFO depth sets how far it moves the delay either side of the Delay setting, up to 90% of it. The spectrum is measured from the output, and the orange marks show where the peaks are expected for the delay at each moment.

A comb filter

Noise, a sawtooth or a series of short noise bursts passes through a comb filter. Delay sets the spacing of the peaks and feedback sets how tall and narrow they are. Negative feedback inverts the delayed signal. An LFO can be assigned to the delay to move it up and down around the Delay setting.

Source
LFO

Listen for On noise with no feedback, the comb gives a hollow, slightly pitched hiss whose pitch rises as the delay shortens. With high feedback it becomes a clear pitched tone. Negative feedback moves the pitch down an octave and leaves only odd harmonics. On the noise bursts with high feedback, each burst rings like a plucked string. With the LFO assigned to the delay, the peaks spread apart as the delay shortens and close up as it lengthens, and on noise this is heard as a rising and falling whoosh.

Delay and pitch

The peaks sit at whole-number multiples of one divided by the delay time, so they form a harmonic series whose fundamental is set by the delay. A shorter delay spaces the peaks further apart and raises that fundamental, which is why sweeping the delay of a comb filter on noise sounds like a pitch rising and falling. Inverting the delayed copy, with negative feedback, swaps the peaks and notches: the peaks move to the odd multiples of half the original fundamental, an octave lower, with only odd harmonics.

Feedback and resonance

With feedback, part of the output goes back into the delay, so each delayed copy passes through the delay again, quieter each time. The peaks grow taller and narrower as the feedback rises, and close to 100% the filter keeps ringing at its fundamental and harmonics after the input stops. A comb filter used this way is often called a resonator. Struck with a short burst of noise, it rings like a plucked string and fades, because each pass through the loop is scaled down by the feedback amount. That is the principle of the Karplus-Strong algorithm, published in 1983 by the computer scientists Kevin Karplus and Alex Strong, which adds a lowpass filter inside the loop so that the high harmonics fade first.

Sweeping the delay of a comb filter slowly with an LFO, as the LFO in the tool above does, gives the effect called flanging, described in the flanger chapter. The same structure, with the delay set to a few tens of milliseconds and the feedback low, is a short echo.

Common questions

What is a comb filter?

A comb filter is a filter made by mixing a signal with a delayed copy of itself. At frequencies whose cycles fit the delay a whole number of times the two copies add, and halfway between they cancel, so the response is a row of evenly spaced peaks and notches like the teeth of a comb.

What frequencies does a comb filter boost?

A comb filter boosts whole-number multiples of one divided by the delay time. A delay of 5 milliseconds puts peaks at 200 Hz, 400 Hz, 600 Hz and upwards. Inverting the delayed copy moves the peaks to the odd multiples of half that frequency instead.

Why does a comb filter with feedback sound pitched?

Feeding the output back into the delay makes each peak taller and narrower, and at high feedback the filter rings at the frequency set by the delay and its harmonics. Struck with a short burst of noise, it rings like a plucked string, which is the principle of the Karplus-Strong algorithm.

Published Glossary