Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Fundamentals: Supporting different sampling frequencies
New Member
March 16, 2016 - 4:11 am
Member Since: March 15, 2016
Forum Posts: 2
sp_UserOfflineSmall Offline

Hi Will,

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!

W Pirkle
March 16, 2016 - 5:49 pm
Member Since: January 29, 2017
Forum Posts: 444
sp_UserOfflineSmall Offline

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

- Will

New Member
March 17, 2016 - 12:33 am
Member Since: March 15, 2016
Forum Posts: 2
sp_UserOfflineSmall Offline

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

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

JimmyM: 33

Gwen: 32

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 617

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 38

Topics: 651

Posts: 2558

Newest Members:

TheJonDoe, DoubleLiines.com, jmf11, dan, Luke Bilodeau, Carlos_1, ant, marclingk, TheCammen, Hubbert

Moderators: W Pirkle: 444

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 444