Reply by S0lo February 2, 20162016-02-02
>Am Montag, 1. Februar 2016 15:23:12 UTC+1 schrieb Steve Pope: >> SG wrote: >> >> >I've already said the things I *can* say given the information you >> >gave: >> >> >(1) You're not supposed to change the filter parameters that quickly. >> >> "Not supposed to" according to who? > >Me. > >> OP stated this is a requirement, that it works in analog, and >> that there are existence proofs that it works in digital. > >That's why I've been suggesting oversampling twice already. With >enough oversampling the rate of change of the cutoff parameter >measured in sample periods can be made arbitrarily small and I believe >that's what's important to keep this time-varying filter stable. > >S0lo, please try oversampling. By oversampling I basically mean that >you operate at a much higher sampling rate internally but try to keep >the bandwidth of the signals you deal with more limited. For example: >Operate at a sampling rate of 192 kHz but make sure that your >sawtooth signal you feed into the filter is band-limited (no harmonics >above, say, 30 kHz. And after the time-varying filter you might need >to lowpass the result again to remove inaudible harmonics that could >get you into trouble during the next nonlinear processing step (if >there is any). > >If your current sawtooth generating code suffers from aliasing, try >looking for how to create band-limited steps (BLEPs) and compose your >waveform out of ramps and these BLEPs. Oversampling is also very >convenient here because it allows you to to keep the BLEP rather >short. With oversampling you have more "headroom" in the upper >frequencies where the step response does not have to be good or even >alias-free. For example, with 2X oversampling you can approximate a >band-limited step well with just 8 samples. You could create an >8x64 BLEP table for 64 sub-sample positions of the step. > >Cheers! >sg
Thanks, I've already tried oversampling as I said before, same problem, may be I'll do that again making sure that I've done it right. I also just tried a real sampling rate of 192Khz. Same thing, no improvement. Yes I'm using MinBLEP for the saw tooth, no aliasing at all, super clean even at 20Khz --------------------------------------- Posted through http://www.DSPRelated.com
Reply by SG February 1, 20162016-02-01
Am Montag, 1. Februar 2016 15:23:12 UTC+1 schrieb Steve Pope:
> SG wrote: > > >I've already said the things I *can* say given the information you > >gave: > > >(1) You're not supposed to change the filter parameters that quickly. > > "Not supposed to" according to who?
Me.
> OP stated this is a requirement, that it works in analog, and > that there are existence proofs that it works in digital.
That's why I've been suggesting oversampling twice already. With enough oversampling the rate of change of the cutoff parameter measured in sample periods can be made arbitrarily small and I believe that's what's important to keep this time-varying filter stable. S0lo, please try oversampling. By oversampling I basically mean that you operate at a much higher sampling rate internally but try to keep the bandwidth of the signals you deal with more limited. For example: Operate at a sampling rate of 192 kHz but make sure that your sawtooth signal you feed into the filter is band-limited (no harmonics above, say, 30 kHz. And after the time-varying filter you might need to lowpass the result again to remove inaudible harmonics that could get you into trouble during the next nonlinear processing step (if there is any). If your current sawtooth generating code suffers from aliasing, try looking for how to create band-limited steps (BLEPs) and compose your waveform out of ramps and these BLEPs. Oversampling is also very convenient here because it allows you to to keep the BLEP rather short. With oversampling you have more "headroom" in the upper frequencies where the step response does not have to be good or even alias-free. For example, with 2X oversampling you can approximate a band-limited step well with just 8 samples. You could create an 8x64 BLEP table for 64 sub-sample positions of the step. Cheers! sg
Reply by S0lo February 1, 20162016-02-01
>SG <s.gesemann@gmail.com> wrote: > >>I've already said the things I *can* say given the information you >>gave: > >>(1) You're not supposed to change the filter parameters that quickly. > >"Not supposed to" according to who? > >OP stated this is a requirement, that it works in analog, and >that there are existence proofs that it works in digital. > >Steve
And there are digital synths doing it too. --------------------------------------- Posted through http://www.DSPRelated.com
Reply by S0lo February 1, 20162016-02-01
>I can't make sense of your description. By "I'm sweeping the cutoff up >once, then down once" do you mean the *mean* cutoff frequency >parameter? or the frequency of how fast you change the cutoff >frequency parameter? or the actual cutoff frequency parameter >for the filter? >sg
Sorry if I've been vague, Again, the resonant (cutoff) frequency is being modulated like this: cutoff = Cutoff Knob + Depth knob*sinwave The knobs are controlled manually. So when I said "sweeping the cutoff". I meant manually changing the "Cutoff Knob" --------------------------------------- Posted through http://www.DSPRelated.com
Reply by Steve Pope February 1, 20162016-02-01
SG  <s.gesemann@gmail.com> wrote:

>I've already said the things I *can* say given the information you >gave:
>(1) You're not supposed to change the filter parameters that quickly.
"Not supposed to" according to who? OP stated this is a requirement, that it works in analog, and that there are existence proofs that it works in digital. Steve
Reply by SG February 1, 20162016-02-01
On Sunday, January 31, 2016 at 9:25:43 PM UTC+1, S0lo wrote:
> You guys deserve to hear it. I just recorded it. Here it is, (You might > want to lower your volume): > > https://soundcloud.com/s0lo/bad-filter-fm-test > > I'm sweeping the cutoff up once, then down once. Notice how clean it is at > the beginning then suddenly goes crazy at a certain frequency (I think > exactly at one octave below the modulator).
I can't make sense of your description. By "I'm sweeping the cutoff up once, then down once" do you mean the *mean* cutoff frequency parameter? or the frequency of how fast you change the cutoff frequency parameter? or the actual cutoff frequency parameter for the filter? Maybe, we can help you better if you tried to simplify your code and post the essential part of what's going on. I've already said the things I *can* say given the information you gave: (1) You're not supposed to change the filter parameters that quickly. (2) Even if you have a filter implementation that is able to handle this, this kind of modulation will produce lots of high frequency harmonics. Be careful with respect to aliasing when you do these sorts of nonlinear things. (3) Try oversampling. Lots of oversampling to help with (1) and (2). sg
Reply by Tauno Voipio February 1, 20162016-02-01
On 31.1.16 22:25, S0lo wrote:
>> What happens if you reduce the signal level, such that the >> limiter isn't activated at those moderate Qs that are >> causing problems? (Or just omit the limiter for testing >> purposes.) > > > Same problem happens if I reduce the signal level even to almost zero. And > if I remove the limiter I get an over flow at the output, that is gain > just keeps growing and growing until the variables can not hold the high > numbers any more. > > You guys deserve to hear it. I just recorded it. Here it is, (You might > want to lower your volume): > > https://soundcloud.com/s0lo/bad-filter-fm-test > > I'm sweeping the cutoff up once, then down once. Notice how clean it is at > the beginning then suddenly goes crazy at a certain frequency (I think > exactly at one octave below the modulator).
It means that your filter is not stable, it is an oscillator instead of a filter. -- -TV
Reply by S0lo January 31, 20162016-01-31
>What happens if you reduce the signal level, such that the >limiter isn't activated at those moderate Qs that are >causing problems? (Or just omit the limiter for testing >purposes.)
Same problem happens if I reduce the signal level even to almost zero. And if I remove the limiter I get an over flow at the output, that is gain just keeps growing and growing until the variables can not hold the high numbers any more. You guys deserve to hear it. I just recorded it. Here it is, (You might want to lower your volume): https://soundcloud.com/s0lo/bad-filter-fm-test I'm sweeping the cutoff up once, then down once. Notice how clean it is at the beginning then suddenly goes crazy at a certain frequency (I think exactly at one octave below the modulator). --------------------------------------- Posted through http://www.DSPRelated.com
Reply by Bob Masta January 31, 20162016-01-31
On Sat, 30 Jan 2016 13:40:37 -0600, "S0lo"
<111575@DSPRelated> wrote:

>>S0lo <111575@DSPRelated> wrote: >> >>>I should mention that the overloads do not sound nor look (in the >spectrum >>>analyzer) like the typical aliasing I usually hear when some thing goes >>>beyond half sampling rate. They are very much more like the filter self >>>resonating, which would have been no problem if it was dialed manually, >>>but those resonations are really random/chaotic that come and go as the >>>cutoff frequency is manually changed. >> >>Sounds more like arithmetic overflow than anything else. Have you >>been able to rule this out? Say, by grabbing a sound sample >>and implementing the modulated filters in non-real-time but at >>high precision? (e.g. double precision floating point) >> >>Steve > >I'm using float (32 bit). I have tried replacing it with double (64 bit) >on all the variables I'm using. No change, exactly same thing. > >Note here that I apply a soft clipper (limiter) to the filter output >variable (before feed back) to ensure the gain doesn't get more than a >certain outrageous db. I need this because I allow the filter to have very >high resonance inorder for it to self resonate if the user wishes to. >Still, The problem persists even before I dial very high resonance to self >oscillation. Just moderately high resonance is enough to produce the >problem.
What happens if you reduce the signal level, such that the limiter isn't activated at those moderate Qs that are causing problems? (Or just omit the limiter for testing purposes.) Best regards, Bob Masta DAQARTA v9.00 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE 8-channel Signal Generator, DaqMusiq generator Science with your sound card!
Reply by January 30, 20162016-01-30
I still think a digital state-variable is your best bet, but it's also possible you would get different results if you tried direct form 2 versus direct form 1, as well as the transposed versions of both. There's no theory that says that all those forms are equivalent once the coefficients are changing so quickly.  

Bob