Login / Register  0 items | $0.00 New#KVRDeals
mystran
KVRAF
 
4597 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Sun Mar 19, 2017 10:18 am Re: Why modulating Peak filter introduce signal/harmonics?

Nowhk wrote:The filters are the ones within Sytrus, made by "gol" (not a random DSP idiot).


In Sytrus the "res" setting for "peak" type is essentially inverted with respect to the other types, in the sense that low knob values give a narrow bandwidth (= high Q) where as for resonant types high values of "res" knob map to higher Q.

So essentially you have to compare a "peak" with low "res" knob position to "lowpass" with high "res" knob position to get an "apples to apples" comparison (in which case the low-pass has the same behavior). Similarly if you set a wide peak (=low Q), it will be "clean" just like a low-resonance low-pass filter.

This is probably what is happening in other plugins too, since peaking filters are typically parameterized for bandwidth rather than resonance, which then results in same actual "Q" values at the opposite ends of the knob if the same control is used for both.
Image <- plugins | forum
User avatar
aciddose
KVRAF
 
11533 posts since 7 Dec, 2004

Postby aciddose; Sun Mar 19, 2017 1:03 pm Re: Why modulating Peak filter introduce signal/harmonics?

mystran wrote:
aciddose wrote:The control might as well have been named "pink flamingo multiplication rate".


There birds are red (rather than pink) though.


That's just it, the name of the control doesn't need to be even remotely accurate! :hihi:
Xhip Synthesizer v8 (WinXP, Linux and MacOS alpha versions are available.)
Xhip Effects bundle v6.7 New: Resizable/skinnable/configurable GUI. (Linux and MacOS alpha versions are available.)
User avatar
aciddose
KVRAF
 
11533 posts since 7 Dec, 2004

Postby aciddose; Sun Mar 19, 2017 1:04 pm Re: Why modulating Peak filter introduce signal/harmonics?

Nowhk wrote:Also biquad by RBJ for example...


Are you certain these aren't all identical RBJ biquad implementations? 9/10 plug-ins use this copy-pasted code without modification.
Xhip Synthesizer v8 (WinXP, Linux and MacOS alpha versions are available.)
Xhip Effects bundle v6.7 New: Resizable/skinnable/configurable GUI. (Linux and MacOS alpha versions are available.)
User avatar
BlitBit
KVRist
 
138 posts since 28 Nov, 2013, from Germany

Postby BlitBit; Sun Mar 19, 2017 1:39 pm Re: Why modulating Peak filter introduce signal/harmonics?

mystran wrote:
aciddose wrote:The control might as well have been named "pink flamingo multiplication rate".


There birds are red (rather than pink) though.

Which only shows that the "pink flamingo multiplication rate" has been set to zero for this image. :hihi:
User avatar
Nowhk
KVRian
 
703 posts since 2 Oct, 2013

Postby Nowhk; Tue Mar 21, 2017 11:05 am Re: Why modulating Peak filter introduce signal/harmonics?

mystran wrote:
Nowhk wrote:The filters are the ones within Sytrus, made by "gol" (not a random DSP idiot).


In Sytrus the "res" setting for "peak" type is essentially inverted with respect to the other types, in the sense that low knob values give a narrow bandwidth (= high Q) where as for resonant types high values of "res" knob map to higher Q.

So essentially you have to compare a "peak" with low "res" knob position to "lowpass" with high "res" knob position to get an "apples to apples" comparison (in which case the low-pass has the same behavior). Similarly if you set a wide peak (=low Q), it will be "clean" just like a low-resonance low-pass filter.

This is probably what is happening in other plugins too, since peaking filters are typically parameterized for bandwidth rather than resonance, which then results in same actual "Q" values at the opposite ends of the knob if the same control is used for both.

Yes, true :) They are inverted, I can hear the "tone" introduced by the low pass (during modulation) as well. Thanks for the help.

Now, two question (if you can help me):

1 - why this tone is introduced only if I modulate the filter? If I place it fixed and fc before/after the sine frequency, I dont hear/see any new "nearest" tone; only with modulation. Is background noise (added by the fc mod) excited and so raised by the res of the filter itself?

2 - what do you mean with "ringing" here? It seems to "ring" here even if the filter's res is not so higher to self-oscillate (which is what I generally call ringing).

Thanks again for the time you are spending to noob like me :wink:
matt42
KVRian
 
935 posts since 9 Jan, 2006

Postby matt42; Tue Mar 21, 2017 11:48 am Re: Why modulating Peak filter introduce signal/harmonics?

Nowhk wrote:1 - why this tone is introduced only if I modulate the filter? If I place it fixed and fc before/after the sine frequency, I dont hear/see any new "nearest" tone; only with modulation. Is background noise (added by the fc mod) excited and so raised by the res of the filter itself?
Yes.

Nowhk wrote:2 - what do you mean with "ringing" here? It seems to "ring" here even if the filter's res is not so higher to self-oscillate (which is what I generally call ringing).
A filter will ring and normally the ringing will decay. The amount of ringing will increase with increased resonance. At self oscillation the resonance is high enough that the ringing no longer decays.
mystran
KVRAF
 
4597 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Tue Mar 21, 2017 4:04 pm Re: Why modulating Peak filter introduce signal/harmonics?

Nowhk wrote:1 - why this tone is introduced only if I modulate the filter? If I place it fixed and fc before/after the sine frequency, I dont hear/see any new "nearest" tone; only with modulation. Is background noise (added by the fc mod) excited and so raised by the res of the filter itself?


This is typically because when the cutoff crosses over a signal frequency, the filter "picks up" some energy from the signal (that it then carries around even if you keep it moving). It can also happen (to a lesser extent) in some filters if the modulation itself introduces noise that modulates the signal (as the filter sees it) effectively creating harmonics on the frequency that the filter is sensitive to.. but see the next answer, things will make more sense afterwards.

2 - what do you mean with "ringing" here? It seems to "ring" here even if the filter's res is not so higher to self-oscillate (which is what I generally call ringing).


As the filter "Q" increased the filter will produce "ringing" or decaying oscillations. Essentially the input on the resonant frequency will excite the filter (which then stores some "energy") and the filter will release this over time. These decaying oscillations are essentially what makes us hear a boost (or cut) in the frequency response (it's a little more complicated than that I guess, but that's the basic idea).

The "Q" is essentially a measure of how long it takes for these oscillations to decay (in fact classic definition of Q relates to the decay of the oscillations directly, but modern practice uses a related mathematical measure that also works for the very low Q cases where no actual cycles occur). This makes the frequency that the filter acts on more specific (and the other way: any narrow filter will create some ringing, it's just how the time-frequency duality works). Once the "Q" is increased to infinity the decay becomes infinite as well and the filter self-oscillates (ie. does not decay anymore) and the filter will act as a sine-wave oscillator, specific to just that one frequency alone (assuming that it's somehow amplitude-limited such that it doesn't simply blow up; "over infinite" Q will cause it to "grow" instead of decay and the "exactly keep it's amplitude" case is generally unstable).

However, the important thing to understand is that there is a continuum from a very wide filter (no ringing at all) through minimal ringing that we don't really hear as such, to sinusoidal tails that decay over multiple seconds, all the way to where the filter keeps "ringing" from time to eternity. The basic rule of thumb though is that filters that are very specific to a narrow bandwidth (or very steep in their transitions) will create long ringing (even though they don't self oscillate unless you try to make them so narrow that they only cover a specific frequency), while "smooth" filters acting gradually over wide ranges will have very little ringing (ie. often so little that they don't even complete a single cycle).

Hopefully this helps.
Image <- plugins | forum
JCJR
KVRAF
 
2156 posts since 17 Apr, 2005, from S.E. TN

Postby JCJR; Thu Mar 23, 2017 11:02 am Re: Why modulating Peak filter introduce signal/harmonics?

Hi Nowhk

Maybe it was already mentioned, but of course these causal IIR filters of any type, lp, hp, bp, ap etc-- They all have phase shift. The phase viewed on a graph generally descending from low to high frequencies. For instance a highpass might typically have positive phase shift at low frequencies approaching zero phase shift at high frequencies. A bandpass might have positive phase at low frequencies, zero phase at the center frequency, and negative phase at high frequencies. But all of them have that same-direction of phase shift, a slope descending from left to right.

If you modulate the cutoff or center frequency of any of the filter types, the phase shift curve shifts up and down tracking the cutoff frequency.

If you sweep the filter downward, it will "twitch" harmonics flat in pitch. Sweeping the filter up will twitch harmonics sharp in pitch. The more-drastic the phase shift, the stronger the transient pitch shift. High-Q filters bunch the phase shift near the filter center frequency, so if you compare filter sweeps of the same speed, high-Q filters will twitch harmonic pitches more drastically because the phase changes faster for each harmonic as the filter sweeps thru each harmonic.

Similarly, if you compare filters of the same Q, swept at different rates-- The slow sweeps will have small amounts of transient pitch shift and faster sweeps will have larger amounts of transient pitch shift.

If you compare a high-order filter with a lower order filter, each with the same nominal Q, perhaps butterworth, the high-order filter has more total phase shift and so it will modulate pitch stronger than the lower-order filter, if both are swept at the same rate.

Filter-sweeping a harmonic-rich source such as sawtooth wave, each of the harmonics gets "twitched" in series as the filter moves thru them. Sweeping down, first the high harmonics briefly go flat and return to normal pitch as the middle harmonics briefly go flat, and as the middle harmonics are returning to normal pitch the lower harmonics briefly go flat before returning to normal pitch. Sweeping up, the harmonics get twitched sharp, in sequence from low harmonics to high harmonics.

So during the sweep, even with a single-pitch single oscillator, some of the harmonics are out-of-tune with other harmonics in the tone. The ear can hear it, and a FFT display will show "frequency smear" even on pure tones.
matt42
KVRian
 
935 posts since 9 Jan, 2006

Postby matt42; Fri Mar 24, 2017 9:46 am Re: Why modulating Peak filter introduce signal/harmonics?

Nice post, JCJR. I don't think it explains much about the OPs observations, but I found it interesting - I'd never really considered the phase modulation effects of sweeping an IIR filter.
User avatar
Nowhk
KVRian
 
703 posts since 2 Oct, 2013

Postby Nowhk; Sun Mar 26, 2017 2:45 am Re: Why modulating Peak filter introduce signal/harmonics?

mystran wrote:As the filter "Q" increased the filter will produce "ringing" or decaying oscillations. Essentially the input on the resonant frequency will excite the filter (which then stores some "energy") and the filter will release this over time. These decaying oscillations are essentially what makes us hear a boost (or cut) in the frequency response (it's a little more complicated than that I guess, but that's the basic idea).

The "Q" is essentially a measure of how long it takes for these oscillations to decay (in fact classic definition of Q relates to the decay of the oscillations directly, but modern practice uses a related mathematical measure that also works for the very low Q cases where no actual cycles occur). This makes the frequency that the filter acts on more specific (and the other way: any narrow filter will create some ringing, it's just how the time-frequency duality works). Once the "Q" is increased to infinity the decay becomes infinite as well and the filter self-oscillates (ie. does not decay anymore) and the filter will act as a sine-wave oscillator, specific to just that one frequency alone (assuming that it's somehow amplitude-limited such that it doesn't simply blow up; "over infinite" Q will cause it to "grow" instead of decay and the "exactly keep it's amplitude" case is generally unstable).

Very nice explanation of what "res" is in a filter. I learnt a lot.

I always see it just a "peak" around the cut of frequency. Never think about that filter "pick" energy and release during the time.

This explain here why, when I cross the sine, it "ring" making a sweep effect: it picks energy from the sine (the oscillations you were talking about) and release them during the time. It also explain why this "drop" fade out during the time, and not become a "parallel" sine (i.e. decaying time). Thanks to clarify this, it gives to me some inspirations for the synth I'm making.

Another thing I've noticed (testing again peak filter): if I use a low res (narrow bw), it "picks up" only a small range of frequencies (the image above; sort of sine sweep). If I choose a high res (wide bw), when it cross the sine wave, it introduces many other harmonics that drop down. But that's normal: follow your knowledge, since bw is wider now, it "creates" a wide range of oscillations (energy) that decay during the time, not just a "narrow" range ;)

JCJR wrote:Maybe it was already mentioned, but of course these causal IIR filters of any type, lp, hp, bp, ap etc-- They all have phase shift.

Phase shift on IIR is somethings I never really catch in terms of "what happens behind the games".
This for example is a graph that I don't understand.

Time to learn a bit about this, so maybe I can understand why "transient pitch shift" is related to the "energy" that filter picks up when I modulating a filter cut off :wink: Thanks for your always brilliant supports.
JCJR
KVRAF
 
2156 posts since 17 Apr, 2005, from S.E. TN

Postby JCJR; Wed Mar 29, 2017 2:05 pm Re: Why modulating Peak filter introduce signal/harmonics?

Nowhk wrote:
JCJR wrote:Maybe it was already mentioned, but of course these causal IIR filters of any type, lp, hp, bp, ap etc-- They all have phase shift.

Phase shift on IIR is somethings I never really catch in terms of "what happens behind the games".
This for example is a graph that I don't understand.

Time to learn a bit about this, so maybe I can understand why "transient pitch shift" is related to the "energy" that filter picks up when I modulating a filter cut off :wink: Thanks for your always brilliant supports.

Hi Nowhk

Your linked picture shows a "phase-wrapped" plot. It appears to be wrapped at +/- 90 degrees but I could be mistaken. More typically, so far as I recall, such charts will wrap at +/- 180 degrees. Or sometimes even +/- 360 degrees.

It is common to wrap phase charts to accommodate phase plots which have A LOT of phase shift, so that the charts can show decent detail without being incredibly tall. If you see a phase hit bottom and instantly jump to the top (or vice-versa) you could take pencil and paper and draw a taller version of the chart, connecting the top of the discontinuous point to the bottom of the "sudden jump" or vice-versa, and it would show a smooth "non-jumpy" phase curve on a much taller graph. The phase curve isn't (usually) really suddenly jumping between the rails. It is just hitting the top and continuing from the bottom or vice-versa.

A phase shift of 180 degrees is the same as inverting the signal, multiplying all the samples by -1.0. And a phase of 360 degrees is in some ways "the same as a phase of 0 degrees, or 720 degrees, or whatever. The circle keeps going round and round.

It is tricky to grock in its entirety and I wish I had better understanding. Phase shift also causes group delay. Some frequencies get delayed more than other frequencies.

But the frequencies of biggest phase shift are not necessarily the frequencies with the biggest delay. For instance (a very non-rigorous explanation follows) if we delay 1000 Hz by 90 degrees (a quarter wave period), it would be about 1 ms / 4 = 0.25 ms delay. But if we are simultaneously delaying 100 Hz by 45 degrees (an eighth of the wave period), then the 100 Hz would have about 10 ms / 8 = 1.25 ms delay. So in this situation, the higher frequency would have bigger phase shift, but the lower frequency would have bigger delay because that smaller phase shift is getting applied to a longer wave period.

Like FFT, phase shift is often visualized as the effect on an "indefinite duration" repeating waveform. When audio changes, if the pitch or timbre changes, or when notes start or stop, the behavior around the change boundaries is more complicated. For instance if you feed a sine wave into a filter, then after the sine has been running for a few cycles you can measure amplitude and phase of the output vs the input after everything has settled. But the first few cycles after the sine wave starts, and the first few cycles after the sine wave stops, the phase shift and frequency is still happening but it is hard to see the exact effect until the system "settles down". I suppose someone with sufficient expertise and practice would generally "know what to expect" when certain audio is started, stopped, or changed when fed into certain filters.

Of note-- The phase plots of lowpass, highpass, bandpass, allpass, notch are "fairly simple" things and generally move in one vertical direction from left to right as viewed on a phase plot. But peaking and shelving filters have less predictable phase plots. They have phase shift curves fer sure but the behavior is not "cut and dried" like the above simple lowpass or highpass. Peaking and shelving filters can have "non-intuitive" looking phase plots unless you look at them long enough to know what to expect.

When you sweep a synth filter down, the phase shift gets progressively greater at any fixed tone frequency in the sweeep range. So each new instant of the waveform gets slowed down, delayed a little more as the phase is significantly (negatively) increased. So that slight moment-to-moment increase in the delay causes the pitch to play flat while the filter is moving down, but after the sweep stops (or moves far enough past the tone frequency until phase isn't changing very much, moment-to-moment) the tone pitch would return to normal. It is still being delayed by the new filter phase, but the delay is constant after the filter stops moving.

The same happens on an upward sweep. As the phase sweeps up in frequency, the moment-to-moment delay is constantly decreasing, causing the tone to momentarily go sharp. Each wave period gets "crowded together" a little closer so long as significant phase shift is happening at that tone's frequency.

Perhaps a good simple demo of the effect would be a classic old subtractive synth flute patch. Flutes have a little bit of tremolo and a little bit of vibrato. Sometimes "not bad" flute patch could be made using a single triangle wave oscillator, fed to a lowpass filter. Adjust the lowpass filter to 1:1 track the keyboard, and tune the lowpass filter "somewhere in the ballpark" of the triangle wave pitch. Modulate the filter with an LFO.

Because the triangle wave is mellow, the timbre changes a little bit as the filter wobbles up and down, but it is subtle timbre change. Similarly, the volume of the triangle wave subtly goes up and down making a tremolo component, because the filter is modulating the amplitude of the mellow tri wave as much as it is modulating the timbre. And also the up-n-down filter modulation imparts a subtle pitch vibrato to the tri wave. So you simultaneously get subtle timbre, tremolo and vibrato with just the LFO-modulated lowpass filter.
mystran
KVRAF
 
4597 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Wed Mar 29, 2017 2:19 pm Re: Why modulating Peak filter introduce signal/harmonics?

JCJR wrote:
Nowhk wrote:
JCJR wrote:Maybe it was already mentioned, but of course these causal IIR filters of any type, lp, hp, bp, ap etc-- They all have phase shift.

Phase shift on IIR is somethings I never really catch in terms of "what happens behind the games".
This for example is a graph that I don't understand.

Time to learn a bit about this, so maybe I can understand why "transient pitch shift" is related to the "energy" that filter picks up when I modulating a filter cut off :wink: Thanks for your always brilliant supports.

Hi Nowhk

Your linked picture shows a "phase-wrapped" plot. It appears to be wrapped at +/- 90 degrees but I could be mistaken. More typically, so far as I recall, such charts will wrap at +/- 180 degrees. Or sometimes even +/- 360 degrees.


It's not a wrapped plot, rather it's a notch filter and those tend to have a phase-discontinuity at the notch frequency. As the gain goes to zero it then changes sign on the other side which results in a 180 degrees jump in the phase plot.

Ps. It's worth noting that the actual complex response (eg. if you think of it as a 2D vector or a+i*b) is continuous, it just passes through the zero where the phase is not really defined.
Last edited by mystran on Wed Mar 29, 2017 2:24 pm, edited 1 time in total.
Image <- plugins | forum
JCJR
KVRAF
 
2156 posts since 17 Apr, 2005, from S.E. TN

Postby JCJR; Wed Mar 29, 2017 2:22 pm Re: Why modulating Peak filter introduce signal/harmonics?

Thanks mystran.
Previous

Moderator: Moderators (Main)

Return to DSP and Plug-in Development