biquad fast moving, unwanted artefacts

    Sep 09 2013 | 3:32 am
    has anyone noticed unwanted spikes/artefacts in the biquad filter? Im running an lfo through it and every 3 iterations or so it spikes, creating a distorted signal. Id be really grateful to find out any strategies for smoothing out biquad (other than smooth-biquad~ which doesnt currently work as x64).
    Is the filter blown as suggested in this article? Do I need to clear it after every iteration to get it to be smooth?

    • Sep 09 2013 | 12:29 pm
      Heres a patch to explain what the problem is. Just turn on the audio at the bottom and turn up the Hz box at the top. For some reason, filtergraph is jumping about all over the place, creating unwanted/uneven/spikes in the frequencies.
      Could this be because I am using the exponent inlet of scale? Would be grateful if someone could take a look and offer any advice as to why biquad might not be smooth at faster frequencies.
      Heres another example, if you turn the knob half way up, every 1 second or so you can hear the spike
      Heres another example using filtercoeff~ which makes the problem even worse: (you might have to tweak the numbox connected to scale to 1700)
    • Sep 12 2013 | 7:11 am
      (Not at computer to check so...)
      Are you interpolating at signal rate? (e.g. curve~ or line~ instead of line)
      You want to use filtercoeff~. It only calculates the coefficients once per signal vector by default IIRC, but you can upsample it to improve this resolution (check the reference).
      For super fast sweeps, other filters work better, such as svf~, lores~, etc. (PM.Ladder~, too)
    • Sep 12 2013 | 3:43 pm
      Yeah, avoid snapshot~ in situations like this. You're downsampling the signal, and that's causing less frequent updates, hence discontinuities.
      Example attached.
    • Sep 17 2013 | 1:06 am
      Hi Peter,
      Ive tried changing my patch to use signal only with the scale~ object but I cant get it sound the same no matter how much I change the exponential (it just doesnt sound anything like with the data scale object, it misses all the lowend and only catches the top end of the filter) Ive moved to another filter now and using snapshot it seems to sound just fine. Is there any chance you can confirm that I should "always" use signal on filters? even if it already sounds fine using data input?
    • Sep 17 2013 | 3:17 am
      Yes. Always use signal on filters if you need to sweep it fast.
      The problem with your exponent appears to be that you're using a gigantic value. Under normal (@classic 1, the default for scale) operation, you'd expect to be using values between 1 and maybe 1.5. (it's been a while, I really dislike classic-mode and always use it with @classic 0, since you can specify an exponent in an obvious way.)
      What works a lot better is just to specify your cutoff in MIDI pitch. It'll go evenly across the octaves and you can tweak the exponents easily. Here's an example: (works fine for fast LFO rates)