HDCD rescue - it's possible, but man...


I spent the better part of today sick, but working on finding a way to decode music I might have that is HDCD encoded.

As a refresher, HDCD was an enhanced CD format. In some ways the predecessor to MQA. HDCD was an engineer's toolbox, allowing the mastering engineer to select a number of features. This would then be decoded by a matching chip on a CD player or DAC. The most famous feature of HDCD was bit-compression. Getting a 24 bit signal encoded in a 16 bit music file.

As an aside, the Pacifics Microsonics AD converters were highly prized by engineers for their sound quality. Anyway, the format got bought by Microsoft and died.

Of the 670 CD's I have ripped only about 11 were HDCD encoded. But man, what a pain. I ripped everything to FLAC, but the HDCD decoder only does WAV. I had to download source, compile it, then write a script to go through every CD and decide if it's HDCD or not. Once found, I have to convert from FLAC (44/16) to WAV, decode the WAV file (now 24 bits) and convert back to FLAC to compress again.

The discovery process was pretty fast.  About 10 minutes to go through them all by cheating. :) More time was spent figuring out how to pass apostrophe's in file names than finding the files.  Nathalie Merchant was one author who consistently used HDCD by the way.
erik_squires
Erik, it's my understanding that the HDCD process squeezes 20 bits into a 16 bit WAV file for CDs.  I use dbPoweramp and it has an HDCD decoder built in.  It's (somewhat incorrectly) listed under the DSP effects section.  I've used it on my HDCD-encoded CDs and it seems to work well (the DAC identifies them as 24/44 files and they sound fine.  There's a check box in the decoder to apply "+6dB Amplification (align 20 bit result in upper 24 bit range)" and if you don't use that the volume comes out way too low (6 dB!).
Dick
Hi @djohnson54

I think you are right, it was only 4 bits more. However, since that's an odd bit size, it gets spit out as a 44/24 file.

Your approach is cool, but since I am on Linux only and don't have the MS approved HDCD decoder, I can't use it. Instead I convert all of my files, but I only have to do this one time. I think OS X people would have the same issues.

Thanks for the heads up on the level shifting. I'll have to compare a few files first. This is something quite easy to do with ffmpeg.

Best,


Erik
Sounds like a project for retirement or to while away the time during a long prison sentence.  Can you even enjoy listening to the music after so much effort?
@erik_squires Haha.  I should have guessed that when you mentioned downloading source and compiling.  I love Linux for server-side stuff but I'm past the point in my life where I want to figure out stuff like you just did because I don't have access to mainstream programs.  Don't get me wrong, I would love to tell M$ where to go (Comcast too!) but it's all about the applications for me at this point.  There was a time though ...
@mahler123

Well, there is more to this than just converting music files. I have been bed ridden on and off for a while, so brushing up my scripting skills is a plus. :)

Like a lot of things, the setup time is the most brutal part of this effort.

It turns out I don't need to level shift. I do however need to copy the metadata and cover art separately as that does not make it through the HDCD decoding.

I'm actually just really happy I found OS HDCD code to let me do this. Mostly because I've wanted to listen to HDCD since it came out, and this is the first time I can.

Best,


Erik