What's the difference? I can't really get it.. They both involve a delay line, but the comb filter can be configured to have feedback.
But isn't a comb filter in feed forward mode the same thing as an allpass?
I don't understand
Allpass filters and comb filters
Reverbs creation
They are cousins.
They are almost the same in the temporal domain. They differ in the spectral domain.
In the spectral domain a comb filter will have multiple resonances and notches... hence the "comb" in it s name. Sonically, it will change the timbre of a sound by amplifying some frequencies and r3ducing somes others.
In the spectral domain an all pass filter will let pass all the frequencies. Hence it s name. All frequencies will pass through it, the spectrum will be preserved, but some frequencies will be spread in time. That s why they are a main ingredient of reverbs.
Even if all pass filters are theoretically "colorless" they tend to have some metallic tonalities especially when they are 50ms to 200ms long.
All pass filters can be used in series. In this case, use various lengths in order to obtain a smooth sound.
Comb filters are better use in parallel.
@SmashedTransistors already gave a good summary. Here are some additions and links. Hopefully this will be helpful:
Combs
When the first steps in artifical reverberation were taken, the basic design idea was to take a signal, delay it by some amount and play it back to the listener. The delayed signal is then fed back into the delay.
This idea came from a very basic model of a rooms acoustics, where basically the same happens: A sound will travel through the room, reflect off a surface and eventually come back to the listener. The traveling through the air is modeled with the delay, the reflection is modeled with the feedback. Obviously in a real room there are a lot of reflections, so an ideal model would have a lot of delays feeding back into each other.
As it turns out, the frequency spectrum of this simple reverberator looks like a comb, hence it was named a comb filter.
(The image is taken from here, where you will also find additional information)
As pointed out already, there are peaks in this frequency response, and those peaks sit at multiples of a fundamental frequency. That's why combs filters sound very metallic, like a ringing string.
If you take multiple of these filters and interconnect them, you can approach the acoustics of a real room. By adding more delays and interconnecting them, you basically add more reflective surfaces to the room model. But the result will always be a network of comb filters and they will always suffer from some ringing due to the "comb" nature of their transfer functions. Nevertheless, comb filters can be used for sophisticated reverberation, if you have enough of them and take some additional precautions to avoid ringing and make the decay equal in all frequencies.
Allpasses
On the other hand, the schroeder allpass is constructed from two comb filters, one feedback comb and one feedforward comb:
If b0 = -aM
, this filter looses its "comb" nature and will have a flat frequency response. Frequencies that go in, will come out with the same amplitude, but different frequencies will be delayed by different amounts. Basically the schroeder allpass is like a "blur" effect for audio - making it ideal for reverbs.
Regarding artificial reverberation:
It is important to understand that a real room has an exponential decay, but the allpass doesn't. So allpasses alone are not good as a reverb. Interestingly, the comb filter has a exponential decay so it would work as a reverb. But it has the ringing that sounds very metallic and unnatural. To resolve this issue, you can combine the two:
You take a single comb filter and make the delay so long that the valleys and peaks in the "comb" of the frequency response become so wide that all audible frequencies basically sit on the same peak - that means that the frequency response will be basically flat for all audible frequencies. Now the ringing is gone. Note that such a comb filter will have a delay time long enough that individual echos are audible. Basically it is nothing else than a echo delay effect.
However, in a reverb, you don't want to hear individual echos, so you add an allpass filter into the signal chain (considering the image of the comb from the top of my post, you would add the allpass right after the z^-m
delay, before the signal goes to the output). The allpass will smear and blur the audio so that transients will be spread out and the individual echos become hardly noticable.
The resulting sound of this "allpass in a comb with a long delay time"-structure will have the exponential decay from the comb combined with the blurring of the allpass.
To my knowledge, many algorithmic reverbs are based on this structure. A simple delay (or a network of interconnected delays) creates the exponential decay of the room without ringing and allpasses are inserted to blur out the transients. Sometimes additional allpasses are added to the input of the reverb as well. There is a lot of creative freedom. The allpasses can be left out for a more grainy reverb - you will find this option in the form of a "diffusion" knob on many reverb processors.
Thank you guys for the explanation! Now i can look at factory objects' code with far more insight!