## Why modulating Peak filter introduce signal/harmonics?

Nowhk
KVRian

732 posts since 2 Oct, 2013
Hi all,

some days ago during some sound experimentations, I've noticed that if I take a white noise and I modulate a peak filter (moving cut off) over it (with short bandwidth and high gain), I can get a sort of sweeping sine (which sound similar to a basic kick that drop-pitch):

That's almost normal: it will "increase" (for the width of the peak) the sound that peak "over" and give that illusion.
Now, if I switch the OSC source to a simple sine wave, magically I can hear the same sweeping sine:

How this can be possible? I aspect (as for other filters) that when the "peak" go over the sine wave, it just increase (peak) or decrease (notch) the current signal. Instead it seems that it take with "peak" some sound from sine, gain it and trasport alongside the modulation slope these "captured" bits. Its almost able to "duplicate" the sine and sweep one of these.

Tried different digital filters/plugins: it always happens with peak/notch filters only, even if in different ways of course.

What's the DSP "side-effect" behind this?
PurpleSunray
KVRian

774 posts since 13 Mar, 2012
Well.. modulating a peak filter creates a phaser effect.
That is what you hear.

https://en.wikipedia.org/wiki/Phaser_(effect)
matt42
KVRian

994 posts since 9 Jan, 2006
Modulating a filter will cause non-linearities. For example a low pass filter:

Code: Select all
`output = coefficient * (output - input) + input;`

If we modulate the coefficient we can think of that as a signal rather than a static value. The coefficient signal will contain all kinds of harmonics depending on how it's modulated. Then its multiplied with output-input which will also generate new harmonics. Luckily in a low pass a fair chunk of the noise could well be filtered out by the filter itself. In the case of peak or notch the noise might be more obvious. Also doing sine sweeps, or just a simple sine, this kind of noise will be more audible that for a broadband signal, I'd guess.

Just something random: I saw a paper that described using modulated all pass filters to generate complex wave forms from a sine input - they were taking advantage of these non linearities.
Nowhk
KVRian

732 posts since 2 Oct, 2013
matt42 wrote:Modulating a filter will cause non-linearities. For example a low pass filter:

Code: Select all
`output = coefficient * (output - input) + input;`

If we modulate the coefficient we can think of that as a signal rather than a static value. The coefficient signal will contain all kinds of harmonics depending on how it's modulated. Then its multiplied with output-input which will also generate new harmonics. Luckily in a low pass a fair chunk of the noise could well be filtered out by the filter itself. In the case of peak or notch the noise might be more obvious. Also doing sine sweeps, or just a simple sine, this kind of noise will be more audible that for a broadband signal, I'd guess.

Just something random: I saw a paper that described using modulated all pass filters to generate complex wave forms from a sine input - they were taking advantage of these non linearities.

Does this means that modulating a peak filter will always result in a lot of noise added as a sort of "self-osc"?
If I modulate a low/high filter I can't hear it. With Peak I can hear it clearly... (just looks at the noise one, which the whole band is filled)...
matt42
KVRian

994 posts since 9 Jan, 2006
Nowhk wrote:With Peak I can hear it clearly... (just looks at the noise one, which the whole band is filled)...
If you're talking about the white noise filtered with a peak filter then yes, it should
sound like a phasor kind of effect as was mentioned earlier. All that's happening is you're boosting a narrow band of frequencies which will be perceived as a pitched tone and then sweeping that tone around. This has nothing to do with modulation noise though.

In general a modulated filter will produce low level noise, it shouldn't be like self oscillation at all.
aciddose
KVRAF

11810 posts since 7 Dec, 2004
You're suffering from a simple mistaken assumption.

No filter has an exact "frequency" or "cutoff".

The bandwidth for which energy is absorbed by the filter is very wide. In fact it is never zero!

So even if you have your filter sweeping around 1-2k with a sine playing up at 20k the filter will still absorb some energy and oscillate on its own.

Not to mention the oscillation pulses you're generating by modulating the frequency. For example we're dealing with a discrete system and most likely the frequency is specified on a per-sample basis. This means there is a jagged stair-case edge with harmonics at multiples of the sampling frequency.

You should be well aware that a DC pulse contains all frequency components much like any impulse. If you input such a pulse into a filter it will oscillate.

Likewise these high-frequency pulses on each sample contain some energy themselves.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
matt42
KVRian

994 posts since 9 Jan, 2006
Yes, it will generate tones. These are oscillating sine waves, so we can call that "self oscillation". But in the context of the OPs posts, I'm guessing he's talking about a very obvious pitched tone when talking about "self-osc". The context being sweeping a peak filter over white noise and the fact that the term self oscillation usually refers to a pitched tone generated by a filter. That's how I was looking at it.
aciddose
KVRAF

11810 posts since 7 Dec, 2004
Sorry, my post was not a direct response to yours. I should make that more clear by typing "To the OP;" or similar.

Regarding what I was talking about; in certain implementations it is possible to see oscillation when modulating the frequency of a filter processing a null/silent input. That's not too common but does also happen.

For many other filters the signal level depends upon the energy input into the filter from various sources. If you think of it like a pendulum in a clock, the pendulum doesn't need to have much energy added per cycle to make up for losses because it's a highly resonant system. If the little ticks from the escapement add more per cycle than the loss the oscillation actually grows over time!

In this case however it is of note that there are wide impulses represented in the spectrum when the frequency suddenly shifts during the ramp reset. Also note that the level seems to (if I read the graph correctly, assumptions) decay as expected between these impulses. So based upon that my conclusion is that most likely the source of the oscillation is mostly due to the implementation of the filter allowing some feed-thru of parameter modulation. This isn't a bad thing, it's just one of many consequences of all the different factors at play.

In an analog filter the control signal for frequency would very likely (rarely if ever not) pass directly through much like this and you would get a very similar if not identical effect.

So the issue is simply in making the assumption that such a filter is "simple" and ignoring countless factors that influence its behavior. It isn't surprising in the least that a resonant system would oscillate when energy is input into that system. The opposite would be most surprising in fact if the system didn't have a response to that energy input.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
Nowhk
KVRian

732 posts since 2 Oct, 2013
matt42 wrote:If you're talking about the white noise filtered with a peak filter then yes, it should
sound like a phasor kind of effect as was mentioned earlier. All that's happening is you're boosting a narrow band of frequencies which will be perceived as a pitched tone and then sweeping that tone around.

Yes, talking about white noise as source makes sense, as I said. But why this also happens when the source is a sine? Theresn't a narrow band of frequencies when filtering "nothing" (i.e. when the peak band is outside the sine frequency).
So it should boost "nothing"

aciddose wrote:You're suffering from a simple mistaken assumption.

No filter has an exact "frequency" or "cutoff".

The bandwidth for which energy is absorbed by the filter is very wide. In fact it is never zero!

So even if you have your filter sweeping around 1-2k with a sine playing up at 20k the filter will still absorb some energy and oscillate on its own.

I agree... but why this happens only on peak filter? If I modulare a low pass, I dont see any tones popping out around the sine frequency when modulating over it; just an obvious fade in/out of the source sine, when the modulated fc "enter/exit" around the sine frequency...
aciddose
KVRAF

11810 posts since 7 Dec, 2004
Too complex a question to answer without a whole lot more information and to be honest not worth the effort.

Just accept that it does what it does.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
mystran
KVRAF

4795 posts since 11 Feb, 2006, from Helsinki, Finland
Nowhk wrote:I agree... but why this happens only on peak filter? If I modulare a low pass, I dont see any tones popping out around the sine frequency when modulating over it; just an obvious fade in/out of the source sine, when the modulated fc "enter/exit" around the sine frequency...

Do you use the same Q values for both?

Most likely you have a much higher Q with your peak that would result in excessive resonance with a low-pass filter. The same behaviour is almost certainly there in both filters if they are implemented the same way, but higher Q results in much longer ringing. If one of the filters (eg. the lowpass) has much lower Q, then the ringing decays much faster and might not be noticeable at all.

I'd also like to emphasise that the actual peak-gain at the resonant frequency is NOT important, only the actual Q. For example, a notch filter has zero gain at resonance, but if it has a high Q it will still ring like crazy.
<- plugins | forum
Nowhk
KVRian

732 posts since 2 Oct, 2013
mystran wrote:
Nowhk wrote:I agree... but why this happens only on peak filter? If I modulare a low pass, I dont see any tones popping out around the sine frequency when modulating over it; just an obvious fade in/out of the source sine, when the modulated fc "enter/exit" around the sine frequency...

Do you use the same Q values for both?

Most likely you have a much higher Q with your peak that would result in excessive resonance with a low-pass filter. The same behaviour is almost certainly there in both filters if they are implemented the same way, but higher Q results in much longer ringing. If one of the filters (eg. the lowpass) has much lower Q, then the ringing decays much faster and might not be noticeable at all.

I'd also like to emphasise that the actual peak-gain at the resonant frequency is NOT important, only the actual Q. For example, a notch filter has zero gain at resonance, but if it has a high Q it will still ring like crazy.

Funny: in both filters I've used very low RES
If I increment res and gain in peak I Just put It more noticeable. With LP this doesn't happens at all...
aciddose
KVRAF

11810 posts since 7 Dec, 2004
So you're using a crappy plug-in that doesn't allow you to set the Q value based upon a valid measurement technique to duplicate characteristics across filter types.

Try asking yourself this question: why not? Why not have "0% res" oscillate wildly? Apparently the author of your plug-in thought it wouldn't be a bad idea.

You just need to realize that "res" doesn't actually mean anything. Are you adjusting the amount of a resource? Or maybe a resorption factor? Or perhaps the depth of a reservoir!

The control might as well have been named "pink flamingo multiplication rate".

Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
mystran
KVRAF

4795 posts since 11 Feb, 2006, from Helsinki, Finland
aciddose wrote:The control might as well have been named "pink flamingo multiplication rate".

There birds are red (rather than pink) though.
<- plugins | forum
Nowhk
KVRian

732 posts since 2 Oct, 2013
The filters are the ones within Sytrus, made by "gol" (not a random DSP idiot).

Its not that RES transfer bad between filters types. In LP It just not "ringing" at all in a way that introduce new tones... I just ask why It happens only with peak.

Anyway, on every filters I tried this happens. Also biquad by RBJ for example... or cableguys ones...
Next

Moderator: Moderators (Main)