I try to understand the implementation of the low-pass comb filter of the Freeverb reverberation algorithm:


The original implementation is as follows:

inline float comb::process(float input)
    float output;
    output = buffer[bufidx];
    filterstore = (output*damp2) + (filterstore*damp1);
    buffer[bufidx] = input + (filterstore*feedback);
    if(++bufidx>=bufsize) bufidx = 0;
    return output;

I drew the closed loop of this algorithm:

enter image description here

In the link, it says:

Inspection of comb.h in the Freeverb source shows that Freeverb's ``comb'' filter is more specifically a lowpass-feedback-comb filter (LBCF4.11--§2.6.5). It is constructed using a delay line whose output is lowpass-filtered and summed with the delay-line's input. The particular lowpass used in Freeverb is a unity-gain one-pole lowpass having the transfer function

$\displaystyle H(z) = \frac{1-d}{1-d\,z^{-1}}. $

When $ d=0$ , the LBCF reduces to the feedback comb filter (FBCF) of §2.6.2 in which the feedback was not filtered. The overall LBCF transfer function is then

$ \displaystyle \hbox{LBCF}_{N}^{\,f,\,d} \;= \; \frac{z^{-N}}{1 -f\frac{1-d}{1-d\,z^{-1}}\,z^{-N}}. $

Apparently, this transfer function is implemented here. But can someone tell me, how to derive this implementation out of this transfer function?


1 Answer 1


Your diagram looks correct. Let's call the transfer function in the feedback loop $G(z)$. Consider the signal $w[n]$ at the input to the delay line. Its $\mathcal{Z}$-transform satisfies


where $X(z)$ and $Y(z)$ are the $\mathcal{Z}$-transforms of the input and output sequences, respectively. The output is just a delayed version of $w[n]$, i.e.,


From $(1)$ and $(2)$, the transfer function of the complete system can be derived as


Now it remains to find $G(z)$. It is quite straightforward to show that


Combining $(3)$ and $(4)$ gives the desired result with $d_1=d$ and assuming that $d_2=1-d_1$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.