Page 7 of 9

Re: Zero Delay Feedback Filter

PostPosted: Tue Apr 15, 2014 12:28 pm
by KG_is_back
martinvicanek wrote:A 2nd order Butteworth filter is simply one with Q=0.71. For higher orders use a cascade with different Qs and same cutoff frequencies. Here is a lowpass example.


Is there a general formula how to calculate the Q parameters for N-th order filter (assuming it's even order)? I can't find anything understandable to me on this topic.

Re: Zero Delay Feedback Filter

PostPosted: Tue Apr 15, 2014 6:03 pm
by martinvicanek
For even order N we have i = 1, 2, ..., N/2 biquads with

Q_i = 0.5/cos(alpha_i)

where the alpha_i are spread uniformly over (0,Pi/2):

alpha_i = (i - 0.5)*Pi/N

Looks more complicated than it really is. ;)

Re: Zero Delay Feedback Filter

PostPosted: Fri Apr 18, 2014 4:21 pm
by digitalwhitebyte
nice implementation.
looking at the paper Vadim, he says he can also implement a cheap non-linearity,
adding an inverse tanh-1 in one of the integrator HP and BP.
I have not found the solution, any advice on this?

Re: Zero Delay Feedback Filter

PostPosted: Mon Apr 21, 2014 6:33 pm
by martinvicanek
There are various options for introducing nonlinearities to saturate self-oscillation. The simplest would be to make 1/Q increase with |BP|, I think. Haven't actually done it, but tanh or tanh^-1 isn't cheap. Note that you have an implicit equation to solve, it's a bit harder than just calculate tanh for some given argument. Vadim also suggests simpler functions but the expressions are still awkward.

Re: Zero Delay Feedback Filter

PostPosted: Sun Apr 27, 2014 3:59 am
by digitalwhitebyte
thanks Martin

Re: Zero Delay Feedback Filter

PostPosted: Sun May 04, 2014 12:12 pm
by KG_is_back
cal also one pole allpass filter (the one used in interpolation) could be implemented as ZDF filter? would that improve how it behaves under modulation?

Re: Zero Delay Feedback Filter

PostPosted: Fri Aug 15, 2014 11:52 pm
by tester
I thought that I messed something wrong (and maybe I did, but elsewhere), but it appears to be general issue with this design, or I'm missing something. ZDF original side by side with 4ch-mono4-in-progress replacement.

When using Low Shelf and Hi Shelf filters (sel 1 and 2), there seem to be a problem with frequency. Not to mention that they tend to get stuck when on/off, let say that gain is between 0 and 10 dB, Q is below 4 - if you put frequency above some threshold - the whole goes down (sound disappears and audio must be restarted). Can this be fixed somehow?

BTW, my peak filter uses modified Q.

Re: Zero Delay Feedback Filter

PostPosted: Sun Aug 17, 2014 1:15 pm
by KG_is_back
tester wrote:I thought that I messed something wrong (and maybe I did, but elsewhere), but it appears to be general issue with this design, or I'm missing something. ZDF original side by side with 4ch-mono4-in-progress replacement.

When using Low Shelf and Hi Shelf filters (sel 1 and 2), there seem to be a problem with frequency. Not to mention that they tend to get stuck when on/off, let say that gain is between 0 and 10 dB, Q is below 4 - if you put frequency above some threshold - the whole goes down (sound disappears and audio must be restarted). Can this be fixed somehow?

BTW, my peak filter uses modified Q.


In the shelving filters you modify the cutoff according to gain. When you enter high cutoff into one of the shelving filters, the cutoff is modified so it is above 1 and filter becomes unstable. You may fix that using oversampling.

Re: Zero Delay Feedback Filter

PostPosted: Sun Aug 17, 2014 1:31 pm
by tester
And without oversampling? Maybe some sort of min/max somewhere?

I'm starting to vaguely recall, that with RBJ there was similar issue, and it was fixed somehow; it changed the filter envelope a little bit over certain thresholds, but it kept the nature of filters. I guess I need to find it out again.

Re: Zero Delay Feedback Filter

PostPosted: Sun Aug 17, 2014 1:42 pm
by KG_is_back
You may put stream min just before the actual ZDF code block with the cutoff connected and value close to 1 in the other (like 0.9999) to prevent the cutoff from exceeding that point.