March 15, 2016
If I have a complex effect that includes several IIR filters, and want to support 44.1, 48, 88.2, 96 kHz, etc...
Is sample rate conversion the only solution? It seems almost impossible to design equivalent IIR filters, even with increased filter order (I even went as far as to use Genetic Algorithms or Simulated Annealing).
However, having already designed sample rate converters, I'm really unhappy about the prospect of including one (or two in fact) in each effect, since they have a very hefty performance penalty, as well as some added delay. I experimented with lesser quality converters (i.e. nonlinear phase), but the performance still appears problematic in some cases and hardware.
So how would you go about this? How do other manufacturers address the issue?
- Use a low quality realtime sample rate converter?
- Try to build as closely matching IIR filters as possible? (Does this mean that even market leading manufacturers' plugins actually behave slightly differently across different sampling frequencies? Should this be considered a "fact of life" or an engineering reality? Up to this point, I wasn't ready to accept this, but now I'm wondering)
Many thanks in advance!
January 29, 2017
Most IIR filter coefficient calculation equations require the sample rate as one of the parameters. Filter coefficients are re-calculated whenever the sample rate changes. Where this occurs depends on the API:
RackAFX: prepareForPlay( )
VST3: setActive( )
AU: Initialize( ) and Reset( )
See section 6.8 of my FX book: Design a Resonant LPF Plugin
March 15, 2016
Thanks for the reply.
However the key point is, that these IIR filters won't be perfectly equivalent. I am given to understand it might even be mathematically impossible to create perfectly equivalent IIR filters for different sampling rates - the curvature (slope / derivatives) of the frequency response will never match up perfectly.
Now the differences might be small, but for example in my case the filters are on finely tuned feedback loops. So those slight differences will get amplified quite a bit.
I confirmed this by doing a test - rendering an output from both a 44.1 and a 48 kHz system, then converting them to a common sampling rate in WaveLab - and the two outputs got more and more different as time progressed - as predicted, the slight differences in IIR frequency responses got amplified as the signal passed again and again on the filtered feedback loop.
So yeah... I know many plugins that have far more exotic DSP algorithms with filtered feedback loops, perhaps I should start examining their outputs to see if they consider such deviations acceptable.... Using a sample rate converter still sounds an overkill to me, but it seems to be the only solution then...
Most Users Ever Online: 36
Currently Browsing this Page:
Guest Posters: 1
Newest Members:Matt, dspstudent, strings4v, TheSmile, semihyavuzz, alfredLue, danioc, midnightskate3, Alia5, Shamal Sundar
Moderators: W Pirkle: 209
Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 209