Re: [music-dsp] IIR Coefficient Switching Issues
On 04-Nov-13 18:10, Phil Burk wrote: A different approach is to have two filters in parallel. You can be listening to one while setting up the other. When the other filter is stable just cross-fade from one to the other. And cross-fade both the input and output with a sine/cosine after zeroing the states of the new filter. Tom -- 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
Re: [music-dsp] IIR Coefficient Switching Issues
If you are making big sudden changes to the filter then it is hard to avoid these regions of instability. The other posts described ways to address that. A different approach is to have two filters in parallel. You can be listening to one while setting up the other. When the other filter is stable just cross-fade from one to the other. You will pay the cost of two filters. But that may be cheaper than filtering the coefficients. You may also get some effect from mixing the two filters. But hopefully it will sound better than the "pops and glitches" you are getting now. Phil Burk On 11/2/13 8:27 PM, Chris Townsend wrote: 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. -- 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
Re: [music-dsp] IIR Coefficient Switching Issues
Oh, completely forgot. Here's a step-by-step description of the TPT method: http://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_1.0.3.pdf (A4 format) http://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/VAFilterDesign_1.0.3_A5.pdf (A5 format) On 04-Nov-13 11:07, Vadim Zavalishin wrote: Hi Chris Direct forms are not good for coefficient modulation, plus IIRC they tend to have precision issues at low cutoffs. I guess, the TPT (ZDF) approach can solve your problem completely: http://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/KeepTopology.pdf (For the 2nd order filters use the modes of the SVF from the same paper) If you can read Reaktor Core, then here's some additional info: http://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/KeepTopologyRC.pdf Regards, Vadim -- Vadim Zavalishin Reaktor Application Architect Native Instruments GmbH +49-30-611035-0 www.native-instruments.com -- 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
Re: [music-dsp] IIR Coefficient Switching Issues
Hi Chris Direct forms are not good for coefficient modulation, plus IIRC they tend to have precision issues at low cutoffs. I guess, the TPT (ZDF) approach can solve your problem completely: http://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/KeepTopology.pdf (For the 2nd order filters use the modes of the SVF from the same paper) If you can read Reaktor Core, then here's some additional info: http://www.native-instruments.com/fileadmin/ni_media/downloads/pdf/KeepTopologyRC.pdf Regards, Vadim On 03-Nov-13 04:27, Chris Townsend wrote: 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 clear 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, but that's not a huge deal in this case. 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 -- Vadim Zavalishin Reaktor Application Architect Native Instruments GmbH +49-30-611035-0 www.native-instruments.com -- 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
[music-dsp] IIR Coefficient Switching Issues
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 clear 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, but that's not a huge deal in this case. 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