Why not IIR filters + a global phase linearization by FIR

FIR and linear/zero phase techniques are great resources for offline processing (studio / lab etc.) and are extensively used in all old / new audio algorithms. But I must agree with that EQ must be IIR and FIR needs to be limited to crossovers and that is if the delay is tolerable (HF crossing etc.).

It al depends... linear phase EQ has it's place to be able to do some quite specific tasks. As speakers are minimum phase devises for the largest parts, EQ-ing with IIR makes the most sense, no argument there. But... there are some instances/cases that linear phase can make sense or that linearisation of phase in-room can be beneficial.
It all depends and everyone should find out for themselves what they prefer.

A sample of linear phase EQ, aside from using FIR crossovers is the use of mid-side EQ to counter Stereo cross talk. In a room that is largely devoid of early reflections it really is a game changer. It simply does not work with IIR EQ and there's a perfectly valid reason for that. I wouldn't want to be without it anymore. No way no how. It is quite subtle EQ work (as any mid/side EQ should be) and as such it does not cause audible pré-ringing problems when done with caution.

Like I said, it depends on circumstances. I also linearise the phase of bass frequencies, while minding pré-ringing. I prefer it (in a big way) to not using this trickery. So no matter what anyone might think or feel about that, I've been using it for years on end and I prefer it that way. My speaker choice and my room treatment was key to be able to get away with it, as it was planned that way from the start. Headphone tests for judging phase are quite meaningless to me. You have to hear and feel it to really be able to make up your mind. All in my humble opinion of course.

So my miles do vary. I'll suit up now.
 
It all depends and everyone should find out for themselves what they prefer.
Of course, anything could be made subjective, but my statement above was from a technical and not an artistic point of view. A crossover is about splitting and reconstruction, just like audio coding-decoding and needs to preserve fidelity, hence my opinion.
A sample of linear phase EQ, aside from using FIR crossovers is the use of mid-side EQ to counter Stereo cross talk. In a room that is largely devoid of early reflections it really is a game changer. It simply does not work with IIR EQ and there's a perfectly valid reason for that. I wouldn't want to be without it anymore. No way no how. It is quite subtle EQ work (as any mid/side EQ should be) and as such it does not cause audible pré-ringing problems when done with caution.
So what do you do about the delay of the linear phase EQ ? Besides, linear phase EQs maybe done in IIR if offline.
 
Last edited:
I think that premise still holds (at least partially) because pre-ring is a "characteristic" of having a linear phase response, the pre (vs post) makes it more audible due to the human psychoacoustics. Of course, this assumes that the global FIR linearises the phase.
For an overall correction filter I think that a mixed phase one is better, if the low frequency rolloff of the system can be made low enough then an overall minimum phase response at the listening position works better for me. Trying to linearize the woofers phase where it is rolling off does not sound natural to me.
 
  • Like
Reactions: 1 user
Whilst it would be nice to have the ability to be able to easily generate Gaussian filters I think got a little over excited and likely wouldnç
't use them as to much delay involved for my purposes. The advantage to the Gaussian is there is no ringing when thehe LP and HP do not sum perfectly acoustically.
Thanks again for Rephase, think I owe you another beer or two.
 
I generate it using the following function in MATLAB, and then write it to a *.wav file for sharing / compatibility. The overall filter impulse response is obtained in a similar way, but using the processed output instead of the initial Gaussian LPF.

https://in.mathworks.com/help/signal/ref/gausswin.html

Code:
Fs = 48000;
x = gausswin(2763,11.49)                                                  % Normalised 77Hz Gaussian impulse response with 2763 points
x = x / max( fft(x) );                                                             % Adjust scaling factor
wavwrite(x,Fs,32,'h:\desktop\Gauss.wav');                            % Write to 32 bit, 48kHz mono wav file

The result looks like below. Note that X-axis is not time but sample count.

1673934660363.png


.... I think got a little over excited and likely wouldnç't use them as to much delay involved for my purposes.
Yes, exactly the point. (y)
When it comes to real-time filtering, IIR is king.
 
Last edited:
I generate it using the following function in MATLAB [...]

Code:
Fs = 48000;
x = gausswin(2763,11.49)                                                  % Normalised 77Hz Gaussian impulse response with 2763 points
x = x / max( fft(x) );                                                             % Adjust scaling factor
wavwrite(x,Fs,32,'h:\desktop\Gauss.wav');                            % Write to 32 bit, 48kHz mono wav file
@newvirus2008, it looks like you determined the parameters for gausswin() empirically, and that works. The analytical method is described in post #298, where the designer has to decide upon a threshold below which a coefficient value is "negligible". I usually use 2^(-24), though that value is entirely up to the designer and the circumstances.
 
MATLAB uses 32-bit (float) by default, that's why. I guess reducing the bit depth to signed 24-bit would do what you say, wouldn't it ?
No, that's not quite what I meant. A true Gaussian extends to infinity in both directions, and the values in the "tails" get smaller but never reach zero. The designer must decide where to truncate the Gaussian waveform on both sides. I more-or-less arbitrarily decided that 2^(-24) = 5.96E-8 is that threshold; any coefficient value less than 5.96E-8 is assumed to be zero. In a floating-point implementation, 2^(-24) is still represented with full precision.

Depending upon circumstances, you might decide that 2^(-16) is an appropriate threshold, or something else. It may be that using 2^(-24) results in more coefficients than your processing power can handle. Or it may be that all of your samples are only 16 bits wide, so 2^(-24) is overkill. Etc.

Oh, a minor correction: Matlab assumes that everything is double-precision floating-point unless told to do otherwise.
 
I more-or-less arbitrarily decided that 2^(-24) = 5.96E-8 is that threshold; any coefficient value less than 5.96E-8 is assumed to be zero.
OK, so that's not related to the 24 bits used in audio ?
In a floating-point implementation, 2^(-24) is still represented with full precision.
OK, so you definitely mean float.
Depending upon circumstances, you might decide that 2^(-16) is an appropriate threshold, or something else. It may be that using 2^(-24) results in more coefficients than your processing power can handle. Or it may be that all of your samples are only 16 bits wide, so 2^(-24) is overkill. Etc.
Yes, understood.
Oh, a minor correction: Matlab assumes that everything is double-precision floating-point unless told to do otherwise.
Yes, double on compiler, but wavwrite() is limited to 32 bits only, 64 gives an error.
 
Last edited:
I've been attempting to implement this using jriver's PEQ blocks alone (using my app which can calculate how to use it to create bessel filters already - https://yabb.jriver.com/interact/index.php/topic,129609.0.html). I was failing to achieve the expected HPF slope for a while until I eventually realised that the missing link was mentioned in this post

The -6dB frequency of the Bessel LPF has to be adjusted further. Realize that, if the -6dB frequency of the first HPF is 100Hz, and the output of that is passed through another 100Hz HPF, then the new -6dB frequency will become something greater than 100Hz. So we have to account for that by adjusting the HPF -6dB frequency downward. Specifically:

"adjusted -6dB frequency" = "desired -6dB frequency" / 1.292 (This only works for 8th-order Bessel. Other orders require different adjustments.)

I may have missed it but is there a method available to calculate the required scaling factor for different filter orders?