Jump to content
IGNORED

Upsampling MQA files to original resolution with sox will sound like the original resolution


soxr

Recommended Posts

We can look at the technical aspects of MQA, but I would like to see more people try out the sox / minimum phase method and listen to both versions. To make it easy we could put up 1 minute versions online of both files under fair use.

I opened the upsampled MQA file and the original DXD file into audacity, and except for some ultrasonic information being present in the DXD file and not in the upsampled file (which makes the plot appear having a thicker line), the waveform looks very similar. I don't see any modifications to the transients. I could be wrong or overlook things, which is the reason why this needs peer reviewing.

I don't believe their deblur processing is already applied to the 24/44.1 or 24/48 distribution file, but encoded as a metadata field, which sets the correct post processing filter in the renderer.

If this is the case, then MQA distribution files provide a band limited version of the master with "authentic" transients as the transients have not been sharpened. It does not appear they messed with the phase of the transients.

Planning to do further analysis with audiodiffmaker.

transients-zoom.png

Link to comment
9 hours ago, soxr said:

...
I don't believe their deblur processing is already applied to the 24/44.1 or 24/48 distribution file, but encoded as a metadata field, which sets the correct post processing filter in the renderer.

...

 

That makes sense. Although they say they have a process to apply MQA at the A to D stage, all of the MQA content that I am aware of is previously released. In many cases there's no single ADC stage that can be identified for "deblurring".

 

The only concern is the performance of the filter MQA uses to split the signal into 0-22 and 22-44 KHz bands when encoding. Because the splitting and joining filters are intended to be complementary, the performance of the splitting filter on its own may be less than optimum. Ignoring the ultrasonic aspect, it may still be worthwhile to do the rejoining to remove the effects of the filter in the audible range.

"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

Something is wrong with the SOX commands you posted.

 

Quote

sox -S input.mqa.flac output.flac -vsM 352800
sox FAIL sox: Volume value `sM' is not a number

 

-v|--volume FACTOR       Input file volume adjustment factor (real number)

-M, --combine merge      Merge multiple input files (instead of concatenating)

 

Sox version 14.4.2 (latest)

 

Edit: nevermind, you specified rate option in 2nd example only.

You should edit the first example like this: sox -S input.mqa.flac output.flac rate -vsM 352800

 

Anyway, the conversion does not restore missing frequencies.

Link to comment
On 6/29/2017 at 4:15 AM, The Computer Audiophile said:

Anyone know if JRiver still has SOX integration? I'm not at home, otherwise I'd look. 

 

JRiver v22 onwards has SOX but you can't pass any parameters. 

Custom Win10 Server | Mutec MC-3+ USB | Lampizator Amber | Job INT | ATC SCM20PSL + JL Audio E-Sub e110

 

 

Link to comment
21 minutes ago, soxr said:


You could ask the JRiver dev's to at least add the following options to the GUI when calling sox:

SOXR_MINIMUM_PHASE
SOXR_STEEP_FILTER
SOXR_VHQ

https://github.com/chirlu/soxr/blob/master/src/soxr.h
 


 

 

Worth a shot. Paging @jriver

 

 

 

Custom Win10 Server | Mutec MC-3+ USB | Lampizator Amber | Job INT | ATC SCM20PSL + JL Audio E-Sub e110

 

 

Link to comment
On 29.6.2017 at 5:35 AM, pkane2001 said:

 

How different is this to, say, the HQPlayer poly-sinc-xtr-mp filter? The description sounds similar to the above.

 

Yes, that is, in a way, similar (but far from being the same). But OTOH, there's the poly-sinc-mqa-mp filter too, which is following thoughts of the MQA "render" filter, but is my take on the subject. It works on both, undecoded MQA as well as decoded MQA. Plus of course two intermediates between the two, poly-sinc-mp and poly-sinc-short-mp.

 

So far, MQA and the "render" filters are limited to operating in PCM domain at low rates, at most 8x. While I also consider higher ratios and the delta-sigma modulator important factors. So instead of being restricted to 8x or similar rates, I rather use 256x or 512x rates with the filter and also replace the delta-sigma modulator.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
On 30.6.2017 at 3:59 PM, soxr said:

If this is the case, then MQA distribution files provide a band limited version of the master with "authentic" transients as the transients have not been sharpened. It does not appear they messed with the phase of the transients.

 

Too bad as they band limit the trasients they actually slow down, or "blur" the transients...

 

To me, the whole point of hires is to pass the source without any band-limiting, choosing high enough sampling rate that there's no need to perform limiting and thus slowing down of the transients...

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
1 hour ago, Miska said:

 

Too bad as they band limit the trasients they actually slow down, or "blur" the transients...

 

To me, the whole point of hires is to pass the source without any band-limiting, choosing high enough sampling rate that there's no need to perform limiting and thus slowing down of the transients...

 

 

According to Monty from xiph.org, a band limited version of the original waveform still has perfect intersample timing resolution, skip to 20:50 (which is what MQA tries to tell us, it is not)

https://www.youtube.com/watch?v=cIQ9IXSUzuM

This is also confirmed here, where they start the square waves in between the samples:

http://science-of-sound.net/2016/02/time-resolution-in-digital-audio/

So this claim may look counterintuitive, but it debunks MQA's need for higher sampling rates:

"Does that mean time domain precision is actually infinite? It must be limited in some way…

It actually is."


I'm not seeing transients being slow down or blurred in the upsampled MQA for the baseband signal. All I see is some ultrasonics missing in the waveform because we don't have access to decoding  the secret LSB bits that encode the HF spectrum (first unfold). Unless I interpret these waveforms wrong.

The above is the DXD file from 2L.no
The bottom part is the upssampled MQA version back to 352.8 DXD with sox rate -vsM 352800

 

transients-zoom.thumb.png.cdff298dc0b346267b74a0d5ab388bd6.png

Link to comment
On 3.7.2017 at 11:24 PM, soxr said:

According to Monty from xiph.org, a band limited version of the original waveform still has perfect intersample timing resolution, skip to 20:50 (which is what MQA tries to tell us, it is not)

 

That is a completely different thing. If your source file sampled at 192 kHz contains 60 kHz component, but MQA encoding process band-limits the source to 30 kHz, then the 60 kHz component is just gone.

 

On 3.7.2017 at 11:24 PM, soxr said:

I'm not seeing transients being slow down or blurred in the upsampled MQA for the baseband signal.

 

I'm talking about transients compared to the source DXD data. But note that not all source content even contains such transients. So forget something like piano which doesn't even contain fast transients.

 

On 3.7.2017 at 11:24 PM, soxr said:

The above is the DXD file from 2L.no
The bottom part is the upssampled MQA version back to 352.8 DXD with sox rate -vsM 352800

 

You are not going to see it that way, but you can easily see it in spectrum analysis. Look at the output spectrum of the DXD source and the MQA version.

 

Speed of transients is in the >22.05 kHz range, higher the frequency, higher the transient speed is.

 

Some test tracks from 2L contain transients reaching up to about 60 kHz. Highest frequency components of those are gone in the MQA version - precisely the "speed components".

 

For example when you encode a square wave, more of the high frequency harmonics you encode, faster the and more accurate the square wave becomes. For perfect square wave you need infinite sampling rate.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
40 minutes ago, Miska said:

Some test tracks from 2L contain transients reaching up to about 60 kHz. Highest frequency components of those are gone in the MQA version - precisely the "speed components".

 

For example when you encode a square wave, more of the high frequency harmonics you encode, faster the and more accurate the square wave becomes. For perfect square wave you need infinite sampling rate.

 


I did already compare the spectrum. With upsampled MQA all the ultrasonics are gone.

Do you remember which 2L.no demotrack has transients of 60 kHz?
Maybe I'll do the shootout once again with this track.

I agree square waves need an inifinite amount of sines to represent, thus an infinite samplerate, but this it actually matter? Which music content has perfect square waves that would require infinite sampling rates?

It was very hard to tell upsampled MQA vs DXD apart. On my two18 system it was just impossible, on the krypton 3 there were subtle differences but probably when doing a DBT it's going to null those differences.

Link to comment

There are only 2 researches of ultrasound, that noted, when audio is discussed:

 

1. Human perceived time resolution

 

2. Brain activity to ultrasound

 

But still I don't hear about researches that prove real ultrasound impact to subjectively perceived quality.

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 & Windows
Offline conversion save energy and nature

Link to comment

Interesting..! This backward engineering approach is actually confirming that the MQA encoding process is not degrading the original high-res recording, but an effective deblurring with intrinsic advantages compared to a normal, downsampled flac files.  Even without the original MQA decoding key, this emulated and upsampled original .FLAC.mqa files do 'sound the same as the original DXD files.  So thanks soxr, for confirmation that the MQA encoding process is an improvement..!   What I would actually like to get confirmed also, is how the original DXD files measure in terms of impulse response and time-smear compared to the MQA encoded and upsampled version, as well as a normal downsampled 16/44.1 flac and upsampled to DXD level. At the end, all measurements and comparisons of behaviour of these files in the digital domain, should have a measurable effect in the analogue domain in terms of time-smear or de-blurring. We need confirmation of what we (think to..) hear don't you agree?

Link to comment
7 hours ago, PeterV said:

Interesting..! This backward engineering approach is actually confirming that the MQA encoding process is not degrading the original high-res recording, but an effective deblurring with intrinsic advantages compared to a normal, downsampled flac files.  Even without the original MQA decoding key, this emulated and upsampled original .FLAC.mqa files do 'sound the same as the original DXD files.  So thanks soxr, for confirmation that the MQA encoding process is an improvement..!   What I would actually like to get confirmed also, is how the original DXD files measure in terms of impulse response and time-smear compared to the MQA encoded and upsampled version, as well as a normal downsampled 16/44.1 flac and upsampled to DXD level. At the end, all measurements and comparisons of behaviour of these files in the digital domain, should have a measurable effect in the analogue domain in terms of time-smear or de-blurring. We need confirmation of what we (think to..) hear don't you agree?

 

We hear - what MQA guru told us to hear ;)
Bob have proven yourself resourceful, tenacious, with a commendable ability to convince others that his way is the right one, the way that needs to be followed...

Link to comment
On 7.7.2017 at 1:00 AM, soxr said:

Do you remember which 2L.no demotrack has transients of 60 kHz?
Maybe I'll do the shootout once again with this track.

I agree square waves need an inifinite amount of sines to represent, thus an infinite samplerate, but this it actually matter? Which music content has perfect square waves that would require infinite sampling rates?

It was very hard to tell upsampled MQA vs DXD apart. On my two18 system it was just impossible, on the krypton 3 there were subtle differences but probably when doing a DBT it's going to null those differences.

 

Just out of my head, I think I tested primarily two, 2L50 and 2L110, but I might remember wrong. Some of my initial test results here:

Unfortunately all image links seem to be broken after forum software was changed. I don't have access to my workstation right now to check.

 

On 7.7.2017 at 1:00 AM, soxr said:

I agree square waves need an inifinite amount of sines to represent, thus an infinite samplerate, but this it actually matter? Which music content has perfect square waves that would require infinite sampling rates?

 

Point of hires is to store all the content that comes from the microphones, without removing anything by bandlimiting or word length limitations. MQA encoded content seems to begin rolling off at about 30 kHz reaching poor stop-band rejection (resulting in some aliasing) at 44.1/48 kHz. This results in slowing down the transients (because time and frequency are 1/x related) compared to the original hires that has been sharply cut at 44.1/48 kHz. Not to even mention the low resolution noisy mess that results in undecoded MQA file, because they've mixed all the encoded data into the baseband signal, especially to the band from 16 kHz up. That's why I created some extra processing to remove some of that crap out.

 

On 7.7.2017 at 1:00 AM, soxr said:

It was very hard to tell upsampled MQA vs DXD apart

 

I don't have much hard time in my system using Sennheiser HD-800 headphones.

 

But overall, classical music doesn't need so much high frequency capacity and doesn't contain much sharp transients, so it is not very good for testing. Pop, rock, jazz, blues, folk, etc are better. I have purchased quite a bunch of albums in original hires and MQA versions for comparison purposes. The original hires is clearly the best without doubts, and 2€/album cheaper. :D

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
On 7.7.2017 at 7:22 AM, audiventory said:

But still I don't hear about researches that prove real ultrasound impact to subjectively perceived quality.

 

 

If you don't hear difference between hires and RedBook, you can of course always stick to RedBook.

 

I don't care much about research trying to prove something about my subjective hearing.

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
9 hours ago, PeterV said:

Interesting..! This backward engineering approach is actually confirming that the MQA encoding process is not degrading the original high-res recording, but an effective deblurring with intrinsic advantages compared to a normal, downsampled flac files.

 

The deblur part happens in the renderer phase of the MQA dac, not in the encode. It tries to kill post-ringing, which seriously alters the sound. This is destructive and no longer the master.
 

9 hours ago, PeterV said:

Even without the original MQA decoding key, this emulated and upsampled original .FLAC.mqa files do 'sound the same as the original DXD files.  So thanks soxr, for confirmation that the MQA encoding process is an improvement..!  

 

No it is not an improvement, it's just minimum phase downsampling, with 9 bits in the baseband assigned to recover the lossy HF spectrum. Minimum phase is a lossless but band limited version of the original with no pre-ringing introduced. Good for MQA that most music does not have true 24 bit dynamic range, as MQA can not even restore the original 24 bit waveform, 15 to 20 bits at best, with most MQA dac's dithering to 16 bit as the amount of render bits is communicated to the render phase. MQA is not 24 bit.

In he case of MQA compared to normal minimum phase downsampling, it adds high frequency hissing to the baseband file which encodes the secret lossy date needed for the decoder to work. This secret part contains the data for the first unfold. From there (so from 88.2 ot 96K), it's just minimum phase upsampling to $ORGINALRESOLUTION

This hissing garbage that encodes the ultrasonic part, can be easily stripped from MQA files. But on normal recordings it is below the noise floor of your listening room.
 

9 hours ago, PeterV said:

 

What I would actually like to get confirmed also, is how the original DXD files measure in terms of impulse response and time-smear compared to the MQA encoded and upsampled version, as well as a normal downsampled 16/44.1 flac and upsampled to DXD level. At the end, all measurements and comparisons of behaviour of these files in the digital domain, should have a measurable effect in the analogue domain in terms of time-smear or de-blurring. We need confirmation of what we (think to..) hear don't you agree?


Bob is not going to provide this. He is very afraid. He does not even provide test tones so manufacturers can do a full quality assurance:

http://www.6moons.com/industryfeatures/mqa/1.html

But does it matter? Deblur has already been "cracked" because the impulse responses are basically one of 32 filters applied to the upsampling happening in the render part. These filters try to kill the post-ringing. The consequence are new errors which were never part of the original master. Each MQA file applies one of these 32 filters during the renderer part of MQA decoding.

MQA is not authentic to the master the studio engineer was working on.

A lot of studio engineers on Gearslutz including grammy award winning Brian Lucey have stated that MQA is not the master. It changes the depth and width. It also adds distortion. It's also destructive.

Furthermore, studio's don't master for MQA. They don't have the tools to live evaluate the MQA encoding parameters. MQA is not part of the creative process.

They just send their PCM files to MQA, then they have to wait, get the MQA versions back and listen on a mytek Brooklyn or Manhattan II. This workflow has been posted on gearslutz.

Even Jim Austin from stereophile realizes MQA is not the master, but a remaster:
https://www.gearslutz.com/board/12721141-post1108.html

What our methode provides, is a way to listen to a very close approximation of what the engineer was working before sending his work to MQA using the current available MQA files. It is more authentic to what the engineer was listening to during the creative process, than the MQA decoded version which clearly does not sound like the master at all.

Link to comment

I am really confused why MQA was introduced at all when it alters and with the above mentioned distortion even degrades the sound.

That sounds crazy to me.

Also, I believe I read about internet bandwidth as an issue or one of the reasons. Why is that an issue for HD music, but not for 4k videos?

Sorry if this was discussed somewhere else already, don't want to change the flow of this thred, yet as said, I am a bit confused.

Vinnie Rossi LIO (AVC/Tubestage, AMP Module with built in HPF 100Hz 24dB/octave, DAC 2.0), Harbeth P3ESR, Rythmik F8

Win10 i7-7700 -> Roon -> HQPlayer DSD512- > LIO 100Hz HPF -> Harbeth P3ESR

                                                                                ->LIO  -> miniDSP <100Hz -> Rythmik F8  

 

 

 

Link to comment
13 hours ago, Miska said:

If you don't hear difference between hires and RedBook, you can of course always stick to RedBook.

 

There are 3 options:

 

1. Hear

2. Don't hear

3. Seems that I hear :)

 

Playback of ultrasound is not aim of hi-res (high sample rates).

 

And it is technically impossibly to compare different sample rates. Because it is comparison of implementations, not sample rates.

 

I always care about maximal safe objective (repeatable in certain conditions) evidences. Otherwise, I keep in mind the unproved things until coming of new information. Also I doubt in proven things, :) because there may be new information too.

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 & Windows
Offline conversion save energy and nature

Link to comment

1. Client side

The easiest way is to do this in the player, not in the server.

Some players like MPD have soxr support, but don't set the correct flags for minimum phase:

https://www.musicpd.org/doc/user/resampler_plugins.html
 

So that would require a patch to MPD.
 

Jriver also seems to support SOX, but it would also need changes to the flags to allow minimum phase.

A player like squeezelite has been supporting minimum phase since a very long time, but you will need to manually start squeezelite with custom options, or change the way the player is started, which is different on initd vs systemd based systems.

These options have already been posted in this topic.

2. Server side

When doing it at the server side, they could look at what bluesound or logitech media server is doing. They basically have the standard linux audio command line players like flac,madplay, ogg123 and they output them to STDOUT or a pipe instead of going directly to the soundcard.

Then at the other end of the pipe, typically with logitech, there's some tool sitting to do DSP and/or transcoding. This could be sox. In case of bluesound, it's their proprietary dspout program which links to the bluesound MQA library.

If a upnp server can output the decoded flac file to a pipe or STDOUT before sending the stream to the client, it could work.

But basically the syntax is the same: decode flac, wav, mp3, ogg, ..... to STDOUT and then process it with some tool before sending it to the player.

Or integrate the soxr library into the server, so no unix pipe is needed.

Link to comment
11 hours ago, mirekti said:

Also, I believe I read about internet bandwidth as an issue or one of the reasons. Why is that an issue for HD music, but not for 4k videos?

 

 

Marketing BS. Even the slowest ADSL lines can stream compressed highres FLAC in realtime. When stripping out the noise bits in the signal (as implemented by Miska, Xivero and suggested by Dr. Jim Lesurf), it can compress even further without breaking flac compatibility with all known encoders.

Internet bandwidth doubles every 18 months. In 1998 we would have 1 mbit ADSL. Early 2000 that becomes 8 mbit. In 2006 30 mbit cable would be standard. In 2012 70 mbit was standard. In 2017 we have 200 mbit on a standard cable subscription. Now they are offering gigabit fiber or HFC at the end of this year, and we can participate for free! Several EURO countries offer fiber for 50 € / month.

So the compression benefit of MQA has a very limited shelf life.

So they had to invent something extra, like claiming that PCM is not good enough, and that they have the magic solution. But MQA still remains PCM. The DAC chips inside MQA dac's are still PCM chips, but with some custom digital filter to get rid of the post-ringing, which makes the sound thinner which audiophiles may incorrectly interpret this as more stage and more air.

But the MQA post processing is not what the studio masters for, even worse, they don't have any influence over the encoding parameters and thus the sound of the MQA post-processing filters. This is all done by MQA.

MQA send the files back to the mastering engineers and they then listen on some Mytek DAC to approve it or not.

MQA is not part of the creative mastering process. This workflow has been explained in the gearslutz MQA topic.

The method disclosed in this topic renders a more authentic version of the sound that the mastering engineer was listening to, before sending his work to MQA.

When buying music you could as well buy the real studiomaster file such as a 24/192 or DXD download, which is more authentic to what the mastering engineer was listening to.

Link to comment
1 hour ago, jaaptina said:

Hi, 

I asked Simon at Minimserver how to do what you propose using fmpeg transcoding with Minimstreamer. It seems it is not easy. Any suggestions are welcome!  

 

http://forum.minimserver.com/showthread.php?tid=4088

Read more  

The problem is with ffmpeg's Resampler seemingly not exposing the relevant SoX flags in its options, in order for you to be able to configure SoX for MQA as suggested:

https://trac.ffmpeg.org/wiki/FFmpeg and the SoX Resampler

https://www.ffmpeg.org/ffmpeg-resampler.html

We are far more united and have far more in common with each other than things that divide us.

-- Jo Cox

Link to comment
9 hours ago, Cebolla said:

The problem is with ffmpeg's Resampler seemingly not exposing the relevant SoX flags in its options, in order for you to be able to configure SoX for MQA as suggested:

https://trac.ffmpeg.org/wiki/FFmpeg and the SoX Resampler

https://www.ffmpeg.org/ffmpeg-resampler.html

Read more  

resampler

Set resampling engine. Default value is swr.

Supported values:

‘swr’

select the native SW Resampler; filter options precision and cheby are not applicable in this case.

‘soxr’

select the SoX Resampler (where available); compensation, and filter options filter_size, phase_shift, exact_rational, filter_type & kaiser_beta, are not applicable in this case.

:(

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...