DSPRelated.com
Forums

Filter FM and sideband overload

Started by S0lo January 26, 2016
>Are you saying that you used a fixed frequency low-pass filter? Or are >you wazulating the resonant frequency with your sine wave? > >-- > >Tim Wescott
Not fixed frequency. Yes modulating with sine wave. When I fix the frequency or modulate with a LOW RATE wave, every thing is OK. Only at high rate modulation this happens. --------------------------------------- Posted through http://www.DSPRelated.com
>Are you saying that you used a fixed frequency low-pass filter? Or are >you wazulating the resonant frequency with your sine wave? > >-- > >Tim Wescott
Just to clarify, the resonant (cutoff) frequency is being modulated like this: cutoff = Cutoff Knob + Depth knob*sinwave The knobs are controlled manually. --------------------------------------- Posted through http://www.DSPRelated.com
You mentioned that even when there is no audio, you still have the same problem. In this case, is the input exactly 0? If so, then all the coefficient multiplications should result in 0 and then it shouldn't matter that the coefficients are modulating. So that might point to a coding error. 

Also, once the modulating frequency is large enough, you can't think in terms of a modulated filter anymore, but instead I would think of this as a bunch of mixers each producing sum and difference frequencies in a weird feedback loop. So I have no idea what might happen in that case. 

Bob
I know this is obvious, but just in case;  if you turn up the depth to very high levels , the cutoff could go negative, which results in positive feedback in the biquad. 

Bob
<radams2000@gmail.com> wrote:

>I know this is obvious, but just in case; if you turn up the depth to >very high levels , the cutoff could go negative, which results in >positive feedback in the biquad.
Good point. I may be criticized for recommending this, but if one uses a lattice/ladder topology (aka ARMA), and limits the lattice coefficients to be strictly in the range (-1,1), the filter is stable. This comes at an expense of ~50% overhead in multiply operations. Steve
On Thu, 28 Jan 2016 07:40:42 -0800 (PST), radams2000@gmail.com wrote:

>You mentioned that even when there is no audio, you still have the same pro= >blem. In this case, is the input exactly 0? If so, then all the coefficient= > multiplications should result in 0 and then it shouldn't matter that the c= >oefficients are modulating. So that might point to a coding error.=20 > >Also, once the modulating frequency is large enough, you can't think in ter= >ms of a modulated filter anymore, but instead I would think of this as a bu= >nch of mixers each producing sum and difference frequencies in a weird feed= >back loop. So I have no idea what might happen in that case.=20 > >Bob
To the second point, without being able to see what's happening but only going by the description, it sounds to me like there may be tone and aliasing products converging, which will give a perceived jump when they all add together. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Thursday, January 28, 2016 at 9:50:33 AM UTC+1, S0lo wrote:
> > Not fixed frequency. Yes modulating with sine wave. When I fix the > frequency or modulate with a LOW RATE wave, every thing is OK. Only at > high rate modulation this happens.
That does not surprize me. You are not supposed to change the IIR parameters that fast -- even for simple biquads. And even if you manage to implement a filter that can handle these rapid parameter changes what you're basically doing by appliying it to a saw tooth signal is amplitude modulation of all the harmonics with some kind of smoothed rectangular waveform (each harmonic gets its own modulator due to them having different frequencies). So, you're effectively multiplying two signals that have lots of harmonics. This creates lots of frequencies everywhere and most of them can't even be represented unless you operate at a very high sampling rate that is much much higher than the modulation rate. So, you'd end up with lots of aliasing. If you do these kinds of nonlinear things that create many other possibly higher frequencies, oversampling is usually a good idea to keep the audible spectrum clean(er) of spurious harmonics. But for a modulation rate of 20 kHz, the oversampling factor of 4 most likely won't cut it. I suggest to change the strategy and look for another way of doing sound synthesis or to limit the rate at wich the cutoff parameter changes. Cheers! SG
SG  <s.gesemann@gmail.com> wrote:

>That does not surprize me. You are not supposed to change the IIR >parameters that fast -- even for simple biquads.
I think for the OP to get the desired effect, they need to do this. There is another way of getting around some of the undesired artifacts of using a time-varying IIR. Suppose that for a given sample the desired IIR, which is causal, has an impulse response h(t), which is nonzero for t = 0,1,2 ... infinity, and zero for t < 0. Pick some n so that most of the power in h() is within h(u) where u = 0, 1, 2 ... n-1. Then create an IIR g() such that g(t) = h(t+n) for t = 0, 1, 2 ... infinity, and zero for t < 0. Finally define an FIR f(t) = h(t) for t = 0,1,2 .. n-1 and f(t) = 0 for t >= n and t < 0. The filter f() + (z^-n)g() has the same impulse response as the original h() but only a fraction of the power (depending on the choice of n) is emitted from the (potentially ill-behave) IIR section. This hybrid FIR/IIR filter should (or at least, might) be better behaved than the original IIR under the condition of the coefficients being modulated. Steve
>You mentioned that even when there is no audio, you still have the same >problem. In this case, is the input exactly 0? If so, then all the >coefficient multiplications should result in 0 and then it shouldn't
matter that the
>coefficients are modulating. So that might point to a coding error. > >Also, once the modulating frequency is large enough, you can't think in >terms of a modulated filter anymore, but instead I would think of this as
a
>bunch of mixers each producing sum and difference frequencies in a weird >feedback loop. So I have no idea what might happen in that case. > >Bob
No the input is not exactly 0, I add a very small random number (-1^-12 to 1^-12 range) to avoid denormals which slow the CPU significantly if let them. I just tried the test WITHOUT than random number (exactly 0) and no problem here, output completely silenced. The thing here is, from a musical perspective, it doesn't matter what I you do as long as it sounds good, or at least useful for a sound designer. The thing that strikes me is that there are two or three other software synthesizers doing it beautifully.
>I know this is obvious, but just in case; if you turn up the depth to
very
>high levels , the cutoff could go negative, which results in positive >feedback in the biquad. > >Bob
I do limit the cutoff freq. to a minimum of 0.0009 * sample_rate/2. Although I think I do see some sidebands reflecting back when they hit near 0!!!. Still the jumps happen even before reflecting back. --------------------------------------- Posted through http://www.DSPRelated.com
>SG <s.gesemann@gmail.com> wrote: > >>That does not surprize me. You are not supposed to change the IIR >>parameters that fast -- even for simple biquads. > >I think for the OP to get the desired effect, they need to do this. > >There is another way of getting around some of the undesired >artifacts of using a time-varying IIR. > >Suppose that for a given sample the desired IIR, which is causal, has >an impulse response h(t), which is nonzero for t = 0,1,2 ... infinity, >and zero for t < 0. > >Pick some n so that most of the power in h() is within h(u) where >u = 0, 1, 2 ... n-1. Then create an IIR g() such that >g(t) = h(t+n) for t = 0, 1, 2 ... infinity, and zero for t < 0. > >Finally define an FIR f(t) = h(t) for t = 0,1,2 .. n-1 and f(t) = 0 >for t >= n and t < 0. > >The filter f() + (z^-n)g() has the same impulse response as >the original h() but only a fraction of the power (depending on >the choice of n) is emitted from the (potentially ill-behave) >IIR section. > >This hybrid FIR/IIR filter should (or at least, might) be better >behaved than the original IIR under the condition of the coefficients >being modulated. > >Steve
One day I will have to know how to decipher this :). For now, I will try different filters and see what happens. --------------------------------------- Posted through http://www.DSPRelated.com