Thursday, May 19, 2011

Hires Audio - Treasure Island

Introduction
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Lets dig up some treasures. It's time to run another little study.




post over at Audio Asylum was referring to quite an interesting article about "fake" HiRes-Audio. files.

Within this article it's been stated that several HiRes audio downloads are potentially fakes.

What is HiRes? What is a HiRes fake?

The problem. The term HiRes is neither being protected, nor it clearly defines what can be expected.

The only thing that's defined is "HiRes Audio = audio data with greater than 44.1kHz samplerate"

Then. Why did HD-Tracks accept to replace potential fakes???  (for those complaining!)





They maybe just wanted to stay in business!?!?

*******

What would you expect if buying HiRes materials at a pretty steep pricetag???

I tell you what you wouldn't expect:

E.g. A simply upsampled CD!
E.g. A simply upsampled track from a low Q base track.

Tracks that comply to these conditions might be called "fakes" from a customer perspective.
Legally people would have a hard time to win a case over this - I guess.


Don't forget. You can't avoid "resampling" if you want to sell stuff at all samplerates.
You then better don't call your data "native"!
There'll be only one native samplerate - the one being used during the recording
or transfer-from-analog process.

HD-Tracks should clearly flag the download that's the "native" one. They simply don't do it.

HD-Tracks do has their understanding and commitment of HiRes defined nowadays.
I do find it rather hypocrite to claim nowadays in other words "other might sell you fakes - we don't"


***********


Fast forward. What's the situation today?

First of all. Why do we still talk about "fakes"?

* as HD-Tracks nicely suggests   ...others might sell you fakes...
* you might own some old HD tracks

I think it's good to keep an eye on it.

What actually is "native" and/or "master" quality, or at least,  what can be expected ?
That's actually not that easy to answer!

A bit of background.

In the beginning of the audio production process there's a RAW file,
actually several of them depending on the number of channels being recorded.

(Let's take the HW recording setup (mic/cable/ADC) out of equation. That obviously also causes losses on its own.)

From that point - having the digital raw files on the HDD - onwards these raw data will be heavily manipulated.
Several different tools - non of them is lossless - will cause a quality loss of the base raw data to accomplish a "pleasant" result.

If we talk about mixing, we talk about

* panning and level balancing (voice->center, guitar->right, bass->left)
* compressing (all instruments exhibit a different dynamic range - level that out)
* equalizing ( clean up the spectrum for pleasant and coherent sound)
* reverb (e.g. apply fake room echos)

Finally the original samplerate of the mix gets converted to a target rate and bitdepth, which
usually needs another compression ( to avoid clipping)  and as very final step there's dither (a well defined artificial noise floor ) applied.

Not only that these tasks do cause rather severe losses by definition, the tools, algorithms and filters used are not lossless either and mess with the result even further.

Still. This would be a "master" quality result.

With above mastering and mixing process in mind you might also understand why already a "remastered" CD at 44.1kHz might sound so much "better" then the original CD you bought 10 years ago.

If you just change your mastering tools after ten years, considering the evolution in the DSP arena,
a new master will sound completely different then the original master.
If you than play around with above mentioned tools (panning, compressing,...) you'll be able to convince the potential customers to buy that very same CD once more - preferably at a steep pricetag as HiRes.

To sum that up: A master mix is basically a result based on the "taste" of the mastering engineer and the tools he's been using. If you change either of it you'll end up with a completely different result!
No matter what samplerate is being used or sold to you! HiRes might have less impact then the remastering itself!

Linn e.g. sells "Master Quality" tracks at different samplerates. What does this mean to you?
By now you should have realized: Nothing! Linn would have to lay out what they exactly mean by it.

There is another term floating around -- "transfers".
There are e.g. DSD transfers or tape transfers.
Those do not have anything to do with the term "master" either.
These transfers just get the mastering engineer a set of new raw audio files as a base for further tampering.

If you now own a CD supplied at 44100Hz samplerate and 16bit, you can usually
assume that this is the result which is furthest away from the original recording - with maximum
tampering applied. And now consider this CD is used for making HiRes material!

Plenty of talking...


It's time to have a look at some of my own files.



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


First I'd like to see how to identify resampled material. I used the spectrogram feature of sox to generate below images.

Image 1. shows a native pinknoise spectrogram sampled at 24/96. As you can see the frequency content is shown up to sampling-frequency/2=48khz all over the place.



 Image1: Native 24/96 pink noise spectrum


The 2nd image shows a 24/96 spectrum based on upsampled 44.1/16 pink noise.



Image2: Upsampled 44.1/16 pink noise

As you can see. The original frequency range of a native 44.1khz file remains the same 44.1/2=22.05 if resampled to 96khz. You can't really hide the base data origin.



This example shows pretty clear the effect of upsampling in the HiRes spectrum. That's what we need to look for as the "fake-indicator", when analyzing real live cases.

To identify downsampling from 192khz to 96 khz should be much more difficult!!!

Obviously 48khz upsampling should also rather easy to identify. The  line in the spectrum of Image 2 would have been drawn at 24khz instead of 22.05khz.
And folks  - there are also 48khz based fakes out there.

But what happens if we face analog tape transfers, with quite a low base bandwidth. How to identify those?

Let see how things are developing. I hope my learning curve stays as steep as it currently is for a little while.




Real Live Cases
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

I have to admit that I'm be no means a specialist in audio file spectrum analysis.
Please tell me if my below interpretations or conclusions are incorrect or misleading. You're of course invited to support my investigations. Advise is highly appreciated by me and I guess the community reading this article.



I start with analyzing two examples of very recent HD-Tracks downloads.

...................................................................................................

Case 1
...................................................................................................

HD Tracks - Deep Rumba - Track 01 -  24bits 88,2khz
purchased and downloaded 05-2011


Image 3: Deep Rumba - Track 1 - Audacity plot


You can clearly see the lowpass behavior towards 22khz, which would be  characteristic for 16/44.1 material.
The dip at the end of the spectrum could be some kind of dither added later  after the resampling.

Hmmh. First try first hit!?1? What do yo think?


The 2nd spectrogram doesn't look that obvious anymore



Image 4: Deep Rumba - Track 1 - Sox plot

Here I see artifacts above 22khz.  And shaped dither at the top end. Hmmh.

What would you guys say?? Fake Yes/No?

Looking at the Audacity plot I'd say a clear "YES".  Sox makes me wonder if it is really that clear.

I need to figure out what's about those lines (harmonics?) in the plot. 

To me it's also more then unclear why 24/96 data is being dithered.

...................................................................................................

Case 2:
...................................................................................................

HD-Tracks Paul Simon - So Beautiful So What - Track 01 - 24bits 96khz
purchased 05/2011




Image 5: Paul Simon - So Beautiful So What - Track 1 - Audacity plot


You see the much wider spectrum towards the end, which is characteristic for that higher sample rate. It still won't tell you if that track is downsampled from an even higher frequency or transfered from DSD.  It clearly looks as if not being upsampled from 44.1/16.

To confirm the Audacity view - here is the corresponding Sox plot:


Image 6: Paul Simon - Track 01 - Sox plot

This spectrum looks somewhat different then the Case 1 spectrum. I'd call it awful!?!?
Energy all over the place. That makes me even more suspicious about Case 1.

Though I need to figure out why there's so much going on above 20khz on HiRes material. Is this real data or are these some kind of other garbage artefacts.
This I'd like to find out.

So far the good .

There are very obvious differences between those files. Both are sold as HiRes files - just to remind you. I still need to get those characteristics properly interpreted.

More treasures to be lifted. See Appendix 2.  You'll find all kind of spectra for different files sold at Linn, iTrax and HD-tracks. .

I at least - find this a real interesting exercise. ;)

Enjoy.

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Appendix 1: Generating Spectrograms with sox and audacity
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

I do all my analysis on an Ubuntu Linux.

I can very easily write scripts that look for my 2496 files and
generate all plots automatically. 

What you need to do first:

1.
First open a terminal and install the required programs:

sudo apt-get install sox imagemagick audacity

2.
Copy your HiresFile of choice to e.g. /tmp
You don't want to mess around with the original file.

Case 1: Sox
............................................................................................................
Copy/Paste below line into a terminal.


FILEX="/tmp/yourfilename.flac"; sox $FILEX -n remix 2 trim 0 30 spectrogram -x 600 -y 200 -z 100 -t "$FILEX" -o $FILEX.png ; display $FILEX.png &

Just swap out "yourfilename.flac" with your Hires-filename and then press return.



4. Done



Case 2: Audacity
............................................................................................................

If you want to analyze your own 24/96 tracks you can do it also by using  Audacity. It's freeware and available under Linux as well as Windows.


You just load your track into audacity.
Then you select "Plot Spectrum" from the "Analyse" menu .
And that'll be it.


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Appendix 2:  HiRes - File Spectra
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

...........................
ALBUM 1
...........................


Looks OK to me.

...........................
ALBUM2
...........................



Hmmh. Could it be based on  a 48khz master?

...........................
ALBUM 3
...........................


Looks OK. This time an example with shaped dither applied.

...........................
ALBUM4
...........................


Hmmh. Pretty flat spectrum. I'm not sure what do do with that one.

...........................
ALBUM5
...........................



Looks rather Ok to me. Though I'm wondering about that distortion at around 16khz. You can even see its harmonic at 32khz. That can't be right.

...........................
ALBUM 6
...........................


 Looks OK - doesn't it.

...........................
ALBUM 7
...........................


Should be OK. There is content above 24khz.

...........................
ALBUM 8
...........................


The spikes go clearly above 24khz. You can also clearly see the added
dither at the top. Still I'm gonna load it into Audacity to verify it.

...........................
ALBUM 9
...........................


This is a native 24/48 file.

...........................
ALBUM 10
...........................



Hmmh. Looks like native 24/96. The spectrum looks pretty distorted though.

...........................
ALBUM 11
...........................



Looks OK to me.

...........................
ALBUM12
...........................



Looks OK to me.

...........................
ALBUM 13
...........................


Looks Ok. There seems to be some dithering done


...........................
ALBUM 14
...........................


I need to have a closer look at this one.

...........................
ALBUM 15
...........................



No idea what to say about that one. I'd say it looks rather OK.

...........................
ALBUM X
...........................

To be Continued


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
END OF ARTICLE



5 comments:

  1. Great job, please keep up the good work. Any feedback from producers on suspicious cases?

    ReplyDelete
  2. On some tracks you state that there is dither aplied when spectrum shows rising noise around 40kHz. This is symptom of DSD mastering&noise shaping

    ReplyDelete
  3. I did enjoy reading this post!I am looking forward for your next post.Good job


    sony ht-ct150 review

    ReplyDelete
  4. Great info. Thanks you very much for that. FYI, HDTacks still sells fakes. In March I payed $20.98 for Brahms: Piano Concerto No.2 In B Flat, Op.83 (Live At Musikverein, Vienna / 2012) 96/24 FLAC. Which is clearly 44.1/16 regarding to Audacity. No HDTracks for me anymore.

    ReplyDelete