DSP Engine, Procedural EQ, Generic IIR Filter

Seeking some guidance about using this component of the DSP Engine.

From reading this article I am guessing that the A parameters are feedback filter coefficients and the B parameters are feedforward filter coefficients where the generic filter is a single biquad filter and A0 is normalised as 1.

I found this article really helpful in understanding the differences between IIR and FIR filters and will be experimenting with the linked custom biquad programming spreadsheet.

So at the moment I am inclined to think of this feature as a single Parametric EQ filter with greater control over feedback/feedfoward parameters but I don’t see gain or Q controls. Are those “secondary parameters” that arise out of the underlying filter coefficients ?

What kind of use case would be well suited to this feature ?

Any insights from @brian or other users with more dsp experience than me (that’s a very low bar !) are welcome.

This page has a set of formulas for computing a bunch of common filter types: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt

Those formulas also create A0 values, which can be normalized out like this:

A1 = A1/A0
A2 = A2/A0
B0 = B0/A0
B1 = B1/A0
B2 = B2/A0

Q is incorporated into the values computed by those formulas.

The main use case for entering these values manually is if you are building a digital crossover and know the names and parameters of the filters you’re after. IIR filters have a direct correspondence with analog crossover designs, so it is in principle possible to “port” an analog crossover into the digital domain very directly. Manual input of the values ensures that the design is translated properly without having to make assumptions about how our Parametric EQ works inside.

If you are just looking to adjust frequency response, the Parametric EQ can do the math for you.

2 Likes

Hello Brian,

today I tried to use the generic IIR filter.

I put in the following values calculated by the MiniDSP spread sheet:

1.286695021163910000000
-0.413896019372000000000
0.675147760133978000000
-1.350295520267960000000
0.675147760133978000000

(Highpass at 3000Hz, Q 0.5).

When I activate the filter, there is no sound output anymore.

Can you spot the mistake? Can you give me some known working values that I can input to see if my values are faulty or that IIR generic works at all?

Thanks!
Achim

First thing to consider–IIR coefs have the sample rate “built in”. Those coefficients are correct for a 3kHz 2nd order high pass with Fs=44100.

If you apply that filter to higher sample-rate content, it the cutoff frequency will move “up”. So for 88.2kHz content, that’s a 6kHz high pass. And so on. You should probably be picking a single sample rate + using sample rate conversion to move everything to it if you’re planning on typing in IIR coefs by hand.

Alternately, you could render the desired impulse response into convolution filters at each sample rate that you intend to reproduce–this approach is more flexible.

There isn’t a whole lot of musical sound up above 3kHz. In order to hear something, you’ll need content that has some energy up there, and will probably have to turn up the volume too.

I tried it and got about what I’d expect. Some glare/overtones, at a pretty low level.

Headphones and a steady hand on the volume knob are a must for this kind of experimentation. The line between “I can’t hear it” and “blown tweeter” can be surprisingly thin when playing with filter parameters like the ones you posted.

EDIT: one thing to add–the filter design equation used to generate those coefs is identical to the one used by Roon’s parametric EQ. So you could also save yourself the trouble of typing in values and configure a high-pass with the same parameters for the same result.

Thank you, Brian - your explanation and time is much appreciated.

Unfortunately, there must be some other hitch in my installation.

Today I tried these coeffecients:

1.696112423878270000000
-0.714396400887382000000
0.933009454436327000000
-1.696112423878270000000
0.781386946451055000000

A peaking EQ -5.5dB at 1000 Hz.

The result is the same, my output goes mute when I activate the filter. There is no other DSP action present.

The source file is 44.1k.

When I deactivate the channel assignment in the generic filter, sound comes back.

Also - which tool would give me the file that I could use for convolution from my coefficients?

Some progress: Positive/negative need to be swapped for A1 and A2 for the MiniDSP spreadsheet to work in Roon.I found this out by getting coefficients from another source and comparing.

I wonder why the coefficients I gave worked in your system.