Popular Post soxr Posted June 28, 2017 Popular Post Share Posted June 28, 2017 I have been studying MQA's inner workings for several months by looking at measurements and talking to a lot of MQA influencers and opponents, and came to the idea of using minimum phase upsampling on MQA encoded content, to compare the results with original DXD files from which MQA files are derived. My affilliation with streaming is that I'm a product designer and use a lot of DSP, but want to open source my findings and give it back to the world. I own a Metrum Adagio NOS dac and also a Mytek Brooklyn MQA dac, several vitus audio amps including RI-100 and SS-025 and Amphion's One 18 and Two 18 studio monitors and the Amphion Krypton flagship. So what's best to judge claims about studio quality: studio monitors. For months, I have been suspecting MQA to use minimum phase resampling. Years ago I did a test with sox: take a 24/96 file with verified ultrasonic content, and derive a 16/44.1 file from this (using minimum phase resampling) and then upsample it back to the original resolution: 24/96. I cropped both files to one minute, and put up two files on my web server: a.wav and b.wav, put the links on some forum and the shootout started. We had a lot of hifi professionals listen to these files, as well as studio engineers. Most could not hear the difference. One was cheating by looking at the spectrum with his audio editing tool, and one ultra high-end dealer claimed to correctly identify the real highres file. All others did not hear it and reacted: wow great resampler you have there. This resampler is the open source sox tool. It can also be used from within other software using the soxr library. Both support minimum phase resampling. Why minimum phase? Minimum phase corresponds to what MQA is pursuing: it does not add pre-ringing, but moves all the errors to post-ringing, to which our hearing is not sensitive. MQA also tries to get rid of the post-ringing in their rendering phase, which is why MQA sounds so different from the master. If this is better or different is subjective, but I personally do find MQA files decoded on the Brooklyn to have more echo and reverb than the original DXD masters, but voices are ruined. Some of the vocal qualities are gone and it sounds polished. So what if we could use MQA as a compression only, and don't apply their post processing. That means we need to find a way that MQA sounds like the master, without the polishing. As a designer, I was implementing minimum phase upsampling in realtime, and with this option enabled, my undecoded MQA files sounds identical to the DXD files! This was on my todo for months, but with MQA it just got speedup. Using minimum phase on non-MQA redbook 16/44.1 files, it also sounds better to my ears than regular linear phase upsampling. As I want to share my findings with the world, how could I give back my resampling recipe so that anyone can benefit: sox So to do this experiment yourself: Download corresponding MQA and DXD files from 2L.no for one of their demo's and put them in a folder:http://www.2l.no/hires/ 66M 2L-087_06_stereo_DXD_FLAC.mqa.flac 505M 2L-087_stereo-DXD_06.flac now use sox on the smaller MQA file to derive an upsampled DXD file: general usage: sox -S input.mqa.flac output.flac -vsM 352800 so with the above MQA file: sox -S 2L-087_06_stereo_DXD_FLAC.mqa.flac MQA_upsampled.flac rate -vsM 352800 Now playback MQA_upsampled.flac 2L-087_stereo-DXD_06.flac on a high-end set with a DAC capable of doing 352.8 Khz. We tried this on several expensive systems and could not hear any difference. We sent these files to other designers and they could not hear the difference. How to get sox? Any logitech media server includes a working sox binary, so that's an easy way to get sox:http://www.mysqueezebox.com/download Or download it as a standalone build:https://sourceforge.net/projects/sox/files/sox/ But what about Tidal? To use minimum phase upsampling with Tidal, you need a player that can do minimum phase. The goal of this post is to explain the underlying resample technology that exists for years, and that MQA is also using. When looking at http://archimago.blogspot.be/2017/06/measurements-audioquest-dragonfly-black_24.html it's clear that MQA is using minimum phase resampling that does not add pre-ringing, which is good, as avoiding pre-ringing will keep the transient sharpness: However, MQA is also trying to solve a problem which is not a problem, that is to get rid of the postringing of minimum phase resampling: Sox has a very similar response to the minimum phase resampler the AQ is using by default: This is basically what we are doing with our sox converter. We are upsampling 24/44.1 MQA files back to the original resolution of 24/352.8 Transient sharpness is guarded as no pre-ringing is added sucking up dynamic range to which our hearing is sensitve, but we don't cut of the tail, which is the main cause for the sound difference with full MQA decoding. Full MQA decoding is no longer master quality but a polished version. Brian Lucey has already stated that MQA sounds thinner than the original, and with more distortion.https://www.gearslutz.com/board/12548751-post460.htmlhttps://www.gearslutz.com/board/12551196-post482.html This is logical: the post-ringing energy in the tail that MQA tries to get rid of, needs to be distributed to some other place in the waveform, causing distortion such as aliasing and HF noise. MQA created a solution for a non-existing problem. Here we propose and elegant solution using sox minimum phase resampling to upsample undecoded MQA files back to it's original samplerate, with virtually indistinguishable sonic difference from the real studiomaster file that was used to create the MQA version. Any power user with basic command line skills can test these claims. If developers of music players start implementing minimum phase as a selectable resampling method, it will upsample MQA to what the original master engineer had intended, without the MQA sauce that tries to get rid of the post-ringing, but trades this with new artefacts. I hope that other coders/developers/open source advocates will benefit from these findings and adopt these resampling recipes into their own code. For developers: MQA flac files are marked with the encoder flag: ENCODER=MQAEncode v1.1, 2.1.0+0 (01450a4), DF77A107-A71F-4e57-A322-872C6D0E99C8, Apr 20 2016 17:08:42 To know which was the original resolution for the upsample reconstruction: ORIGINALSAMPLERATE=352800 Using the soxr library, you can clearly observe that minimum phase is a selectable option:https://github.com/chirlu/soxr/blob/master/src/soxr.h As MQA files do not contain any content above half of 88.2K or 96K, on 192K dacs you could upsample to 176400 for 24/44.1 MQA files or 192000 for 24/48 MQA files. We believe Auralic has figured out the above as well. I am not affiliated with Auralic, but I do not want to keep this finding secret. As my past 20 years before being a product designer have been possible thanks to open source, if I can give knowledge back to the world: here it is! buonassi, MrMoM, Bob Stern and 4 others 7 Link to comment
The Computer Audiophile Posted June 28, 2017 Share Posted June 28, 2017 I haven't read through it all yet, but thanks for posting all this info @soxr Founder of Audiophile Style | My Audio Systems Link to comment
Jud Posted June 28, 2017 Share Posted June 28, 2017 What I’ve read several people who have looked at MQA say in this forum in various threads is that the MQA filtering doesn’t cut sufficiently to get rid of the post-ringing. You say that it does get rid of the post-ringing to such an extent it sounds “thin.” Can you show or describe the cut in the filter that gets rid of the post-ringing (for example, how many dB down at what frequency/ies)? One never knows, do one? - Fats Waller The fairest thing we can experience is the mysterious. It is the fundamental emotion which stands at the cradle of true art and true science. - Einstein Computer, Audirvana -> optical Ethernet to Fitlet3 -> Fibbr Alpha Optical USB -> iFi NEO iDSD DAC -> Apollon Audio 1ET400A Mini (Purifi based) -> Vandersteen 3A Signature. Link to comment
vortecjr Posted June 28, 2017 Share Posted June 28, 2017 You can use LMS with the c3po plug-in that uses SOX for re-sampling. This could be a simple way for people to try this scheme out. SONORE computer audio | opticalRendu | ultraRendu | microRendu | Signature Rendu SE | endPoint | opticalModule DX | Power Supplies | Link to comment
Popular Post soxr Posted June 28, 2017 Author Popular Post Share Posted June 28, 2017 14 minutes ago, Jud said: What I’ve read several people who have looked at MQA say in this forum in various threads is that the MQA filtering doesn’t cut sufficiently to get rid of the post-ringing. You say that it does get rid of the post-ringing to such an extent it sounds “thin.” Can you show or describe the cut in the filter that gets rid of the post-ringing (for example, how many dB down at what frequency/ies)? It tries to get rid of it, but as you can see from archimago's latest blog entry, it's not perfect. I'm not interested in the exact filter sets they have created so I'm not interested in reverse engineering of that part. As these filters change the intention. I do not care. If more MQA files start to live on streaming and on download services, I want what the engineer heard, not what MQA is adding or removing. So with the correct minimum phase resampler you will hear what the engineer intended (= similar to file used to create MQA file that is send to some remote MQA facility). That part anyone can peer review with the method disclosed here. I believe MQA is adding flags during encoding for their deblur filter (one of 32 possible transient responses), which is applied in the render phase of the MQA decoder. With minimum phase sox resampling we do something similar to what is done in the renderer, but with a much higher quality resampler (sox), and without one of the 32 transient response modifiers. darkless and Nikhil 2 Link to comment
bibo01 Posted June 28, 2017 Share Posted June 28, 2017 1 hour ago, soxr said: sox -S input.mqa.flac output.flac -vsM 352800 As I am not too familiar with SoX, what do exactly "-S" and "-vsM" do? How curious are you? Link to comment
The Computer Audiophile Posted June 28, 2017 Share Posted June 28, 2017 Anyone know if JRiver still has SOX integration? I'm not at home, otherwise I'd look. Founder of Audiophile Style | My Audio Systems Link to comment
soxr Posted June 28, 2017 Author Share Posted June 28, 2017 -S = verbose output what sox is doing -vsM is the resample recipe Link to comment
soxr Posted June 28, 2017 Author Share Posted June 28, 2017 Example output #sox -S 2L-050_01_stereo_DXD_WAV.mqa.flac 2L-050_01_stereo_DXD_WAV.mqa_UPSAMPLED.flac rate -vsM 352800 Input File : '2L-050_01_stereo_DXD_WAV.mqa.flac' Channels : 2 Sample Rate : 44100 Precision : 24-bit Duration : 00:03:01.75 = 8015028 samples = 13631 CDDA sectors File Size : 49.6M Bit Rate : 2.18M Sample Encoding: 24-bit FLAC Comments : ALBUM=DIVERTIMENTI ARTIST=TrondheimSolistene CATALOG=2L-050 COMPOSER=Benjamin Britten DATE=2008-06-03 DESCRIPTION=Following on from the award winning recording of MOZART's violin concertos with Marianne Thorsen, TrondheimSolistene team up once again with the recording company 2L for their new production. This album features a selection of some of the finest and most technically challenging repertoire for string orchestra, and includes repertoire by Benjamin Britten, the Polish composer Grazyna Bacewicz, the Norwegian composer Terje Bjørklund as well as Bela Bartok's seminal work for string orchestra the Divertimento. DIVERTIMENTI is the first music-only recording to be made available commercially in the ground breaking format of Blu-ray. A true world premiere!<br><br>The divertimento as a musical genre dates back to the nineteenth century. Divertimenti were composed for various social occasions and were intended to be light, uncomplicated and cheerful. Such pieces were often scored for small string ensemble. Over the years this effortless, elegant form has appeared in many different musical styles and, to a large extent, set the standard for the virtuosic chamber music we know today. A number of the most prominent composers of our age have engaged with this most fascinating musical style and have contributed to its further refinement as a chamber-symphonic showpiece. <br><br><strong>5.1 SURROUND + STEREO</strong> produced in DXD (Digital eXtreme Definition 352kHz/24bit) by Lindberg Lyd, Norway DISCNUMBER=1 DISCTOTAL=1 ENCODER=MQAEncode v1.1, 2.1.0+0 (01450a4), DF77A107-A71F-4e57-A322-872C6D0E99C8, Apr 20 2016 17:08:42 GENRE=Art Music > Classical > Classical GRID=A10314Q0000034188A ICPN=7041888512820 ISRC=NOMPP0802010 LABEL=2L ORIGINALSAMPLERATE=352800 PERFORMER=Trondheimsolistene PERFORMER=Øyvind Gimse PERFORMER=Geir Inge Lotsberg TITLE=BRITTEN Simple Symphony, Op 4: I. Boisterous Bourree TOTALTRACKS=11 TRACKNUMBER=1 TRACKTOTAL=11 In:6.85% 00:00:12.45 [00:02:49.30] Out:4.34M [ =|== ] Hd:0.2 Clip:0 Link to comment
Popular Post mansr Posted June 28, 2017 Popular Post Share Posted June 28, 2017 8 minutes ago, bibo01 said: As I am not too familiar with SoX, what do exactly "-S" and "-vsM" do? -vsM is shorthand for "-v -s -M" options of the "rate" filter. -v: very high quality -s: steep filter -M: minimum phase buonassi and bibo01 1 1 Link to comment
Don Hills Posted June 28, 2017 Share Posted June 28, 2017 Soxr, If I have read your description correctly, you are taking the distributed MQA file (24/44.1, with noise in the lowest 8 bits) and upsampling it to the original resolution with a minimum phase filter. I can appreciate that this would sound very similar to the original, similar to downsampling to 16/44.1 and back up again. What do you think the results would be of first passing the MQA file through the MQA Core decoder to retrieve the content encoded in the lowest 8 bits, before upsampling? "People hear what they see." - Doris Day The forum would be a much better place if everyone were less convinced of how right they were. Link to comment
ShawnC Posted June 28, 2017 Share Posted June 28, 2017 1 hour ago, The Computer Audiophile said: Anyone know if JRiver still has SOX integration? I'm not at home, otherwise I'd look. Yes it is Computer setup - Roon/Qobuz - PS Audio P5 Regenerator - HIFI Rose 250A Streamer - Emotiva XPA-2 Harbeth P3ESR XD - Rel R-528 Sub Comfy Chair - Schitt Jotunheim - Meze Audio Empyrean w/Mitch Barnett's Accurate Sound FilterSet Link to comment
soxr Posted June 28, 2017 Author Share Posted June 28, 2017 4 minutes ago, Don Hills said: Soxr, What do you think the results would be of first passing the MQA file through the MQA Core decoder to retrieve the content encoded in the lowest 8 bits, before upsampling? One would need to capture the output of a core decoder, run that through sox rate -vsM $ORIGINALRESOLUTION, and compare that with the original master file. sox upsampling will be superior to the low quality upsampler with small amounts of taps that needs to run in the dragonfly on a limited power budget supplied via 5V USB. But does it matter? Please do the experiment. Download any MQA file from 2L.no which has a DXD counterpart, upsample with sox with the exact settings in this topic and compare to DXD. If you cannot hear the difference, then the method is good enough. DXD is the real studiomaster, this is what the engineer worked on. 2L.no has one of the highest quality standards. I challenge others to do the sox test. It's not so hard. I cannot put these files on some site because of copyright law, otherwise all the upsampled MQA files and their DXD counterparts would already be on the internet so you don't have to figure out how to get sox running on your system. I made an internal mirror of the MQA and DXD files as I may suspect that 2L.no could potentially remove one of the two, making the comparison impossible for peer review. Link to comment
pkane2001 Posted June 29, 2017 Share Posted June 29, 2017 3 hours ago, mansr said: -vsM is shorthand for "-v -s -M" options of the "rate" filter. -v: very high quality -s: steep filter -M: minimum phase How different is this to, say, the HQPlayer poly-sinc-xtr-mp filter? The description sounds similar to the above. -Paul DeltaWave, DISTORT, Earful, PKHarmonic, new: Multitone Analyzer Link to comment
The Computer Audiophile Posted June 29, 2017 Share Posted June 29, 2017 18 minutes ago, pkane2001 said: How different is this to, say, the HQPlayer poly-sinc-xtr-mp filter? The description sounds similar to the above. Paging @Miska Founder of Audiophile Style | My Audio Systems Link to comment
soxr Posted June 29, 2017 Author Share Posted June 29, 2017 6 hours ago, pkane2001 said: How different is this to, say, the HQPlayer poly-sinc-xtr-mp filter? The description sounds similar to the above. HQplayer has minimum phase options, so it can work. You just need to find which recipe sounds the most similar like DXD up to a point where you no longer can hear the difference. As a link to the source and header files is included in my article, it should be very easy for other devs to find the exact settings that mimick sox -vsM They could link soxr in their player, which is allowed as soxr is LGPLv2. Jud 1 Link to comment
audiventory Posted June 29, 2017 Share Posted June 29, 2017 Thank you @soxr for your experiments. I think, it is useful information for better understanding of MQA issue. All what I wrote in this post is hypothesys only. Probably in the further discussion we will find new reference points, based on new information. If I uderstand correctly, that was said in the first post: 1. MQA file upsampling with certain resampling give sound, that similar (in several listners opinion) to allegedly original DXD file, on certain equipment. 2. Minimum phase filter give better for certain resampler (in @soxr opinion) sounding then linear phase filter of ht resampler. 3. Unfolding does not performed in this experiment. In 1. and 2.: 1) many "certain" term. I suppose, that it is implementation issues. 2) I wrote "opinion" because there is not reference to exact experiment. About 3. If unfolding undone, so ultrasound isn't restored. As I remember, at MQA's highest frequency range placed folded information, that like to noise without unfolding, and after unfolding the spectrum like to original one. That it is mean? a) By currently proved information we can't hear above 16 ... 22 kHz. b) Thus the folded information and ultrasound may be unlistenable. Therefore upsampling to 384 kHz keep most important ( in my opinion according a) and b) ) audible information. It is may be one of reasons why listeners don't hear difference between allegedly original DXD file and upsampled MQA file. However, for more reliable objective knowledge (independent on number of experiments, participants) need serious professional double blind test with exact protocol: big number participants and tests, equipment and listening room(s) specification, methodics, etc. However, such researches learn implementations rather (certain hardware, software) then [Upsampling vs. MQA]. Also I don't met before correct researches of minimum phase filter. Probably somebody can share protocols of such researches. Jud 1 AuI ConverteR 48x44 - HD audio converter/optimizer for DAC of high resolution files ISO, DSF, DFF (1-bit/D64/128/256/512/1024), wav, flac, aiff, alac, safe CD ripper to PCM/DSF, Seamless Album Conversion, AIFF, WAV, FLAC, DSF metadata editor, Mac & WindowsOffline conversion save energy and nature Link to comment
mansr Posted June 29, 2017 Share Posted June 29, 2017 9 hours ago, pkane2001 said: How different is this to, say, the HQPlayer poly-sinc-xtr-mp filter? The description sounds similar to the above. I have no idea, but you could probably tease the impulse response out of HQPlayer if you tried. 2 hours ago, soxr said: You just need to find which recipe sounds the most similar like DXD up to a point where you no longer can hear the difference. As a link to the source and header files is included in my article, it should be very easy for other devs to find the exact settings that mimick sox -vsM It's easy enough to dump the exact coefficients used by sox and use them with any other software that supports custom filters. Link to comment
soxr Posted June 29, 2017 Author Share Posted June 29, 2017 22 minutes ago, mansr said: It's easy enough to dump the exact coefficients used by sox and use them with any other software that supports custom filters. It's all in the source of sox, e.g.:https://github.com/chirlu/soxr/blob/master/src/half_coefs.h Link to comment
Cebolla Posted June 29, 2017 Share Posted June 29, 2017 The MinimServer UPnP media server can resample using SoX via its MinimStreamer transcoder, with appropriate streaming options set and a version of ffmpeg built with libsoxr, installed on the same machine: http://minimstreamer.com/userguide.html#Streaming options https://www.johnvansickle.com/ffmpeg/ asdf1000 1 We are far more united and have far more in common with each other than things that divide us. -- Jo Cox Link to comment
soxr Posted June 29, 2017 Author Share Posted June 29, 2017 Squeezelite as shipped with a lot of linux audio distributions and raspberry pi distributions, can do it too: http://manpages.ubuntu.com/manpages/trusty/man1/squeezelite.1.html this one is a little obscure and prone to typo's, based on the manpage <recipe>:<flags>:<attenuation>:<precision>:<passband_end>:<stopband_start>:<phase_response> squeezelite -r upample_rate -u ::::::0 or to have the exact settings with squeezelite as with the sox command shown earlier squeezelite -r upample_rate -u vsM Link to comment
Bob Stern Posted June 29, 2017 Share Posted June 29, 2017 @soxr: Are you Rob S, the developer of sox? HQPlayer (on 3.8 GHz 8-core i7 iMac 2020) > NAA (on 2012 Mac Mini i7) > RME ADI-2 v2 > Benchmark AHB-2 > Thiel 3.7 Link to comment
mansr Posted June 29, 2017 Share Posted June 29, 2017 1 minute ago, Bob Stern said: @soxr: Are you Rob S, the developer of sox? Not if his comments on Archimago's blog were under his real name. Link to comment
Jud Posted June 30, 2017 Share Posted June 30, 2017 12 hours ago, mansr said: you could probably tease the impulse response out of HQPlayer if you tried. Already at http://src.infinitewave.ca for three filters in an earlier version of the software. One never knows, do one? - Fats Waller The fairest thing we can experience is the mysterious. It is the fundamental emotion which stands at the cradle of true art and true science. - Einstein Computer, Audirvana -> optical Ethernet to Fitlet3 -> Fibbr Alpha Optical USB -> iFi NEO iDSD DAC -> Apollon Audio 1ET400A Mini (Purifi based) -> Vandersteen 3A Signature. Link to comment
daverich4 Posted June 30, 2017 Share Posted June 30, 2017 On 6/28/2017 at 6:45 PM, The Computer Audiophile said: Anyone know if JRiver still has SOX integration? I'm not at home, otherwise I'd look. JRiver 22 has SOX. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now