Any "cookbook" approaches to linear phase EQ?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

There are many linear phase EQ plugins out there today with all the standard filter curves (low pass, high pass, bell, shelving, etc.). I assumed there were some RBJ-style "cookbook" filter kernels and methods floating around for this but I can't find any such thing.

So, how is it being done? For example, how does one create a "parametric" bell EQ in linear phase that is user-adjustable on the fly?

I can use a simple "RBJ" filter to do that with IIR - how do you do it with LP FIR?

Post

This website and products are wonderful: http://iowahills.com/5FIRFiltersPage.html

Post

If you look at commercial parametric EQs such as Fabfilter's Pro-Q3 you'll find a lot of different filter types supported and one of it's modes is indeed linear phase.

So, either there's a way to convert from IIR filter types to FIR filter types or there's another method being employed. I'm not sure which, but I'd be curious to find out too.

Post

JustinJ wrote: Mon Apr 22, 2019 5:39 pm If you look at commercial parametric EQs such as Fabfilter's Pro-Q3 you'll find a lot of different filter types supported and one of it's modes is indeed linear phase.

So, either there's a way to convert from IIR filter types to FIR filter types or there's another method being employed. I'm not sure which, but I'd be curious to find out too.
Exactly my question. As far as switching between minimum & linear phase I thought all they were doing was using 1/2 vs. the entire impulse kernel - but that would also change the shape of the filters - so it's not that simple.

It's also hard imagine they are computing forward and reverse FFTs to generate FIR filter impulses or process the signal - especially when the code is "optimized for use on every channel". Nothing that uses FFTs (AFAIK) is lean enough on CPU to use on EVERY channel.

IDK - but I sure would like some clues!

Post

Probably the easiest methods to design FIRs for arbitrary spectrum are IFFT+window and ordinary least-squares.

IFFT gives you a kernel that is exact at the spectrum sampling points, but usually oscillates unacceptably in between. Windowing the result will smooth out the response, getting rid of most of the ripple, but also typically rounding out desirable features. You can also fit for non-uniform spectral samples, if you build a non-uniform DFT matrix and solve using something like LU.

OLS lets you over-specify the spectrum (eg. you probably want something like 8 times as many spectral samples as target taps; basically we want to pretend that target spectrum is "continuous") and finds you the best fit in the "sum of squared errors" sense. Essentially you just use an overdetermined DFT matrix and solve for the pseudo-inverse (eg. using Cholesky). This can still oscillate, but such oscillation tends to be concentrated around sharp features and it typically does a good job with relatively smooth target responses.

Either way, if you want to target a linear-phase version of a given IIR response, just build the target spectrum by evaluating the transfer function at each of the frequencies you need and then zero out the phase (ie. use the magnitude only).

Post Reply

Return to “DSP and Plugin Development”