>Are you saying that you used a fixed frequency low-pass filter? Or are >you wazulating the resonant frequency with your sine wave? > >-- > >Tim WescottNot 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
Filter FM and sideband overload
Started by ●January 26, 2016
Reply by ●January 28, 20162016-01-28
Reply by ●January 28, 20162016-01-28
>Are you saying that you used a fixed frequency low-pass filter? Or are >you wazulating the resonant frequency with your sine wave? > >-- > >Tim WescottJust 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
Reply by ●January 28, 20162016-01-28
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
Reply by ●January 28, 20162016-01-28
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
Reply by ●January 28, 20162016-01-28
<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
Reply by ●January 28, 20162016-01-28
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 > >BobTo 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
Reply by ●January 28, 20162016-01-28
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
Reply by ●January 28, 20162016-01-28
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
Reply by ●January 28, 20162016-01-28
>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'tmatter 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 asa>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. > >BobNo 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 tovery>high levels , the cutoff could go negative, which results in positive >feedback in the biquad. > >BobI 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
Reply by ●January 28, 20162016-01-28
>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. > >SteveOne 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