Page 1 of 1

Allpass filters that oscillate !

PostPosted: Fri Jan 05, 2018 12:19 pm
by rocknrollkat
Hi Adam, Spogg and the gang,
I'm glad you're enjoying my classic spring reverb, and as Adam discovered, it can become unruly in a hurry, just like the physical springers.
The phenomenon occurs in the allpass section of the delay line, where several allpass filters are cascaded in the classic hookup proposed by Manfred Schroeder in 1962.
An allpass filter by design has unity gain across the design bandwidth in this case, audio.
So what's the point of a filter with a flat passband ? They are used for phase correction in telephone systems, broadcast, etc.
Their phase can shift from either -180 to 0 or 0 to +180 degrees for a 1 pole filter, depending on the hookup. Phase shift creates delay that is frequency sensitive. Cascading several of them with differing delays creates a very complex phase profile and delay profile, ideal for 'smearing' the 'rattle' decay that emanates from the primary delay network. That's why you see them placed after the primary delay elements in a typical reverb.
The feedback gain has to be kept well below .98 to prevent oscillation at certain frequencies that ADD due to the various phase shifts of the multiple allpass filters. Anything above .5 and you have to be careful.
As you may imagine. by the same token, other frequencies CANCEL for the same reason.
My Allpass demonstrator shows this, comparing 1 allpass element with 4 elements, cascaded.
Have fun with another Dead Simple demonstrator !

ROXY :D

Allpass filters don't oscillate !

PostPosted: Sat Jan 06, 2018 5:11 am
by martinvicanek
Roxy, unfortunately your allpass implementation is off by one or two samples, refer to the attachment. I have also included a correct allpass chain for reference. As you can see, the correcponding transfer function is flat, as it should be.

Would that explain Adam's instability finding?

Re: Allpass filters don't oscillate !

PostPosted: Sat Jan 06, 2018 12:52 pm
by rocknrollkat
martinvicanek wrote:Roxy, unfortunately your allpass implementation is off by one or two samples, refer to the attachment. I have also included a correct allpass chain for reference. As you can see, the correcponding transfer function is flat, as it should be.

Would that explain Adam's instability finding?


Hi Martin,
Thank you so much for taking the time to get involved in this project.
The allpass filter I'm using is taken from 'freeverb', I did not design it.
I became aware of the nonlinearity when I built my demonstrator, I just accepted it since most analog systems are not dead on, I figured this was the correct approximation.

Terrific demnostrator that you built !
Your allpass works as promised.
I'm not clear when you say 'samples' in this context.
It may indeed explain Adam's instability findings. I'm aware of this and that's why I indicated to be very gentle with the levels.
I will build a reverb demonstrator with your allpass filter and keep you posted.
This could change everything.

Thanks again,

ROXY :D

Re: Allpass filters don't oscillate !

PostPosted: Sat Jan 06, 2018 1:18 pm
by rocknrollkat
rocknrollkat wrote:
martinvicanek wrote:Roxy, unfortunately your allpass implementation is off by one or two samples, refer to the attachment. I have also included a correct allpass chain for reference. As you can see, the correcponding transfer function is flat, as it should be.

Would that explain Adam's instability finding?


Hi Martin,
Step 1, I added your delay line pack to my demonstrator, for a side by side comparison.
It's a starting point.
Here's the hookup.
Now I'll build a reverb with your allpass and mine, and check for instabiltiy.
It's 7:15 A.M. here in NYC, bitter cold, the kitchen pipes are frozen....
ROXY :D

Re: Allpass filters don't oscillate !

PostPosted: Sat Jan 06, 2018 2:49 pm
by rocknrollkat
[color=#FF00FF]Roxy, unfortunately your allpass implementation is off by one or two samples, refer to the attachment. I have also included a correct allpass chain for reference. As you can see, the correcponding transfer function is flat, as it should be.

Would that explain Adam's instability finding?[/quote][/quote]

Now I'll build a reverb with your allpass and mine, and check for instabiltiy.
[/color]

Hi Gang,
I just completed my demonstrator comparing Martin's allpass network with the Freeverb allpass network.
Freeverb limits feedback internally at 50%.
The reason now becomes apparent, as Martin suggests, the Freeverb allpass is unstable !
Check out my demonstrator, altering Freeverb's feedback changes its response from NO response to incredible oscillation !
Martin's allpass is essentially transparent, it doesn't care WHAT feedback level it sees, it just works.

So hats off to Martin, and many thanks for this corrected allpass network !

ROXY :D

Re: Allpass filters that oscillate !

PostPosted: Sat Jan 06, 2018 3:41 pm
by martinvicanek
There may be different versions of the Freeverb on the forum. I am posting the one that has worked for me all those years. It is an amazing device, given its simplicity. Schroeder was a clever guy to propose the essential algorithm, and some smart folks got the tuning right in the nineties . :geek: :ugeek:

Re: Allpass filters that oscillate !

PostPosted: Sat Jan 06, 2018 4:59 pm
by rocknrollkat
martinvicanek wrote:There may be different versions of the Freeverb on the forum. I am posting the one that has worked for me all those years. It is an amazing device, given its simplicity. Schroeder was a clever guy to propose the essential algorithm, and some smart folks got the tuning right in the nineties . :geek: :ugeek:


There could be different versions, there are several papers that discuss the Freeverb. I havn't read them in their entirety, but I'd be surprised if nobody caught this.
Looking at your optimized version, I see that the allpass filters are written in code by Trogg and yourself.
I'd have to assume that Trogg caught the problem, wrote a filter in code and you modded it.
I'm only guessing here....
The original Schroeder papers proposed 3 delay lines in parallel with different timings, and 5 allpass filters for smoothing the 'rattle' response.
Yup, amazingly simple.
I'm appalled that nobody has picked up on Freeverb's 'room size' misnomer, it is in fact feedback percent, and has no bearing on varying room size, which I have measured as fixed at approx. 25 ft. source to wall.
The allpass that you posted earlier this morning is correct.

ROXY :D