1

I've been looking into the venerable Freeverb and I see that CCRMA state that it uses 4 Shroeder Allpass filters in series, but when I look at the source code I see:

inline float allpass::process(float input)
{
    float output;
    float bufout;
    
    bufout = buffer[bufidx];
    undenormalise(bufout);
    
    output = -input + bufout;
    buffer[bufidx] = input + (bufout*feedback);

    if(++bufidx>=bufsize) bufidx = 0;

    return output;
}

To me, this doesn't equate to the standard Shroeder Allpass, but instead something like this:

Freeverb Implementation

But it should look like this (from CCRMA):

CCRMA Implementation

Am I overlooking something here, or is CCRMA incorrect?

Matt L.
  • 78,282
  • 5
  • 66
  • 149
kippertoffee
  • 383
  • 1
  • 8

1 Answers1

1

You're right that the freeverb "allpass" implementation actually isn't a perfect allpass filter. The implemented filter has a transfer function

$$H(z)=\frac{(1+\alpha)z^{-N}-1}{1-\alpha z^{-N}}\tag{1}$$

The only case for which $(1)$ actually is a (scaled) allpass filter occurs if $\alpha$ satisfies

$$\alpha(1+\alpha)=1\tag{2}$$

i.e., $\alpha=(\sqrt{5}-1)/2\approx 0.62$.

The fact that the freeverb filter only approximates an allpass filter is also mentioned here.

Matt L.
  • 78,282
  • 5
  • 66
  • 149
  • Thank you! I've looked at that Freeverb page all morning and didn't see the page with that info. Much appreciated. I think I have to assume that the design was intentional. I wonder what the rationale for this unusual choice was? – kippertoffee Jun 21 '21 at 12:25
  • 1
    @kippertoffee: You're welcome! As for your last question, I honestly don't have a clue ... – Matt L. Jun 21 '21 at 12:43
  • 1
    Manfred Schroeder's original paper on reverb is still a good read: https://www.aes.org/e-lib/browse.cfm?elib=343 . His original approach used allpass and comb filters and the freeverb implementation seems to by a hybrid of both. (No idea if that's intentional). – Hilmar Jun 21 '21 at 13:05