If you have a problem or need to report a bug please email :

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

Matched Lowpass Filter

DSP related issues, mathematics, processing and techniques

Re: Matched Lowpass Filter

Postby trogluddite » Fri Oct 11, 2019 5:15 pm

The phase shifting that you described is inherent in all recursive ("Infinite Impulse Response" - IIR) filter implementations (as it is in analogue filters too), so such problems aren't unusual. The only cast-iron solution is to use linear-phase filters, which have to be implemented using non-recursive ("Finite Impulse Response" - FIR) algorithms. The downside of FIR filters is that they introduce a fixed amount of latency and are usually far more CPU intensive, so they're much less commonly used in FS designs, though there have been examples posted in the past, so may be worth searching the forums for.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
Posts: 1282
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Matched Lowpass Filter

Postby guyman » Fri Oct 11, 2019 11:33 pm


I managed to pull some low level wizardry (or idiocy) and constructed an all pass out of all of the complex filters set to matched super low res super low cutoff... then combined with a variable complex bandpass I made a complex peak filter. It does not have the high end scoop and sweeps the spectrum clean. Due to the limited Q factor in martin's original setup, I cannot fix the res to properly adjust when attenuation is negative, so it cuts narrower than it boosts... THOUGH I was able to perform his ruby calculations for the freq/Q (pre biquad calculations) IN BLUE so it could be modulated with blue atten if it weren't limited to >.5 values

This solves the issue of a complex peak filter, though naive - as it cannot be combined with the original signal due to the phase rotation taking place in the all pass(ish) filter. I haven't applied this practically on source material so maybe it is now no longer efficient enough to use, but if someone were to simplify my redundant math, and perform the operations in assembler, a reasonably efficient filter would come about(I think). If anyone would like to do this, or beat me up on what I did wrong, I'd be grateful... I'm holding out for this filter and if Lord Martin does not return with more REAL MAGIC, all may be lost.
MatchedBiquads withpeak (Guyyed).fsm
(210.92 KiB) Downloaded 57 times
User avatar
Posts: 162
Joined: Fri Mar 02, 2018 8:27 pm

Re: Matched Lowpass Filter

Postby guyman » Fri Oct 11, 2019 11:39 pm

I have a splinter in my mind telling me a perfect, noiseless, all parameters modulatable filter is possible. I originally wanted to compensate a ZDF peak with a ZDF shelf, but after a few attempts at pulling up the high end, it always folds at nyquist even if shape is preserved up to that cutoff point. I CAN HEAR IT.
User avatar
Posts: 162
Joined: Fri Mar 02, 2018 8:27 pm

Re: Matched Lowpass Filter

Postby guyman » Fri Oct 11, 2019 11:55 pm

thanks for the insight Trog !
User avatar
Posts: 162
Joined: Fri Mar 02, 2018 8:27 pm

Re: Matched Biquad Filters

Postby supercurio » Sun Oct 27, 2019 7:54 pm

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. :D 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. :mrgreen:

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 :)
User avatar
Posts: 1
Joined: Sun Oct 27, 2019 7:01 pm
Location: Stockholm, Sweden


Return to DSP

Who is online

Users browsing this forum: No registered users and 1 guest