Page 9 of 9

Re: Zero Delay Feedback Filter

PostPosted: Thu Mar 03, 2016 1:02 pm
by tulamide
stw wrote:This is a quote from martins post earlier in this thread:
martinvicanek wrote: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


You can obtain the Q values from this, e.g :

1 biquad: i=1; N=2; Qi = 0.707
2 biquads: First: i=1; N=4; Qi = 0.541 Second: i=2; N=4; Qi = 1.307
...

or take it directly from the various filter examples martin already posted! ;)


Thank you very much, stw.
I was afraid of getting a quite technical answer. The thing is, I don't know what all of this means. There's the zero delay feedback filter, and it outputs lowpass/hipass/bandpass/etc. There's an input labeled "Resonance (>0)". I would like to have a value for this resonance input that is equivalent to "no resonance".

I don't see any Q there. I don't know what biquad means for this filter. I don't know what N means. I'm totally lost here.

Is there no way to have an exact value for exactly this zdf filter with all its outputs? I don't even dare to ask, what value would refer to Resonance = 127/100%/1.0 on other synths... :oops:

Re: Zero Delay Feedback Filter

PostPosted: Thu Mar 03, 2016 1:58 pm
by stw
Ok, then a more "construction set" description...

Consider one of the ZDF filter modules as one biquad filter. The Q value is the resonance part of it.
To get a flat response ( = 0 resonance) from your biquad filter you'll need the values from the quoted function.
If you use one filter module you have to take the value from the first example in my post (0.707) to get in fact "0" resonance.
If you're going to combine more filter modules to get a steeper filter curve these Q values change.
E.g if you connect two ZDF modules in serial (resulting into a 4 [= 'N' in the quotation] pole filter) the first module takes 0.541 and the second 1.307 as Q (=resonance) values.
To increase resonance you have to add any value to these initial Q settings.
Since there's no upper limit for the resonance it's up to your taste what you consider as 100%. It could be an addition of 1, 10 or 100. Just take into account that the magnitude at your cutoff frequency increases the higher your res value is. (e.g. a res value of 3 causes approximately a 10db boost. )
Just try what fits your needs best. I'd consider a useful range something between 3 and 9.

Hope this makes it a bit less confusing?

Re: Zero Delay Feedback Filter

PostPosted: Thu Mar 03, 2016 3:29 pm
by martinvicanek
I am not sure if "Resonance = 127" on one synth means the same thing on another synth, most likely not. On the other hand, the Q Factor is a standard concept with a well-defined meaning, see https://en.wikipedia.org/wiki/Q_factor. I might have caused some of the confusion by labeling the pin as "Resonance" while, in fact, it is just Q.

Re: Zero Delay Feedback Filter

PostPosted: Thu Mar 03, 2016 4:28 pm
by tulamide
stw wrote:Ok, then a more "construction set" description...

Consider one of the ZDF filter modules as one biquad filter. The Q value is the resonance part of it.
To get a flat response ( = 0 resonance) from your biquad filter you'll need the values from the quoted function.
If you use one filter module you have to take the value from the first example in my post (0.707) to get in fact "0" resonance.
If you're going to combine more filter modules to get a steeper filter curve these Q values change.
E.g if you connect two ZDF modules in serial (resulting into a 4 [= 'N' in the quotation] pole filter) the first module takes 0.541 and the second 1.307 as Q (=resonance) values.
To increase resonance you have to add any value to these initial Q settings.
Since there's no upper limit for the resonance it's up to your taste what you consider as 100%. It could be an addition of 1, 10 or 100. Just take into account that the magnitude at your cutoff frequency increases the higher your res value is. (e.g. a res value of 3 causes approximately a 10db boost. )
Just try what fits your needs best. I'd consider a useful range something between 3 and 9.

Hope this makes it a bit less confusing?

These explanations make a few things clear. 2 poles per filter in serial, i is then half of the number N of course. The more filters I use, the steeper the resulting filter. And for each filter a seperate Q is to be calculated to get zero resonance in the end.

But I can't recreate the values you got. I get different results and I don't know why. Here's my calculation in detail:
(1)
i = 1
N = 4
alpha_i = (1 - 0.5) * Pi / N = 0.5 * Pi / N = 1.5707963267948966 / N = 0.39269908169872415
Qi = 0.5 / cos(0.39269908169872415) = 0.5 / 0.999976512175 = 0.5000117441883454

(2)
i = 2
N = 4
alpha_i = (2 - 0.5) * Pi / N = 1.5 * Pi / N = 4.7123889803846899 / N = 1.178097245096172475
Qi = 0.5 / cos(1.178097245096172475) = 0.5 / 0.999788616191 = 0.500105714250781

Is it really the cosine? Or do I need to convert alpha_i to some other range before taking the cosine?

Re: Zero Delay Feedback Filter

PostPosted: Thu Mar 03, 2016 6:13 pm
by martinvicanek
Tulamide, sorry, those are radians, not degrees. You can see that from pi entering in the cosine argument.

Re: Zero Delay Feedback Filter

PostPosted: Thu Mar 03, 2016 6:33 pm
by tulamide
:o :shock: :oops: :oops:

Now I have what I need to work with the calculations. I thank you both, stw (for your patience by explaining it in more depth) and Martin (for the existence of this filter and the wiki link)! :)

Re: Zero Delay Feedback Filter

PostPosted: Fri Mar 04, 2016 2:38 am
by martinvicanek
tulamide wrote:1) Frequency goes from 0 - 1, am I right that 1 refers to Nyquist?
Right, that's the FS standard. (I would have preferred Pi for the (dimensionless) Nyquist frequency but I was too late. :mrgreen: )
tulamide wrote:3) Attenuation: What exactly is it used for? What is the difference of using attenuation opposed to gain after the filter?
You are probably referring to the peaking EQ filter in here. Perhaps "Peak Gain" would be a more appropriate term than Attenuation. Note that this is different from an overall gain factor because a peaking EQ primarily boosts or cuts frequencies near the peak while other frequencies are essentially left at unity gain.

Re: Zero Delay Feedback Filter

PostPosted: Fri Mar 04, 2016 2:47 am
by martinvicanek
noisenerd wrote:
martinvicanek wrote: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.


Sorry to dredge up an old post, but could you please elaborate on this a bit for a noob? If it sounds good, I'll pay the CPU cost.

Sorry about my late response. ;) The Source of all this is Vadim's Book The Art of VA Filter Design. Refer to section 5.5 for nonlinearities in the SVF.

Re: Zero Delay Feedback Filter

PostPosted: Fri Mar 04, 2016 4:46 am
by noisenerd
martinvicanek wrote:Sorry about my late response. ;) The Source of all this is Vadim's Book The Art of VA Filter Design. Refer to section 5.5 for nonlinearities in the SVF.


No worries... I've been studying that very book and referring to your FS implementation of this and Mystran's "cheap" ladder filter, which have been immensely helpful in understanding it. So in a way, you've answered without saying anything. :)

Btw, for others who may be interested in this subject, it's also worth checking out Urs Heckman's blog (not sure if it's been mentioned elsewhere on this forum, apologies if so) :

https://urs.silvrback.com/

Re: Zero Delay Feedback Filter

PostPosted: Fri Mar 04, 2016 10:03 am
by RJHollins
Thanks for the LINKS Guys !
8-)