Forums > MaxMSP

biquad fast moving, unwanted artefacts

September 8, 2013 | 8:32 pm

Hi,

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).

<code>

– Pasted Max Patch, click to expand. –

</code>

Is the filter blown as suggested in this article? http://cycling74.com/2008/09/03/max-5-guitar-processor-part-2/ Do I need to clear it after every iteration to get it to be smooth?

Cheers


September 9, 2013 | 5:29 am

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

<code>

– Pasted Max Patch, click to expand. –

</code>

Heres another example using filtercoeff~ which makes the problem even worse: (you might have to tweak the numbox connected to scale to 1700)

<code>

– Pasted Max Patch, click to expand. –

</code>


September 12, 2013 | 12: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)


September 12, 2013 | 8:43 am

Yeah, avoid snapshot~ in situations like this. You’re downsampling the signal, and that’s causing less frequent updates, hence discontinuities.

Example attached.

<code>

– Pasted Max Patch, click to expand. –

</code>


September 16, 2013 | 6:06 pm

Hi Peter,

Thanks.

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?


September 16, 2013 | 8:17 pm

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)

<code>

– Pasted Max Patch, click to expand. –

</code>


Viewing 6 posts - 1 through 6 (of 6 total)