If you look at the 'details' tab of the help patcher for [comb~] and [allpass~] you can see that the implementations are very similar, but with the important difference of how they handle gain coefficients. In plain English (more or less), [comb~] has separate gain controls for the direct, delayed, and fedback & delayed (direct, feedforward and feedback, respectively) versions of the signal. The [allpass~], on the other hand locks the direct and feedback gain together. The allpass will typically be more stable than the comb, as the allpass always balances these two signals whereas with the comb you can get far more variety of settings, some of which will blow up the filter.
VERY generally, an allpass is used as a building block for other things (like reverberators, etc.) and/or for relatively mild phase manipulation whereas comb can be used as a more radical timbral shaper all on its own.
thanks for the complete explanation. I had read the tutorials before but it lost me.. Now it's quite okay ! If I understood well, you'd rather use the comb filter to act on the tone of the output (the french word is the "timbre" sorry for bad translation), whereas if I only want some "kind of discrete" phase interferences I'll use an allpass.
But to change the tone with the comb~, it makes use of phase interferences to attenuate other frequencies isn't it ?
Understand this principle but why do they use the term of "feedforward" ? the delayed signal is simply output or do I miss something? I've got the same probleme of vocabularty for the feedback parameter. I understand the it feed the input with the output, but I don't get this sentence "the output signal it sent that same amount of time ago (which would have included prior delays)", on this context the sentence means for me that it's a simple delayed output that doesn't affect the input, but it would have no sense... I need to be lightened up some times... But thanks anyway
@Roman Thilenius, to complete your answer the allpass~ may even be an addition of severals (quite a lot actually) comb filters with there first parameters differently modulated ?
That's the maximum delay possible. It's like tapin~.
Allpass is also a type of interpolation. For a comb filter you often want a particular tuning. You won't get enough without interpolation, but you'll also notice that linear interpolation has a low pass filtering effect. Allpass interpolation has a flatter frequency response, preserving high frequency components. (This comes at the cost of phase smearing)
(So comb filtering effects will be produced with a feedback delay with a wavelength short enough to be in the audio, rather than rhythmic, range. You could use allpass interpolation for the delay line.)
The latest version of BEAP has a comb filter that I wrote that uses allpass interpolation.
I noticed that, but I don't get why it's the maximum delay possible whereas you can exceed this limit with the "initial delay"...
I understood the waveshaping caused by a short enought delayed feedback. But I don't really picture the term of interpolation (it as to many senses for me) ? You're speaking of phase interference ?
I'll have a look at to your Beap patch, thanks. But actually I was more trying to understand the parameters and possibilities of comb filter. Could you answer to this part of the post ?
"I Understand this principle but why do they use the term of “feedforward” ? the delayed signal is simply output or do I miss something? I’ve got the same probleme of vocabularty for the feedback parameter. I understand the it feed the input with the output, but I don’t get this sentence “the output signal it sent that same amount of time ago (which would have included prior delays)”, on this context the sentence means for me that it’s a simple delayed output that doesn’t affect the input, but it would have no sense…"
@wetterberg Thanks! Yeah, sorry not version as far as "release" but latest commit.
@Guygz You can find a diagram of the innards of comb~ on its help page. (it's under the "details" tab) If you think about feedforward as representing some sort of "future" state, you can see that, since that's impossible to predict, it really just means delaying the input (worth paying attention to how the coefficients get mapped, though!). For comb~, the third inlet is gain for the incoming signal, fourth is gain for the delayed feedforward signal, and fifth is for feedback gain.
Feedforward terms are standard parts of IIR filters. If you look at the biquad~ help file, you'll see that it also has feedforward sections. Feedback terms have substantially greater weight because their effects continue to ripple through (whereas feedforward terms are only calculated once) the system.
The Wikipedia page for comb filters shows the difference in frequency response for feedback vs feedforward. Feedforward is an FIR (Finite Impulse Response) filter, whereas feedback is an IIR (Infinite Impulse Response) filter.
The interpolation has to do with how the filter handles non-integer length sample delays. Comb~ does linear interpolation, which is a form of lowpass filtering. Try setting delays (use sampstoms~) in integer (e.g. 441) vs non-integer (441.49) lengths with high feedback, then send an impulse through comb~. You should notice that integer length delays last longer and are brighter. This is because they aren't using interpolation. Allpass interpolation is designed to have a flatter frequency response, so it does not have as much of a damping effect.
You might also check out teeth~, which permits different feedforward and feedback delays.
So the signal is delayed previously, after this delay comes the "present signal" and after an other delay of the same value comes the officialy delayed one. It's because of this previous and "hidden" delay that they can predict a "future state of the sound". Comb~ is nothing more than a balanced blend of a signal, a delayed one, and an other double delayed ?
I see that like that, tell me if I got something completely wrong...
I understand as well the -why- of those different frequency response for feedforward and feedback. One is subtracting the frequency of the delay and the other is arising it.
After reading your answer, and seeing the filterdetail help window I really understand better the operation based in comb~, that's great thanks a lot. It could appear simple but it's really comfortable to have a picture of it.
I knew what was an interpolation but didn't see where was is place in this discussion. Now it's okay, if you put only a line between two points you remove possible transitions (hi fq ones) and that's why there is a low pass effect.
When I was reading the tutorial of comb filters, they talked about a delay of one sample or two, you're saying that we can delay for example a two samples and a half and then comb~ interpolates the end of the third sample ?
But the float number your talking about is for delay time, not a number of samples, I don't really get it...
And there's also this stupid question that I can't answer since a week. I would have understand the utility of the first argument (a "maximum delay time") if, once this limit crossed by the second one, the filter blow up or shut off or stop itself to the limit, but nothing of that kind happen.
If you've got : comb~ 15 22 0,8 0,5 0,6
the delay time would be 22 and not 15, so what is the point ?
I'm asking those meticulous questions because I'm actually trying to make a kind of complete reverb patch by my own to enter in an engineer school. But I'm only a sound technician of 20, and I admit I cruelly miss some theoretical studies of the question sometimes... But this forum learn me a lot, and thanks again for the help. What you're saying about allpass and the lowpass effect of comb~ is really interesting and I think I'll use this method to build the diffuse field of it.
I have checked teeth~ and the distinction of the two delays could be really useful to build a more random field !
I'm not really sure on the arguments (for the particular reasoning for them); I usually just steal from the help file...
Interpolation is especially significant inside a comb filter because it's going to process the loop many times, rather than just once, so there's a lot more cumulative degradation that comes with interpolation. You'll particularly notice this in the case of Karplus-Strong synthesis. If you're asking for a 2.5 sample delay, then you're going to have to interpolate. (another example of this happens in sound-file playback. If you want to play at 0.8X the speed, you're going to have to either repeat samples (BAD!) or interpolate the in-between values)
In the case of linear interpolation, this means blending 50% of the value at 2 samples, with 50% of the value at three samples. (the % changes with the fractional part)
You could implement a comb filter inside of gen~ that used different interpolation (say cubic or spline) and that should be kinder to the high frequencies.
Using two delays inside a feedback loop is often a part of physical modelling synthesis, btw. (check out some of the examples in the gen~ folder)