Avatar

Please consider registering
Guest

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 sp_TopicIcon
Fundamentals: Supporting different sampling frequencies
No permission to create posts
March 16, 2016
4:11 am
Avatar
jlex
New Member
Members
Forum Posts: 2
Member Since:
March 15, 2016
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!

March 16, 2016
5:49 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

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

March 17, 2016
12:33 am
Avatar
jlex
New Member
Members
Forum Posts: 2
Member Since:
March 15, 2016
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: 36

Currently Online: W Pirkle
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143