PDA

View Full Version : how to disable/enable the biquad filter?



mykle
04-02-2016, 11:32 PM
Another quickie:

What's the best way to tell a biquad filter "do nothing right now", i.e. pass all samples unchanged? Is there a preferred arrangement of the coefficients for that? I tried setting a lowpass filter with the cutoff frequency at 50khz, but it didn't work for some reason -- it still filtered audibly. (And even if it had worked, it would have been burning CPU for no reason.)

Thanks for any advice,
-m-

WMXZ
04-03-2016, 10:31 PM
without having it tested
I would try an allpass filter
something like

double allpass[]={1.0,0.0,0.0,0.0,0.0});
setCoefficients(stage, allpass);
or simply bypass filter stage