martinvicanek wrote:Hi gang, in an effort to elaborate on this subject I have finally found a simpler scheme to calculate the coefficients for a recursive filter matched to its analog counterpart. What's more, it generalizes nicely to other than lowpass filter types.
Here is a collection of matched lowpass, highpass, bandpass, and peaking EQ filters. I have prepared a little
writeup with the details, mainly for myself, and maybe for a few other inclined readers.
Thank you so much Martin!
I'm working on a mobile app to generate correction filters for headphones using an interactive auditory test.
In this application your filters are a game-changer!
The key aspect is that the output of a filter of a given center frequency, q and gain remain fairly consistent at all sample rates.
For instance, the first DSP I'm targeting is the miniDSP IL-DSP which, depending on the input will operate at 44.1 or 48 kHz, switching automatically from a set of biquads to the other.
I hope that correction profiles generated will be rendered faithfully on any other setup, which wouldn't be the case with Cookbook EQ peak EQs tuned at 44.1 kHz and later used at 96 kHz.
It is fairly easy to port the code implementation from the fsm files into another language: it didn't take me long to translate a few to Kotlin.
However it's possible that since this sample code is embedded deep within a file that can be only be opened by a windows program, we have not seen as much adoption in software as it could be.
Have you considered publishing reference implementation in code also, on your website?
It would make it easier and less error-prone for developers who are trying to transform formulas from your writeups.
It worked for me tho, and I look forward to validate the implementation with measurements