Have you ever ripped or downloaded an old music CD that just sounds way too harsh? Sounding like the EQ is accentuated with too much treble?
Back in the day, a number of CDs were processed with pre-emphasis used and we can see at least a partial list of pre-emphasized albums here. Typically these would be early CDs from the mid-'80s although as per the list there are also a number from the late '80s and even early '90s.
In those early years, DACs were incapable of true 16-bit resolution and noisy analogue brick-wall filters added high-frequency distortions. As a means of improving signal-to-noise, they boosted the high frequency content and corrected the tone on playback (see this Hydrogen Audio FAQ on Pre-emphasis). As you're probably aware, a CD doesn't just contain the 16/44.1 audio data but have encoded within each "frame" 8 bytes of CIRC error correction and another byte of "subcode" data which can be thought of as "control data"; like a precursor to today's much more complete metadata. One of the subcodes is the "pre-emphasis flag". When activated, a CD player will engage its "de-emphasis" circuitry/filter. These days, DAC chips themselves can implement digital de-emphasis as part of basic functionality.
Fast forward a few decades and we're now at a time of ubiquitous digital audio. Bit-perfect CD ripping into a computer can allow us to create the digital data from the CD into .wav and .flac files, but unless we pay attention to it, the pre-emphasis flag can be easily lost. If we are to rip the whole CD into .bin/.cue format, we can see this "PRE" flag turned on for such pre-emphasized CDs. For example, here's a snip of a .cue from an old Pink Floyd Dark Side Of The Moon.
While I believe some ripping software like iTunes will apply the correct de-emphasis filter, most ripping programs I've seen will ignore the flag, leaving you, the audio lover, to try to deal with these unfiltered files. Sometimes, as with dBPowerAmp, the ripper can at least write a metadata tag for the file and hopefully you can use the playback software like foobar to play with de-emphasis DSP when it sees that tag (see this thread). Although this is a solution, it does require extra work on the playback set-up and personally, I would prefer that I just process once and keep the "proper" sounding version on my music server.
To make matters worse, there are CDs that appear to have pre-emphasized content but did not bother to turn on that PRE flag! This results in highly "tinny" and harsh playback... One wonders if in some instances, this might represent a subset of the complaints around early CDs sounding too "thin".
I was inspired to write this because a couple weeks ago, a friend wrote to me that he finally got around to ripping some old CDs and he had an old Spandau Ballet Truth CD that just "didn't sound right" when copied to his music server. He sent me some samples and to me, the tonality was that of pre-emphasis applied yet when I checked with him and the .cue file, the CD did not have that "FLAGS PRE" turned on!
For the sake of education ("fair use"), here's a ZIP file containing 45 seconds of the original song, what I believe is the pre-emphasized "Truth", compared to a de-emphasized version for your listening comparison:
While the synthesized parts already sound a bit shrill without processing, it's the vocals that particularly stand out as being overly bright and unnatural in the original "pre-emph" file. To be honest, I don't know if Truth is supposed to be so bright sounding but I think the de-emphasized version is much more tolerable. I would not be able to sit through the unprocessed album from start to finish! Furthermore, the processed version sounds closer to the 2003 remaster which adds to the idea that my friend's early pressing was missing the flag.
Remember that pre-emphasis basically applies an EQ curve which boosts the high end and needs to be reversed by the de-emphasis process. Here's a graphic of the de-emphasis filter from an old Sony CD/SACD player I found online:
As you can see, this EQ curve is very significant with a -4.5dB attenuation by 5kHz and goes up to -9.5dB at 20kHz.
As for the demo track above, we can compare the original and the processed de-emphasized versions with the FFT of those 45 seconds:
There are a number of ways you could de-emphasize. You could create your own EQ in an audio editor - here's a great post showing the target formula and a table of the amounts. As touched on above, in foobar, there are components you could use for de-emphasis as well.
My favourite however, which I believe is the highest resolution method, is by using SoX and its built-in de-emphasis filter. Here's what I would do:
1. Download the latest SoX. The Windows 32-bit binaries can be found here. Current version 14.4.2 works well.
2. Extract that download to a convenient location. I put it in my C:\ drive. You should see the sox.exe file in that directory.
3. Open up a command prompt and cd into the SoX directory you extracted the binary files to. (As you can see, I just issued "cd \sox-14.4.2".)
This makes it so that if we issue C:sox.exe, we should run the SoX program without doing anything fancy with paths.
4. Now copy this line and put it into a file in your directory with the pre-emphasized music; I call it "SoX De-Emph.cmd" (the exact name doesn't matter of course):
FOR %%A IN (*.flac) DO C:sox "%%A" -b 32 "%%A.wav" deemph
[Thanks Bennet for the -b 32 flag instead of floating-point as per comments.]
5. Now issue the "SoX De-Emph.cmd" command and you should see that it'll go through each *.flac file in the directory, processing them to create 32-bit 44.1kHz .wav as the de-emphasized output:
6. Congrats, you now have high precision 32-bit de-emphasize .wav files to work with.
7. I leave it to you what you want to do with these 32-bit files. The simplest is just to delete or move the .flac original and convert the de-emphasized files straight back to 16-bit FLAC with something like dBPowerAmp. TPDF dither is good - remember these CDs originated at a time when true 16-bit resolution was either rare or simply unobtainable so don't feel like you're losing any resolution by converting back to 16-bits!
If you want to be even more fancy, you can check the maximum amplitude for the album and use software like iZotope RX 7 to add extra gain and perform the dithering with settings as desired (similar to what I do with "hi-res audio" in general).
For those who don't want the fuss of the 32-bit files, in the batch command file (step 4) use this line instead:
FOR %%A IN (*.flac) DO C:sox "%%A" "%%A.wav" deemphThis will create standard 16-bit .wav output that can just be converted to whatever lossless format you prefer, tagged, and be done with it.
That's pretty well it. Thankfully, pre-emphasized albums are rare especially these days unless you're seeking out some old "first press" CDs. If you have a large CD collection gathered over decades, I suspect you might already have a few. Since I've ripped all my old CDs years ago, it has been awhile since I've had to do this.
I hope this can be helpful and as reference if you ever come across such a scenario. Remember to think about that "pre-emphasis" feature if you run across strange-sounding old CDs from the '80s and '90s with weirdly "sharp" and "harsh" tonality.
In other news, as reported a couple weeks back, I see that vinyl from a dollar perspective is now outselling CDs in the first half of 2020 in the US. Considering the cost of new vinyl these days, how cheap CDs have become, and digital audio revenue being now 85% from streaming services, I guess it's no big surprise that physical digital products are well on its way out (I suspect this includes video formats like Blu-Ray and UHD Blu-Ray). Other than a few dinosaurs like myself, my non-audiophile friends, my wife, and kids are just streaming lossy audio and seem very satisfied.
From my perspective, this is not necessarily a bad thing...
As one who is trying to keep my energy expenditure and "carbon footprint" low for the last number of years, I'm reminded of vinyl as a type of plastic and has environmental impacts even if only a small global contributor. Likewise, CDs are made of plastic as well but less material used than an LP. Every little bit adds up, right?