• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are daily reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Does a 4 million taps FIR filter sound better than a 16K one? Let's find out.

Chromatischism

Major Contributor
Forum Donor
Joined
Jun 5, 2020
Messages
4,728
Likes
3,669
It's not a side effect. All these things are inextricably linked.
In a min phase system, you get all of the filter's output after the input impulse.
In a linear phase system, the filter delays the impulse and produces symmetric output before and after the input impulse.
Mixed-phase is just that, a mix of the two (or even of max phase).

FIR just means that the filter is stored literally as a sampled impulse response. Filtering happens through convolution (which can be implemented as trivially as multiplying each tap aka sample of the reversed FIR with the input signal, adding them up producing an output sample and then shifting the FIR one sample ahead, repeat the same for the next output sample).

The cool thing about it is that you can design arbitrary linear filters, that is with arbitrary frequency response (magnitude and phase).
You seem to know a lot about this stuff. Can you answer my question? Thanks.
 

gnarly

Addicted to Fun and Learning
Joined
Jun 15, 2021
Messages
963
Likes
1,343
I've read that group delay and pre-ringing are side effects (intentional, unsure of audibility) of the Dirac mixed-phase approach using all-pass filters to adjust phase, but didn't think that was the case in a purely FIR-based system like Audyssey that does not correct phase. True or false?
Neither true or false.

I don't know exactly how Audyssey or Dirac work, but I do understand minimum, linear, and mixed phase in general.

Minimum-phase is the normal culprit behind group delay. Predominantly due to crossovers, and system high-pass filters.
Linear-phase is the culprit behind pre-ring, whenever it is improperly implemented. (which can be often)
Mixed-phase, having properties of both minimum, linear, or even maximum phase, can have any of the above.

So if Audyssey is entirely minimum phase (IIR) like I think it is, I'd say it most likely has the greatest group delay potential.
And if Dirac is adjusting phase independently of magnitude (freq response as commonly used) like i think it may be, it will have the greatest pre-ring potential.

But really, it's all about good implementation...whichever route taken.
That's of greater importance ime/imo, than the under the hood details.
 

xnor

Active Member
Joined
Jan 12, 2022
Messages
193
Likes
207
What if you had no filter at all? Would that really be a problem at 44/48/etc sampling rate? Has anyone ever tried to check this? How...by measuring digital files on a workstation before playback? I guess I have seen some analysis showing ultrasonics but I don't recall the levels and I think that was DSD come to think of it.
It's not really possible, because even zero-order hold (ZOH) can be considered a filter. A very poor reconstruction filter, but a filter nonetheless.
ZOH which basically just holds the last sample's corresponding voltage results in quite some droop below 22.05 kHz and insignificant rejection of images above 22.05 kHz.

1661642026924.png


1661642045338.png
 

KeithPhantom

Addicted to Fun and Learning
Forum Donor
Joined
May 8, 2020
Messages
641
Likes
658
I'm pretty sure that the use of these overly-engineered reconstruction filters relative to our hearing is inconsequential to what we can do (due to our limitations and insensitivity in these frequencies where the filters work), so the implementation of the "mass-produced" filters is practical and achieves its designed purpose. I am getting into convolver FIR filters and how linear-phase and minimum-phase affect a convolver, considering both high- and low-tap applications. I can't find anything in the theory or practice about this, almost anything in the use of convolution as means to fix linearity errors, especially with transducers. If someone can shed some light on this I will really appreciate it.
 

xnor

Active Member
Joined
Jan 12, 2022
Messages
193
Likes
207
Does that change anything?
No, as I've explained.
It's also not right what gnarly said. If the filters are min phase (regardless if they are implemented with IIRs or approximated with FIRs .. implementation is irrelevant), then there's also minimal group delay as group delay is defined as the derivative of phase over frequency.
 

gnarly

Addicted to Fun and Learning
Joined
Jun 15, 2021
Messages
963
Likes
1,343
No, as I've explained.
It's also not right what gnarly said. If the filters are min phase (regardless if they are implemented with IIRs or approximated with FIRs .. implementation is irrelevant), then there's also minimal group delay as group delay is defined as the derivative of phase over frequency.
Hi,
I don't think i was incorrect. I think maybe you misunderstood/over extended what i wrote, ....or i just don't wrote clearly :)
I spoke only of phase. And sure, FIR can be used linear phase, minimum-phase (IIR replication), or mixed phase.

And another yes, group delay is defined as the (negative) derivative of phase over frequency.
But your comment that minimum phase filters lead to minimal group delay leaves me very bewildered.
I see it as opposite....min phase filters (like xovers and system high-pass as I mentioned), are the major source of phase rotation/slope...and hence the source of group delay.
Minimum phase high-Q PEQs are of course another source of phase warp / group delay..
So in my mind, minimum phase is all about being the source of group delay.
Whereas linear phase is all about avoiding group delay.
 
Last edited:

gnarly

Addicted to Fun and Learning
Joined
Jun 15, 2021
Messages
963
Likes
1,343
Audyssey is purely FIR.

Does that change anything?
It changes my meager understanding of how Audyssey works!
When I quickly looked at the manual before replying to you earlier, I saw a page on biquad IIR targets and said to myself, "aw shit, just another IIR processor".
Now, further into the manual, I see what you say ...all FIR, and the biquad stuff was just for setting/picturing PEQ targets.

Which means, who knows what Audyssey is doing...like Dirac, who knows..
Because FIR can be anything....IIR replication, lin phase, mixed phase, etc.
I also read that Audyssey assesses the host computer in determining how much FIR processing to apply. Cool.

I really wish some folks would take the time to run transfer functions of the Audyssey and Dirac, outputs vs inputs.
There's no real reason for speculation, i think.
 
OP
pkane

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,526
Likes
10,074
Location
North-East
That seems way overkill. SSE3 optimization allows the SoX resampler DSP for Foobar2000 to run at CPU loads in the low single-digit % range on an age-old Core 2 Duo, and SoX VHQ is reasonably fancy.
Except when you try a to apply a 128M-tap filter, which, as this thread demonstrates, isn’t needed ;)
 

Frgirard

Major Contributor
Joined
Apr 2, 2021
Messages
1,737
Likes
1,040
Hi,
I don't think i was incorrect. I think maybe you misunderstood/over extended what i wrote, ....or i just don't wrote clearly :)
I spoke only of phase. And sure, FIR can be used linear phase, minimum-phase (IIR replication), or mixed phase.

And another yes, group delay is defined as the (negative) derivative of phase over frequency.
But your comment that minimum phase filters lead to minimal group delay leaves me very bewildered.
I see it as opposite....min phase filters (like xovers and system high-pass as I mentioned), are the major source of phase rotation/slope...and hence the source of group delay.
Minimum phase high-Q PEQs are of course another source of phase warp / group delay..
So in my mind, minimum phase is all about being the source of group delay.
Whereas linear phase is all about avoiding group delay.
The FIR in minimum phase is called IIR. The FIR in minimum phase doesn't exist.
The time of filter calculations can be variable in FIR and affect latency.
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,184
Likes
2,642
Location
Salvador-Bahia-Brasil
It changes my meager understanding of how Audyssey works!
When I quickly looked at the manual before replying to you earlier, I saw a page on biquad IIR targets and said to myself, "aw shit, just another IIR processor".
Now, further into the manual, I see what you say ...all FIR, and the biquad stuff was just for setting/picturing PEQ targets.

Which means, who knows what Audyssey is doing...like Dirac, who knows..
Because FIR can be anything....IIR replication, lin phase, mixed phase, etc.
I also read that Audyssey assesses the host computer in determining how much FIR processing to apply. Cool.

I really wish some folks would take the time to run transfer functions of the Audyssey and Dirac, outputs vs inputs.
There's no real reason for speculation, i think.

all room corecting software will use "mixed phase" filters, simply because FR errors that are linear phase don't need a linear phase filter.
there isn't realy a diference in the principle between diferent software.
like allready mentioned, Dirac is limited by hardware in AVRs

here is an intresting read: https://www.mdpi.com/2076-3417/8/1/16/htm

btw: I aree with others that the title is missleading, as room correction has nothing to do with the topic
 

xnor

Active Member
Joined
Jan 12, 2022
Messages
193
Likes
207
But your comment that minimum phase filters lead to minimal group delay leaves me very bewildered.
I see it as opposite....min phase filters (like xovers and system high-pass as I mentioned), are the major source of phase rotation/slope...and hence the source of group delay.
Minimum phase high-Q PEQs are of course another source of phase warp / group delay..
So in my mind, minimum phase is all about being the source of group delay.
Whereas linear phase is all about avoiding group delay.
That's the misunderstanding. (And I don't want to sound like an ass, but most people get this wrong when it comes to linear phase filters.)

The slope of the phase tells you the group delay. A linear phase filter has a linear (duh) phase response, which means the slope is constant vs frequency but that does NOT mean that it's zero. A linear phase filter can have a very high slope (very high group delay), but the phase response is linear which also means that the group delay is constant. So the group delay is a "flat line" vs frequency, for example a constant 8k samples of delay for a 16k taps linear phase brickwall filter.

To achieve the same magnitude response, a minimum phase filter will have a much lower phase shift overall, which also minimizes the group delay.
But since the slope will change vs frequency, so will the group delay.

Here's an example 100 Hz lowpass filter:
1661694301958.png


The linear phase response is linear vs the linear frequency axis and the phase shift is magnitudes greater than that of the min phase filter, naturally.

The min phase filter's phase response is compressed too much in the comparison, so let's look at it in isolation (now with logarithmic frequency axis which also shows the magnitude response in a more readable way):
1661694476711.png


And this results in the minimal albeit non-constant group delay:
1661694566265.png


The min phase filter only delayed by 4ms over a wide range and 6ms tops. (Btw, with a different filter choice you can also create such a min phase lowpass with a flattened group delay, i.e. no peak.)
While for the linear phase filter it's a constant ~46 ms.
This can also be proven mathematically.


Btw, any "deviation" from min phase necessitates "unnatural" pre-ringing in the impulse response.
Another beautiful attribute of min phase is that you can perfectly undo any deviation just by filtering with another min phase filter with inverted magnitude response. This does not work for non-min phase systems, because of the all-pass (extra phase shifting, delaying) components.
 
Last edited:

don'ttrustauthority

Addicted to Fun and Learning
Forum Donor
Joined
Feb 10, 2021
Messages
679
Likes
376
I watched a video from the guy who designs the Chord dacs and he claims that, in the digital domain, audibility extends to below -300 db, after being transferred into the analog domain.

I have no idea why this would be.
 

Cbdb2

Major Contributor
Joined
Sep 8, 2019
Messages
1,480
Likes
1,407
Location
Vancouver
No, there won’t be any signal above 22.05kHz. By definition. There is no technical reason of the 20kHz limit.
What I meant was, there is almost no "music" above 20khz so the IMD caused by a poor filter from almost no signal will probably be inaudable.
 
Last edited:

gnarly

Addicted to Fun and Learning
Joined
Jun 15, 2021
Messages
963
Likes
1,343
That's the misunderstanding. (And I don't want to sound like an ass, but most people get this wrong when it comes to linear phase filters.)

The slope of the phase tells you the group delay. A linear phase filter has a linear (duh) phase response, which means the slope is constant vs frequency but that does NOT mean that it's zero.

Aaah, i see the root of one difference in our understandings.

I don't consider a constant delay to be group delay, or a part of group delay.
Acoustic time or flight, constant processing latency, FIR time, etc....any fixed-time delay....needs to removed from a transfer function to make meaningful sense of phase, imo.

And yes, if phase is linear across the spectrum, the group delay is constant... but it's zero in my book ! (for reason just stated)

To achieve the same magnitude response, a minimum phase filter will have a much lower phase shift overall, which also minimizes the group delay.
But since the slope will change vs frequency, so will the group delay.

Here's an example 100 Hz lowpass filter:
View attachment 227165

The linear phase response is linear vs the linear frequency axis and the phase shift is magnitudes greater than that of the min phase filter, naturally.
I've already stated my position that constant delay should be removed from an analysis of a comparison like this.
The minimum phase low pass is the only one that has phase shift !

Until the idea is set aside, that constant delay is group delay.... the further comparisons that follow, simply make no sense imho.
The min phase filter's phase response is compressed too much in the comparison, so let's look at it in isolation (now with logarithmic frequency axis which also shows the magnitude response in a more readable way):
View attachment 227168

And this results in the minimal albeit non-constant group delay:
View attachment 227169

The min phase filter only delayed by 4ms over a wide range and 6ms tops. (Btw, with a different filter choice you can also create such a min phase lowpass with a flattened group delay, i.e. no peak.)
While for the linear phase filter it's a constant ~46 ms.
This can also be proven mathematically.

Btw, any "deviation" from min phase necessitates "unnatural" pre-ringing in the impulse response.
I agree with the exception of complementary linear phase xovers. There's no reason for pre-ring with them if well implemented.
Another beautiful attribute of min phase is that you can perfectly undo any deviation just by filtering with another min phase filter with inverted magnitude response.
Yep, that's often the problem with such inversions. Too perfectly.
A pure inversion like that inverts everything, the good, bad, and ugly Lol.
This does not work for non-min phase systems, because of the all-pass (extra phase shifting, delaying) components.
Yes, and is why simple inversion doesn't work for an entire speaker that is not a full-ranger (one driver, no xovers)
Xover regions, being non-min phase with their all-pass phase rotations, are not really suitable for such inversions (or phase corrections)
That's one of the reasons I've so far stayed away from room correction products...wondering how they actually separate min phase single-driver-only regions from xover-two-driver all-pass phase regions from room reflections from yada.....
 
Last edited:

gnarly

Addicted to Fun and Learning
Joined
Jun 15, 2021
Messages
963
Likes
1,343
all room corecting software will use "mixed phase" filters, simply because FR errors that are linear phase don't need a linear phase filter.
there isn't realy a diference in the principle between diferent software.
like allready mentioned, Dirac is limited by hardware in AVRs

here is an intresting read: https://www.mdpi.com/2076-3417/8/1/16/htm

btw: I aree with others that the title is missleading, as room correction has nothing to do with the topic
Thanks for the paper...i'll need to study it more.

I've always like the idea of a room transfer function (RTF)...and the associated idea of inverting it.
From what little I've studied it, they seem to be the core ideas behind the auto-room products.

What bothers me though, is I've learned enough from quasi-anechoic tuning of multi-way DIYs, that I wonder:
how much they correct to a spot? (not my cup of tea)
or do they correct to a wide enough area, that a simple RTA and good ole EQ will do close to the same?

Or rather, how much does mixed phase really bring to the party?
 

Plcamp

Addicted to Fun and Learning
Joined
Jul 6, 2020
Messages
860
Likes
1,314
Location
Ottawa
BTT (Before This Thread) I had the simplistically convenient view that the available number of FIR taps limited the frequency you could effectively filter (lower freq = more taps required) and limited the depth of effect (more attenuation / slope of attenuation = more taps required) and produced a “dc offset” of group delay.

But then I read this and now I have to study it more. Damn!
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,184
Likes
2,642
Location
Salvador-Bahia-Brasil
Thanks for the paper...i'll need to study it more.

I've always like the idea of a room transfer function (RTF)...and the associated idea of inverting it.
From what little I've studied it, they seem to be the core ideas behind the auto-room products.

What bothers me though, is I've learned enough from quasi-anechoic tuning of multi-way DIYs, that I wonder:
how much they correct to a spot? (not my cup of tea)
or do they correct to a wide enough area, that a simple RTA and good ole EQ will do close to the same?

Or rather, how much does mixed phase really bring to the party?

another thing you can study is the documentation of Denis Sbragion's DRC as he basicly shows all the stages behind it: http://drc-fir.sourceforge.net/doc/drc.html
he talks about seperating minimum phase from excess phase, preventing artifacts, taps, listening position and all other stuff.
Dirac, Acourate, Audiolense, they all work kind of similar to it...mostly differing in automation and user tools
 
Last edited:
Top Bottom