I'm working on an algorithm with some user controlled "presets" that adjust various IIR filters under the hood. This generally works fine, but I get pops and glitches when switching between certain settings. The filters that are causing trouble are typically second order hipass filters with a sub 100Hz cutoff, but with some settings the filters reconfigure to peaking, shelf and first order hipass types. Generally the problem is most noticeable when changing between types.
This appears to be a simple matter of the internal states of the filter being un-normalized and so large gain chances of the state variables can occur when coefficients are adjusted. I read through some old Music-DSP posts on this topic, but I didn't find a solution that fit my needs. I'm using 1 pole coefficient smoothing, which helps reduce the glitches but definitely doesn't get rid of them. Currently I'm using DF2 transpose filter topology. I also tried lattice and a couple others topologies, but overall that didn't improve things and in some cases was worse. If I only needed a second order hipass then I would think a Chamberlin State Variable Filter would be my best bet, since I found it to be very adept at handling coefficient changes. But I'm not sure it will work for me, since it's not a fully generally filter topology. I've looked at using the Kingsbury topology which is very similar in form to Chamberlin, but has poles that are generalized. Apparently Kingsbury's filter is all-pole (no zeros), so would need to tack on some zeros to make it fully general, but then I'm not sure it would maintain the nice properties of the Chamberlin filter. I've also looked at using a ladder filter, which seems like it would totally solve my problem, since all of the internal states are normalized. The only downside is that it's about double the computational cost of most other filter topologies. There's also the possibility of renormalizing the filter states every time the coefficients are updated, but that seems complicated and costly in terms of CPU, since the smoothing updates the coefficients at a fairly high rate. I'm also seeing some coefficient quantization issues at high sample rates, when using DF2T, because I'm dealing with low cutoff frequencies and using single precision floats. It looks like Chamberlin, Kingsbury or Ladder would also perform much better in that respect. Any ideas? Recommendations? Thanks, Chris -- dupswapdrop -- the music-dsp mailing list and website: subscription info, FAQ, source code archive, list archive, book reviews, dsp links http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp