- Joined
- Feb 4, 2025
- Messages
- 23
- Likes
- 41
I've been working on filter design quite a bit lately. Didn't come from an audio engineering background but pivoted from a ~25 year mostly-video software career a few years ago
I'm working on IIR filter design right now and trying to find a highly precise IIR filter design workflow. Unlike FIR, minimization techniques can really struggle with IIR as it's a vast space of many local minima so it's difficult for the algorithms to jiggle their way out and find something close to ideal. I have very strict tolerances, and the last mile is the hardest. Fortunately some IIR filters have known solutions in official specification papers, and if you're lucky it's for arbitrary sample rates. Others, like ECMA-418, only specify one sample rate (48khz) and the solution doesn't easily carry over to others. Something phon-dependent like ISO 226, well good luck.
The past few days, I've been messing around with REW. I was able to get a great "initial guess" for my scipy minimization filter design script by loading a blank filter, setting it as measurement, then loading ECMA-418 frequency response data and having it fit a parametric EQ. With low/high shelves enabled, it gets a really good approximation. From there, the scipy minimization algorithm with some churning has actually put the resulting filter within tolerance. The objective function is given the parametric EQ bands which seems to generally work better than optimizing biquads.
That's exciting, but it isn't scalable. I have many more filters to design and the process is tedious and non-deterministic (AFAIK, REW has no scripting language or other way to automate).
Anyway, maybe someone with experience in this realm will read this and chime in if you have an approach which works or might work. Figured I'd think out loud in the form of a mini-blog thread.
I'm working on IIR filter design right now and trying to find a highly precise IIR filter design workflow. Unlike FIR, minimization techniques can really struggle with IIR as it's a vast space of many local minima so it's difficult for the algorithms to jiggle their way out and find something close to ideal. I have very strict tolerances, and the last mile is the hardest. Fortunately some IIR filters have known solutions in official specification papers, and if you're lucky it's for arbitrary sample rates. Others, like ECMA-418, only specify one sample rate (48khz) and the solution doesn't easily carry over to others. Something phon-dependent like ISO 226, well good luck.
The past few days, I've been messing around with REW. I was able to get a great "initial guess" for my scipy minimization filter design script by loading a blank filter, setting it as measurement, then loading ECMA-418 frequency response data and having it fit a parametric EQ. With low/high shelves enabled, it gets a really good approximation. From there, the scipy minimization algorithm with some churning has actually put the resulting filter within tolerance. The objective function is given the parametric EQ bands which seems to generally work better than optimizing biquads.
That's exciting, but it isn't scalable. I have many more filters to design and the process is tedious and non-deterministic (AFAIK, REW has no scripting language or other way to automate).
Anyway, maybe someone with experience in this realm will read this and chime in if you have an approach which works or might work. Figured I'd think out loud in the form of a mini-blog thread.
Last edited: