|Remember folks... With antialiasing filtering applied to digital playback, there are no gross "stairsteps" in the oversampled/upsampled analogue output. Regardless of what you might see from misleading audio ads trying to pigeon-hole "digital". The exception being non-oversampling DACs that specifically choose to go down the stair-step path.|
One of the nice features of piCorePlayer is that it allows easy control of upsampling by using SoX; in the "Advanced" settings is the ability to pass along instructions to control the digital filtering used. Combined with a good DAC that accepts high sample rate PCM, we can try listening for ourselves and gain an appreciation of the differences that digital filtering make. The cool part of this is that it allows us to "emulate" the kinds of filters used in the audiophile world.
In this post, let's play with some of the parameters and show the kinds of impulse responses and "digital filter composite" graphs we can achieve...
As per the post last week on Bluetooth, I mentioned that I used to have the Oppo Sonica DAC until recently. The demonstration in this post actually used the Sonica DAC to grab some impulse responses and frequency spectrum results while playing with piCorePlayer a few months back. One of the nice features of the Sonica DAC and some other modern devices is the capability of USB input at 24-bit/768kHz! Seriously, we're never going to be buying "high-resolution" files at 768kHz (heck, I don't even see value in 176.4/192kHz). The only "value" therefore of this feature is for the purpose of running our own upsampling like what we'll be exploring today or with commercial offerings like Signalyst's HQPlayer. At such high sampling rates, the device's own upsampling digital filter will be bypassed.
Remember, you can just as well upsample to 176.4/192kHz or 352.8/384kHz with many if not most DACs these days to experiment with filter settings.
|Here ya go. Sonica DAC upsampling to 768kHz.|
So, let's get at this and play with a few parameters and show what the output looks like!
1. Linear phase sharp "brick wall" filter... "Chord-like" impulse response.First, let's have a look at a technically ruler flat filter. About the best antialiasing suppression filter you're ever going to see. Because this baby is linear phase, there is no phase shift across the spectrum which generally is a good thing that reduces temporal smearing.
A quick primer on the "Upsampling setting" parameters. The "recipe" goes like this as per the piCorePlayer "more" button:
- recipe = (v|h|m|l|q)(L|I|M)(s) [E|X]
- E = exception - resample only if native rate not supported
- X = async - resample to max rate for device, otherwise to max sync rate
- flags = num in hex
- attenuation = attenuation in dB to apply (default is -1db if not explicitly set)
- precision = number of bits precision (HQ = 20. VHQ = 28)
- passband_end = number in percent (0dB pt. bandwidth to preserve. nyquist = 100%)
- stopband_start = number in percent (Aliasing/imaging control. > passband_end)
- phase_response = 0-100 (0 = minimum / 50 = linear / 100 = maximum)
Using the Juergen Reis inspired "Digital Filter Composite" (DFC) graph, it looks like this coming out of the Sonica DAC:
Note the small amount of harmonic distortion as a result of hardware limitations. Remember, this is an actual measurement from the DAC using my Focusrite Forte ADC so it's not a representation of the "perfect" digital data itself; rather real-life output.
And check out the impulse response - beautiful :-) !
|Click on image to zoom in and have a look...|
By the way, if you're interested in hearing more about Rob Watts' WTA Chord filter, check this out (CanJam RMAF 2017):
Check out particularly from 14:15 onward where he talks about tap length, temporal reconstruction, etc... Hmmm, while I agree that we typically don't have to worry about ringing, to claim that going from a long 26,000 to 164,000 to 1,000,000 tap filters result in significant improvements each time (~23:30 onwards, 25:30 for 1M taps) obviously is suspicious since biology doesn't work like this - qualitative plateau with diminishing returns is the rule. Let's also not forget that a large number of taps adds to latency which may or may not be significant (depending on samplerate) and will waste more processing power for likely no ultimate gain. I'm sure big numbers help sell the next generation of products though...
Coming back to our filter setting above, the price to pay for this long filter is a bit more CPU cycles as expected. With the Raspberry Pi 3, doing this uses ~25% of processor cycles for 768kHz upsampled output - no big deal even for a low power machine.
2. Linear phase sharp but less steep filter... "Typical" DAC settings.
As expected then, the impulse response isn't as long in duration as the "brick wall" above:
3. Minimum phase sharp filter... "Old-Skool Meridian"-like.Remember back in 2009, Meridian came out with their 808.2 devices basically featuring minimum phase filters. Seemed cool back then; this idea of fancy mysterious filtering and all.
Here's something similar to try:
Here's what the impulse response looks like:
Classic minimum phase without that "pre-ringing". Remember the "price" to pay for this kind of behaviour - a phase shift:
|Comparison of SoX linear vs. minimum phase response.|
The image above is a demonstration of the variation in phase across the frequency spectrum when we use minimum phase antialiasing filters. Unfortunately RightMark messes up the Y axis which should correspond to the degree of the phase shift.
Thankfully, humans are not very good at detecting phase anomalies (check out this excellent Audioholics research article from back in 2005). Remember that minimum phase filters have been in use in Apple products like iPhones and iPads for ages (but not the classic iPods though)!
4. Minimum phase, very slow roll off, highly aliasing filter - "MQA-like".Ahhh, so you want to try something that looks/sounds like MQA's filtering? Give this one a try:
And here's the MQA-like impulse response (the filter is actually a little steeper than what the MQA folks use even!):
I see that others are using "vM::1:28:25:180:0" settings here that may be even closer... But at the end of the day, let's face it, this is simply a very weak antialiasing filter setting.
Since this is a minimum phase filter, it will also have a non-flat phase response graph similar to (3) above but because of the extremely slow roll-off, not nearly as remarkable.
Remember that phase is related to timing and a non-linear phase thus represents variation in temporal delay in the frequency spectrum. So when MQA talks about achieving some kind of temporal "debluring" or reducing "smearing", it's hard to understand what exactly is meant by this claim and how this is supposed to be implemented if the filter selection itself tends toward a non-flat phase response.
5. The "Ultralax" NOS-like FilterFinally, suppose you say "the hell with antialiasing and frequency side effects!", here's one you can try:
First check out the severe frequency anomalies with this filter:
Notice all the ultrasonic aliasing artifacts. Just as important is the slow roll-off characteristic within the audible spectrum. In fact, if I just run a 16/44 test signal through this filter, the frequency response looks like this:
Furthermore, check out the phase distortion when using such a simple filter:
Ouch! Comparatively, this phase distortion makes the minimum phase filter anomaly in (3) above look positively benign!
Behold, the "nice" looking impulse response responsible for all this frequency and timing (phasic) anomaly:
While not exactly the same, many of the characteristics described for this "ultralax" filter are the same as non-oversampling (NOS) DACs. By not performing antialiasing, the frequency anomalies will look like the above, there will be a slow roll-off frequency response, and of course phase distortions. As you know, there are some companies like Audio Note that sell very expensive non-oversampled devices (and even proudly call it "1x oversampling"!). Not my cup of tea - IMO NOS DACs are not "high fidelity" devices even if some pay big money as "high end" products.
So... How do these filters sound?Why don't you have a try and listen for yourself. The cost of admission to build a little Raspberry Pi 3 streamer to connect to a good USB DAC capable of high sample rates is really cheap. Alternatively, you can simply try out some of these settings on a standard PC with SoX (here is the command line flags cheat sheet).
The point is that there's no magic to digital filters and impulse responses. And as I discussed a year back about "ringing" and digital antialiasing filters, remember to not just look at these impulse response graphs and freak out or jump to unnecessarily positive conclusions just because something looks like it doesn't "pre-ring" and has a short duration (the "Ultralax" setting above has a cute looking impulse response, right?)!
Remember that an impulse is an "illegal", non-bandwidth limited test signal that would not exist in nature nor in decent PCM recordings (alas, there are non-decent recordings out in the wild). I would love to have someone show me a favoured audiophile recording where ringing can be an issue on playback! Remember to ask to see the frequency-domain graphs as well (ie. those "DFC"-type plots) so one can appreciate the potential antialiasing limitations when it's being suggested to you that a certain impulse response is desirable. Furthermore, many slow roll-off filters that minimize ringing can act as a type of "tone control" that dulls the high-frequencies (PonoPlayer for example).
For completeness, even though I do not believe ringing is an issue with these antialiasing filters, I must note that this doesn't mean ringing from a linear phase DSP would not be audible in some circumstances with strong transients (eg. snare drum attack). For example, see and listen to this demonstration for what potent ringing sounds like using an extremely high "Q" factor in a low shelf EQ filter when frequencies are being manipulated. An antialiasing playback filter is not manipulating frequencies like this.
From this month, Stereophile has started to publish a series on MQA by Jim Austin with the first article here. As you can see, the article simply shows impulse responses of a few DACs and compares it to MQA. No side-by-side comparison of frequency / aliasing effects. I think it's disingenuous (if not even dishonest) to not show frequency-domain performance as if it doesn't matter (this is part of the MQA MO and claims that they somehow have achieved time-domain mastery from recording to playback, LOL)!
Austin says that "MQA's approach may improve the shape of the impulse response". Hmmm, based on the filter examples I've shown above, all that "shape" means is that they don't have any issues with introducing phase anomalies (a side effect of minimum phase filtering) and they don't care about aliasing (a side effect of MQA's very short, slow roll-off)! Furthermore, as we can see with the Mytek Brooklyn measurements (back in October 2016), the MQA filtering itself is prone to intersample overloading.
I find the tone of the article quite disturbing. There's seemingly the implication that we can look at an impulse response graph, and somehow assume that this is "good". MQA and Stereophile seem to want to "sell" this image of the impulse response as indicative of fidelity which is simply not based in reality! Is it any wonder the negative comments to this article based on technical grounds?
I seriously hope that Stereophile digs deeper for the upcoming parts of their MQA series. Jim Austin states "I hope to find a way to demonstrate and test deblurring - how MQA handles imperfect files - for a future article". Yes, please do that.
I hope that Mr. Austin can truly keep an open mind and report honestly with full journalistic freedom; recognizing that perhaps what he uncovers could suggest that MQA is not in the best interest of audiophiles seeking highest sound quality. Surely there must be some "cons" to all the apparent "pros" reported about MQA in the mainstream audiophile media, right, Jim?
I see that Rocky Mountain Audio Fest 2017 has now uploaded a bunch of the seminar videos. Probably the most interesting talk is this one given by Bob Carver (check out 24:45 - Stereophile with Peter Aczel "The Carver Challenge" and accuracy, philosophical comment about "facsimile" reproduction, measured transfer functions, and voicing):
Holiday time for Christmas and New Years. Here's hoping peace, joy, and a wonderful 2018 to you and yours...
Enjoy the music and hope you're having fun with the hobby!