• 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 many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Question about filters - MQA vs Hi-Res?

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,424
Likes
4,030
Location
Pacific Northwest
... Would not remove all aliases be no 1 prio while keeping flat fr in the audible range ? Is not ringing pre or post a red herring as it all take place above human hearing .
Now ripple inside the audible spectrum will be an issue, but does it exist since the 80’s
Yes, removing aliases should be the #1 priority of the reconstruction filter, which means the filter should be down to "negative infinity" at Nyquist. Well, being down at least 60 dB or so should be sufficient.

However, it's not possible to do this with perfectly flat response in the passband (up to 20 kHz), with also perfectly flat phase response. Because 44.1 kHz sampling has a narrow transition band, something has to give. There will be some passband amplitude ripple, some phase shift, some early frequency roll-off, or a combination of these. That said, with a well implemented filter these effects should be tiny and inaudible.

I'll use the WM8741 for example, since I happen to have its datasheet in front of me. At 44.1 kHz, filter #3 (the sharp linear phase filter) has 0.000058 dB of passband ripple (all those zeroes are not a joke, it would be truly inaudible). However, this filter is only down -6.43 dB at 22.05 kHz, so it's not quite doing its most important job. It could leak supersonic frequencies and alias into the passband. In fact, with the WM8741, at 44.1 kHz sampling, only 2 of its 5 filters achieve the most important goal of full attenuation by Nyquist. These are filters #4 and #5, both of which are slow roll-off. #4 is minimum phase, #5 is linear phase, and has passband ripple of only 0.000041 dB. So what's not to like, why not use filter #5? Because it achieves this with slow roll-off; it's flat only up to 18,400 Hz at which point it starts to roll off.

In other words, at 44.1 kHz the chip designers could not achieve perfectly flat amplitude and phase response up to 20 KHz. None of these filters is perfect and it's not obvious which of these any particular device designer would want to use. So why not include several and let them decide what tradeoffs to make? That is what Wolfson did, seems reasonable to me.

BTW, the fact that for this chip, the standard "sharp, linear phase" filter is only down 6 dB at Nyquist seems bad. But looking at Amir's measurements of various DACs, this seems common -- at least at 44.1 kHz. One solution to avoid these compromises would be to use a higher sampling frequency as the standard for digital audio. If so, it wouldn't have to be much higher. For example at 48 KHz sampling, the WM8741's filter #5 is virtually perfect. It's flat to 20,016 Hz with no phase distortion and 0.000041 dB of ripple. This just shows that widening the filter transition band, even just a little, makes it easier to implement transparent digital reconstruction filters. In this sense, the 44.1 KHz sampling rate is just barely high enough to be transparent, or maybe not quite high enough.
 
Last edited:

scott wurcer

Major Contributor
Audio Luminary
Technical Expert
Joined
Apr 24, 2019
Messages
1,501
Likes
2,821
However, it's not possible to do this with perfectly flat response in the passband (up to 20 kHz), with also perfectly flat phase response. Because 44.1 kHz sampling has a narrow transition band, something has to give. There will be some passband amplitude ripple, some phase shift, some early frequency roll-off, or a combination of these. That said, with a well implemented filter these effects should be tiny and inaudible.

It is more accurate to say not practical real time with current hardware. It is easy to show non-realtime filtering with no passband ripple, a transition of 0 to -250dB in < 0.1Hz, and perfect phase.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
I'll use the WM8741 for example, since I happen to have its datasheet in front of me. At 44.1 kHz, filter #3 (the sharp linear phase filter) has 0.000058 dB of passband ripple (all those zeroes are not a joke, it would be truly inaudible). However, this filter is only down -6.43 dB at 22.05 kHz, so it's not quite doing its most important job. It could leak supersonic frequencies and alias into the passband.
Wrong. An interpolation filter can never introduce artefacts into the passband. The filter you describe allows some imaging of frequencies just below Nyquist to frequencies just above. This isn't much of a problem even at 44.1 kHz. Music doesn't have much spectral content above 20 kHz, and it's inaudible anyway. The more important aspect is attenuation of images of frequencies below 10 kHz (where most of the music content is), the first pair falling in the 34–54 kHz range. Non-linear distortion in amplifiers tends to increase with frequency, so strong images here could potentially, through intermodulation, result in audible anomalies. Even if that doesn't happen, dumping all that energy into the tweeters is wasteful at best.

Generally speaking, the ideal is a sharp linear phase filter. A sharper filter is longer, which besides needing more processing power also has higher latency. Processing power can be provided within reason, but there is no way around the latency. Although not an issue for music playback, it does matter in live effects applications where every millisecond counts. This is where slow roll-off and minimum phase filters become reasonable compromises. It is to cater for these various situations that the DAC chips come with multiple filter choices, not out of concern for audiophile fantasies. Well, originally that was the case. Now it seems that some vendors (AKM, ESS) have seen the potential for profit and embraced the nonsense wholeheartedly.
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,424
Likes
4,030
Location
Pacific Northwest
Wrong. An interpolation filter can never introduce artefacts into the passband. The filter you describe allows some imaging of frequencies just below Nyquist to frequencies just above. This isn't much of a problem even at 44.1 kHz. ...
So, you're saying the filter doesn't have to fully attenuate by Nyquist, that this filter #3 which is only -6 dB at Nyquist is OK?
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
So, you're saying the filter doesn't have to fully attenuate by Nyquist, that this filter #3 which is only -6 dB at Nyquist is OK?
I'm saying that not fully attenuating at Nyquist, while an imperfection, does not cause any anomalies in the passband. Whether or not you're OK with some minor images just above Nyquist is ultimately up to you, but this should not be your primary concern. The amount of attenuation above 30 kHz is more important since unattenuated images there are stronger and more harmful.
 

March Audio

Master Contributor
Audio Company
Joined
Mar 1, 2016
Messages
6,378
Likes
9,317
Location
Albany Western Australia
Well, in addition to the posts here, I did some digging through the MQA thread that was shared, and have come up with the following thoughts

- Any audible differences I may have heard between an MQA version of a track on Tidal versus its Qobuz counterpart (using the same DAC) would more than likely be a difference in the masters used than anything else.

- MQA doesn't appear to offer any real advantage to the consumer over existing digital formats, particularly as internet/phone technology improves and file size/download speeds become even less of an issue (if it's not that way already).

Would these be fairly sound conclusions? I'm starting to drop the idea of switching to a DAC that supports MQA - but would it still be worth having a DAC with more filter options? (Mine has 3).
That sums it up nicely.

Set to fast roll off and forget the filter options.
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,424
Likes
4,030
Location
Pacific Northwest
I'm saying that not fully attenuating at Nyquist, while an imperfection, does not cause any anomalies in the passband. Whether or not you're OK with some minor images just above Nyquist is ultimately up to you, but this should not be your primary concern. The amount of attenuation above 30 kHz is more important since unattenuated images there are stronger and more harmful.
You're referring to the fact that if we allow a frequency above Nyquist to leak through, its alias frequency is "reflected" across Nyquist. This actually sheds insight into the particular numbers for this filter I'm using as an example. At 44.1 kHz, the stop band of filter #3 (the sharp / fast rolloff linear phase filter) on the WM8741 is 0.546 fs, which is 24,079 Hz. That's "wrong" from a signal processing perspective, since it's greater than Nyquist. But... take the worst case scenario: it allows a spurious 24,078 Hz tone to leak through. The reflected alias frequency of this tone would be 22050-(24078-22050) = 20,022 Hz. Now, the passband of this filter happens to be .454 fs, which is 20,021 Hz. Coincidence? I think not. That's solid engineering; they set the filter stop band slightly above Nyquist which is "wrong" in theory, but they didn't let it get too high, but just high enough that any aliased tones would be just outside the passband.

However, my point was to address the earlier comment that the only reason for these alternative filters is marketing. No doubt they are used for marketing, but there are also engineering reasons for these different filters. At 44.1 kHz, the filters I've seen are all "imperfect" compromises given the constraint of the narrow filter transition band of 44.1 kHz sampling. So the chip designers give different implementations making different compromises, doing the best they can with each, and let the engineers who use these chips in their products, decide which is best for their application.
 

Matias

Master Contributor
Forum Donor
Joined
Jan 1, 2019
Messages
5,031
Likes
10,806
Location
São Paulo, Brazil

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
You're referring to the fact that if we allow a frequency above Nyquist to leak through, its alias frequency is "reflected" across Nyquist. This actually sheds insight into the particular numbers for this filter I'm using as an example. At 44.1 kHz, the stop band of filter #3 (the sharp / fast rolloff linear phase filter) on the WM8741 is 0.546 fs, which is 24,079 Hz. That's "wrong" from a signal processing perspective, since it's greater than Nyquist. But... take the worst case scenario: it allows a spurious 24,078 Hz tone to leak through. The reflected alias frequency of this tone would be 22050-(24078-22050) = 20,022 Hz. Now, the passband of this filter happens to be .454 fs, which is 20,021 Hz. Coincidence? I think not. That's solid engineering; they set the filter stop band slightly above Nyquist which is "wrong" in theory, but they didn't let it get too high, but just high enough that any aliased tones would be just outside the passband.
You seem to have thoroughly confused sampling and reconstruction. Aliasing happens only during sampling, and a DAC is concerned only with reconstruction.
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,424
Likes
4,030
Location
Pacific Northwest
My comments are based on the Nyquist-Shannon theory and Whittaker-Shannon formula. Regarding reconstruction: if we don't limit bandwidth, there are an infinite number of different analog waves that pass through the sampling points. Without a low pass filter, or with an insufficient filter (one that has a stopband above Nyquist), the DAC could construct a wave that passes through the sampling points, but doesn't match the wave that was recorded and sampled. That is distortion, in one form or another. Limiting the bandwidth to Nyquist eliminates all other possibilities leaving only 1 analog wave that passes through the sampling points, which is the correct wave, assuming it was properly encoded.

You seem to have thoroughly confused sampling and reconstruction. Aliasing happens only during sampling, and a DAC is concerned only with reconstruction.
If this is so, why do they design filter #3 so that Nyquist is the exact center of its transition band (exactly halfway between top of passband and stopband). That is, passband stops at .454fs and stopband is .546fs, the exact center is 0.5fs - Nyquist. If it's not due to the behavior of aliasing "reflecting" around Nyquist, it's so exact it can't be a coincidence; there must be a good reason for it.
 
Last edited:

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
My comments are based on the Nyquist-Shannon theory and Whittaker-Shannon formula.
That may be, but you are still confused.

Regarding reconstruction: if we don't limit bandwidth, there are an infinite number of different analog waves that pass through the sampling points. Without a low pass filter, or with an insufficient filter (one that has a stopband above Nyquist), the DAC could construct a wave that passes through the sampling points, but doesn't match the wave that was recorded and sampled. That is distortion, in one form or another. Limiting the bandwidth to Nyquist eliminates all other possibilities leaving only 1 analog wave that passes through the sampling points, which is the correct wave, assuming it was properly encoded.
Without any reconstruction filter, the DAC would produce the correct output below Nyquist and an infinite series of images above. The reconstruction filter serves to remove those images. The reason we don't want the images is that they can have unwanted effects on downstream components, nothing else. Failure to remove them does not in itself cause any distortion below Nyquist.
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,424
Likes
4,030
Location
Pacific Northwest
... Without any reconstruction filter, the DAC would produce the correct output below Nyquist and an infinite series of images above. ...
This is not true in theory, though it may be true in practice.

Theoretically, without a filter (e.g. unlimited bandwidth), there are infinitely many different waves that pass through the same sampling points. And, importantly, these waves can be different in the passband (below Nyquist). Each wave's alias is a different wave that has the same sampling points, thus these 2 waves are indistinguishable from the sampling points alone. The only way you know which wave to construct, is to limit the bandwidth to Nyquist. That's because the alias frequencies are reflected across Nyquist, so one is always below, and the other above.

For example, here's an image from a spreadsheet I built to demonstrate this.
1586118649121.png

Suppose the entire X axis is 1 second, and we're sampling at 10 Hz (10 samples over this 1 second interval). The blue wave is 3 Hz, which is the original analog wave that was digitally encoded. The red wave is 7 Hz. At 10 Hz sampling, Nyquist is 5 Hz so these 2 waves are aliases of each other - they are equidistant from Nyquist and share the same sampling points. The green bars show the points where these 2 waves intersect, or are equal. Note that these points are perfectly equally spaced at 10 Hz, which is the sampling frequency.

What this intuitively demonstrates is that a DAC without any reconstruction filter could construct a 7 Hz wave instead of a 3 Hz wave, to satisfy these sampling points. This would be different in the passband, because the 3 Hz wave that was actually recorded, would be entirely missing, being replaced by a 7 Hz wave.

I assume your point is that actual DACs in the real world don't work this way, even without a filter they would never do this. Perhaps, it may be that the way DACs actually work prevents them from doing this. Yet in theory, or in general, the DAC's low pass filter doesn't just remove noise above Nyquist, but is an essential part of reconstruction to prevent distortion in the passband.
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
What this intuitively demonstrates is that a DAC without any reconstruction filter could construct a 7 Hz wave instead of a 3 Hz wave, to satisfy these sampling points. This would be different in the passband, because the
Wow. You are much more confused than I thought.

A DAC without a reconstruction filter outputs all the possible frequencies as you've illustrated. The low-pass filter removes the unwanted images above Nyquist. In some non-audio applications, a band-pass filter is used to create high-frequency waveforms without needing a very high sample rate DAC.
 

MRC01

Major Contributor
Joined
Feb 5, 2019
Messages
3,424
Likes
4,030
Location
Pacific Northwest
So you're saying that in this example, the DAC constructs BOTH a 3 Hz and a 7 Hz wave, then filters out the 7 Hz wave? This seems like it would be implementation-specific - are you talking about delta-sigma DACs?
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
So you're saying that in this example, the DAC constructs BOTH a 3 Hz and a 7 Hz wave, then filters out the 7 Hz wave? This seems like it would be implementation-specific - are you talking about delta-sigma DACs?
You get 3 Hz, 7 Hz, 13 Hz, 17 Hz, etc. I can't think of a way to construct a DAC that doesn't do this.

The filter is just that, nothing more. All it can ever do is attenuate some frequencies more than others (and change their phase, but that's unimportant here).
 

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
DACs interpolate at power of two ratios, with these ratios new frequencies won't occur in passband after interpolation, even when filtering is not applied.

Original (status bar at the bottom shows sample rate)
org.png


Interpolated without filtering...
2x
2x.png


3x
3x.png


4x
4x.png


2.5x
110250.png


So, unless we are talking about DACs with ASRC circuitry supporting non integer upsampling ratios, there is no aliasing, just imaging. Even in this case, it is not the DAC introduced aliasing, the ASRC did it.
 
Last edited:
Top Bottom