12 posts

Page

**1**of**1**- KVRian
- 1397 posts since 13 Oct, 2003, from Prague, Czech Republic

I'm testing different self made filter structures. I've noticed that getting the resonant peak to stay in place when you ramp up the resonance is a hit and miss process. By "staying in place" I mean that you don't hear audible movement in the resonant frequency when the resonance parameter changes during the last 15% before self oscillation.

Even Moog filter's transfer function bode plot shows some movement in the location of the resonant peak, but you don't hear it in practise. So what's the difference? Obviously some filter structures make the resonant peak move much more than the others.

What techniques do you use to tweak the filter structures so that the resonance will stay nicely in place? Scaling the different resonance feedback paths makes the peaks move differently. Do you find some suitable multiplier values for them? If you do, what method do you use to find them? Do you use some other approach?

Even Moog filter's transfer function bode plot shows some movement in the location of the resonant peak, but you don't hear it in practise. So what's the difference? Obviously some filter structures make the resonant peak move much more than the others.

What techniques do you use to tweak the filter structures so that the resonance will stay nicely in place? Scaling the different resonance feedback paths makes the peaks move differently. Do you find some suitable multiplier values for them? If you do, what method do you use to find them? Do you use some other approach?

- KVRAF
- 4948 posts since 11 Feb, 2006, from Helsinki, Finland

Kraku wrote:I'm testing different self made filter structures. I've noticed that getting the resonant peak to stay in place when you ramp up the resonance is a hit and miss process. By "staying in place" I mean that you don't hear audible movement in the resonant frequency when the resonance parameter changes during the last 15% before self oscillation.

Some more detail would be useful. When you say "self made structure" are we talking about analog structures (eg. by implicit trapezoidal) or purely digital structures? From transfer function point of view, the resonance stays in place when your resonance control doesn't affect the angular frequency of the resonant poles, but what that means for any given structure depends on the details of the structure.

Even Moog filter's transfer function bode plot shows some movement in the location of the resonant peak, but you don't hear it in practise. So what's the difference? Obviously some filter structures make the resonant peak move much more than the others.

This is actually an interesting odd-ball 'cos strictly speaking for the linear model the poles move in straight lines rather than circles, so the dominant poles goes first down in frequency until Q=sqrt(.5) and then up in frequency again... but I'd guess the second set of poles ends up balancing the response (mostly for fairly low resonance) such that it still sounds all-right and at high resonance the linear trajectory is probably close enough to not really be that obvious.

That said... once you actually have a proper Moog-ladder, the non-linearities DO push the resonance around in frequency in ways that is very audible with high input gain. Simplified, the harder you push against the embedded non-linearities the lower the frequency, but it potentially varies a lot over the input waveform cycle.

What techniques do you use to tweak the filter structures so that the resonance will stay nicely in place? Scaling the different resonance feedback paths makes the peaks move differently. Do you find some suitable multiplier values for them? If you do, what method do you use to find them? Do you use some other approach?

The "correct" method would be to make the resonance a parameter in the transfer function and then just solve what values you want. The other alternative is to fit some tuning correction like a low-order poly if the tuning isn't too bad to begin with. Keep in mind though that getting the tuning right is not the only thing you need to worry with custom structures as you might also want to analyse the state-space to make sure the internal gains of the state variables are independent of your tuning (which is usually WAY easier to do if you design in analog and use trapezoidal integration to maintain the structure), otherwise you'll also find gain modulation problems when you start sweeping the cutoff fast enough.

But like.. it's a bit hard to really be very specific without any idea of what type of structure you're trying to make.

<- plugins | forum

- KVRian
- 946 posts since 11 Apr, 2002

I'm not sure there is a perfect solution to the problem. One question is the definition of the resonant frequency. Is this the peak of the amplitude response? Or is this the frequency of the transient ringing? Even for a 2-pole lowpass these two things do not coincide. Furthermore, as the damping of the 2-pole increases from zero, the resonant peak moves further and further away from the transition band, approaching DC as the damping approaches 1/sqrt(2), at which point the peak disappears. This means, if you try to keep the peak frequency constant, the position of the transition band will change, increasing the perceived filter's cutoff. Maybe some filters of higher orders can behave better in this regard, but probably none can really decouple amplitude response peak height from its position relatively to the transition band.

- KVRian
- 1397 posts since 13 Oct, 2003, from Prague, Czech Republic

mystran wrote:Some more detail would be useful. When you say "self made structure" are we talking about analog structures (eg. by implicit trapezoidal) or purely digital structures? From transfer function point of view, the resonance stays in place when your resonance control doesn't affect the angular frequency of the resonant poles, but what that means for any given structure depends on the details of the structure.

Yes, analog structures which are then discretized as described by Vadim in his book.

That said... once you actually have a proper Moog-ladder, the non-linearities DO push the resonance around in frequency in ways that is very audible with high input gain. Simplified, the harder you push against the embedded non-linearities the lower the frequency, but it potentially varies a lot over the input waveform cycle.

The resonance peak movement I'm talking about can also be seen in bode plots. An example of this is at the end of this post.

The "correct" method would be to make the resonance a parameter in the transfer function and then just solve what values you want.

I think I'll see what happens when I try this approach.

The other alternative is to fit some tuning correction like a low-order poly if the tuning isn't too bad to begin with. Keep in mind though that getting the tuning right is not the only thing you need to worry with custom structures as you might also want to analyse the state-space to make sure the internal gains of the state variables are independent of your tuning (which is usually WAY easier to do if you design in analog and use trapezoidal integration to maintain the structure), otherwise you'll also find gain modulation problems when you start sweeping the cutoff fast enough.

I'm not completely sure what you mean by "analyse the state-space to make sure the internal gains of the state variables are independent of your tuning".

Z1202 wrote:I'm not sure there is a perfect solution to the problem. One question is the definition of the resonant frequency. Is this the peak of the amplitude response? Or is this the frequency of the transient ringing? Even for a 2-pole lowpass these two things do not coincide. Furthermore, as the damping of the 2-pole increases from zero, the resonant peak moves further and further away from the transition band, approaching DC as the damping approaches 1/sqrt(2), at which point the peak disappears. This means, if you try to keep the peak frequency constant, the position of the transition band will change, increasing the perceived filter's cutoff. Maybe some filters of higher orders can behave better in this regard, but probably none can really decouple amplitude response peak height from its position relatively to the transition band.

With resonant peak I mean the whistling frequency you hear when the resonance gets near self oscillation. I quess this is the peak of the amplitude response?

mystran wrote:But like.. it's a bit hard to really be very specific without any idea of what type of structure you're trying to make.

I conjured up a new quickly made example of this issue (I don't have any of the old non-working ones saved anywhere).

Consider for example the filter structure in the attached image. It's a semi-random filter which I haven't actually tried implementing since it's just an example structure for this KVR post.

Transfer function: y3 = -g^3 / (g^3 (-1 + k2 + k1) + g^2 (-3 + 2 k2) s + g (-3 + k2) s^2 - s^3)

(hopefully I got the math right)

(As far as I understand, the inner feedback loop essentially just changes the one pole lowpass filter block's cutoff frequency. But ignore that for now...)

EXAMPLE 1:

k1 = -resonance

k2 = 0

Works wrong.

Resonant peak moves up when resonance gets larger. This is not a desired behavior.

Essentially the inner feedback loop ("k2") does not exist since the k2 is 0.

EXAMPLE 2:

k1 = -resonance / 2

k2 = resonance / 2

Almost works right.

The resonance peak is offset a fixed amount down from cutoff frequency, regardless of the amount of resonance. So the resonance stays in place, but in wrong place.

EXAMPLE 3:

k1 = -resonance

k2 = resonance / 2

Seems to work right.

Resonant peak stays quite well in place when resonance changes.

You do not have the required permissions to view the files attached to this post.

- KVRAF
- 4948 posts since 11 Feb, 2006, from Helsinki, Finland

Kraku wrote:The other alternative is to fit some tuning correction like a low-order poly if the tuning isn't too bad to begin with. Keep in mind though that getting the tuning right is not the only thing you need to worry with custom structures as you might also want to analyse the state-space to make sure the internal gains of the state variables are independent of your tuning (which is usually WAY easier to do if you design in analog and use trapezoidal integration to maintain the structure), otherwise you'll also find gain modulation problems when you start sweeping the cutoff fast enough.

I'm not completely sure what you mean by "analyse the state-space to make sure the internal gains of the state variables are independent of your tuning".

To be honest I'm not sure how to explain it any better, but basically this is a very common problem with digital structures, where in order to interpret the current signal store in the state variables you first need to know the cutoff. This in turn means that as you change the cutoff the interpretation of the state variable changes, which creates transient artifacts when you modulate the thing. Anyway, it's easy to check if you have a problem or not: just put some signal through the filter and make a square wave LFO modulate the cutoff a couple of octaves (eg. 5 or 6 should work). If you don't get any nasty transient spikes as the cutoff changes back and forth you're probably fine.

Z1202 wrote:I'm not sure there is a perfect solution to the problem. One question is the definition of the resonant frequency. Is this the peak of the amplitude response? Or is this the frequency of the transient ringing? Even for a 2-pole lowpass these two things do not coincide. Furthermore, as the damping of the 2-pole increases from zero, the resonant peak moves further and further away from the transition band, approaching DC as the damping approaches 1/sqrt(2), at which point the peak disappears. This means, if you try to keep the peak frequency constant, the position of the transition band will change, increasing the perceived filter's cutoff. Maybe some filters of higher orders can behave better in this regard, but probably none can really decouple amplitude response peak height from its position relatively to the transition band.

With resonant peak I mean the whistling frequency you hear when the resonance gets near self oscillation. I quess this is the peak of the amplitude response?

And here we run into a partially academic problem of how to define filter tuning. For sufficiently high Q the peak magnitude and resonant frequency will approach each other. For low Q you can't generally hear the exact tuning anyway. I'd generally vote for just using the resonant frequency really, because it's the transient ringing that has an obvious frequency for high Q, even if the amplitude was flat (eg. all-pass) or even zero at that frequency (eg. notch). Either way, for high Q where the tuning problems will be obvious, this whole question is really pretty academic.

Transfer function: y3 = -g^3 / (g^3 (-1 + k2 + k1) + g^2 (-3 + 2 k2) s + g (-3 + k2) s^2 - s^3)

Oh .. I see... well like.. factor that into a biquad and a one-pole, then find a parameterisation that moves the poles the way you want, then map back into the structure and keep your fingers crossed that you don't run into singularities for you intended parameter range. No real short-cuts here.

<- plugins | forum

- KVRAF
- 4948 posts since 11 Feb, 2006, from Helsinki, Finland

mystran wrote:Transfer function: y3 = -g^3 / (g^3 (-1 + k2 + k1) + g^2 (-3 + 2 k2) s + g (-3 + k2) s^2 - s^3)

Oh .. I see... well like.. factor that into a biquad and a one-pole, then find a parameterisation that moves the poles the way you want, then map back into the structure and keep your fingers crossed that you don't run into singularities for you intended parameter range. No real short-cuts here.

Actually you could also do it the other way around: you have one poles 1/(s*a + 1) and two pole 1/(s^2 + r*s + 1) where r = 1/Q. Multiplying together gives 1 / (a*s^3 + (a*r + 1)*s^2 + (a + r)*s + 1). Then you want to try to solve [a, g, k1, k2] so that the terms match. Since it's 4 unknown in 4 equations it should probably have a solution.

<- plugins | forum

- KVRian
- 946 posts since 11 Apr, 2002

And following the same argument of the difference being uncritical at low Q, I could propose a third, probably even more practical definition: to define the resonant frequency of a pole as the cutoff of the corresponding 2-pole filter (essentially the absolute magnitude of the analog pole). But I'm not fully sure if this "free room" in the definition doesn't have audible aspects if Q is high but not really selfoscillating. Particularly, maybe depending on the input material, the amplitude response peak could become more prominently audible than the pole ringing.mystran wrote:And here we run into a partially academic problem of how to define filter tuning. For sufficiently high Q the peak magnitude and resonant frequency will approach each other. For low Q you can't generally hear the exact tuning anyway. I'd generally vote for just using the resonant frequency really, because it's the transient ringing that has an obvious frequency for high Q, even if the amplitude was flat (eg. all-pass) or even zero at that frequency (eg. notch). Either way, for high Q where the tuning problems will be obvious, this whole question is really pretty academic.

Edit: as an example consider the sine at exactly the peak frequency as the filter's input. Then the output will be exactly this sine, killing all the transient response ringing in the process of convolution with the impulse response. What if the input is white noise? The signal at the peak frequency will be again more prominent than the transient ringing. etc.

Edit1: as an experiment one could build three different resonating 2-poles, one with the cutoff control as usual, one with the cutoff specifying the transient ringing frequency and one with specifying the peak frequency and compare the perceived tuning of resonance for different source material ("flat" vs. with transients)

- KVRAF
- 4948 posts since 11 Feb, 2006, from Helsinki, Finland

Z1202 wrote:And following the same argument of the difference being uncritical at low Q, I could propose a third, probably even more practical definition: to define the resonant frequency of a pole as the cutoff of the corresponding 2-pole filter (essentially the absolute magnitude of the analog pole).

I'm not sure I follow. Two-pole looks like P(s)/((s/w0)^2+(s/w0)/Q+1) for some arbitrary placement of zeroes P(s) and pole "cutoff" at w0. This places the pole pair at a circle of radius w0, except where Q<.5 in which case the "angle" from the real-axis becomes imaginary and we find two real poles with their geometric average equal to -w0.

I would imagine this is what 99% of all filters use, with the exception of shelves where it sort of makes sense to use the geometric average of pole and zero angles (since this gives you the mid-gain point for symmetric shelves and in general keeps the gain and frequency variables independent even in the non-symmetric case).

Or am I totally not understand what you mean?

<- plugins | forum

- KVRian
- 946 posts since 11 Apr, 2002

w0 is one possible definition of the resonant frequency (absolute magnitude of the pole), the other being the imaginary part of the pole, which defines the frequency of the transient ringing, the third one is the position of the amplitude response peak which is something like w0(1-2R^2) where R is damping.mystran wrote:Z1202 wrote:And following the same argument of the difference being uncritical at low Q, I could propose a third, probably even more practical definition: to define the resonant frequency of a pole as the cutoff of the corresponding 2-pole filter (essentially the absolute magnitude of the analog pole).

I'm not sure I follow. Two-pole looks like P(s)/((s/w0)^2+(s/w0)/Q+1) for some arbitrary placement of zeroes P(s) and pole "cutoff" at w0. This places the pole pair at a circle of radius w0, except where Q<.5 in which case the "angle" from the real-axis becomes imaginary and we find two real poles with their geometric average equal to -w0.

I would imagine this is what 99% of all filters use, with the exception of shelves where it sort of makes sense to use the geometric average of pole and zero angles (since this gives you the mid-gain point for symmetric shelves and in general keeps the gain and frequency variables independent even in the non-symmetric case).

Or am I totally not understand what you mean?

- KVRian
- 1397 posts since 13 Oct, 2003, from Prague, Czech Republic

Thank you, both of you

Hmm, Mystran's suggestion to try to solve the terms from one pole / two pole formula combination sounds like something I'll test.

Since we're on the topic:

Is there some "rule of thumb" kind of wisdom when the feedback needs to be negative and when positive? This information would speed up the design process quite a bit, since I would initially get at least the signs right.

Hmm, Mystran's suggestion to try to solve the terms from one pole / two pole formula combination sounds like something I'll test.

Since we're on the topic:

Is there some "rule of thumb" kind of wisdom when the feedback needs to be negative and when positive? This information would speed up the design process quite a bit, since I would initially get at least the signs right.

- KVRian
- 946 posts since 11 Apr, 2002

One could break the feedback path at the feedback point and consider the transfer function of the resulting structure. E.g. for a Moog ladder filter this is simply a series of 4 1-pole lowpasses. Now look at the phase response. If you want to boost the areas where your phase response is 0, use positive feedback. If you want to boost the areas where your phase response is 180, use negative feedback. For a Moog ladder we want to boost the area at the cutoff, where the phase response is 180, so we use negative feedback. If we replace two of the lowpasses with highpasses (to build "bandpass ladder"), the phase response in the middle will be 0, so don't use negative feedback. If you have multiple feedbacks things get more complicated.Kraku wrote:Thank you, both of you

Hmm, Mystran's suggestion to try to solve the terms from one pole / two pole formula combination sounds like something I'll test.

Since we're on the topic:

Is there some "rule of thumb" kind of wisdom when the feedback needs to be negative and when positive? This information would speed up the design process quite a bit, since I would initially get at least the signs right.

- KVRian
- 1397 posts since 13 Oct, 2003, from Prague, Czech Republic

Makes sense. Thank you