image loading...

CD image downloaded from FreeFoto.com

The EAC guides are written by xuncat, all screenshots by xuncat (February 2008 - September 2009).

Valid XHTML 1.0 Transitional

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

EAC Guides Home

12. Appendix B: Pre-Emphasis


12a. Introduction


Some older CDs (and perhaps some newer, mainly classical, ones) come with pre-emphasis.

Pre-emphasis is not a problem if you rip your CDs in order to be able to burn exact audio CD copies to CD-R and listen to those CD-Rs in stand-alone CD players, provided that you use EAC's cue sheet as you burn them (see EAC CD Burning Guide). It can be a problem, though, if you plan to listen to your ripped files on your computer: pre-emphasis makes the high frequency (treble) parts of the music sound louder than they should. The album I use as an example here is a case in point. It is a classical flute album, and the flute sounds painfully piercing when the ripped files are played on a computer.

You can read a more or less technical explanation of what pre-emphasis is at picosounds's homepage, and some discussion (including confirmation that EAC does not do anything about pre-empasis) in this thread at EAC's offical support forum.

The reason it is not a problem when you use the cue sheet for burning is that EAC sets the pre-emphasis flag for CDs that are manufactured with pre-emphasis. Stand-alone CD-players can usually take advantage of the pre-emphasis flag.

When you used EAC 0.95, you had to look for that flag in the cue sheet in order to find out if your CD was produced with pre-emphasis (red colour added below for emphasis):

REM GENRE Classical
REM DATE 1977
REM DISCID 900D2C0B
REM COMMENT "ExactAudioCopy v0.99pb4"
PERFORMER "Gunilla von Bahr"
TITLE "Sun-Flute"
FILE "Gunilla von Bahr - Sun-Flute\01 - Albinoni - Adagio.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Albinoni - Adagio"
    PERFORMER "Gunilla von Bahr"
    FLAGS PRE
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Debussy - Syrinx"
    PERFORMER "Gunilla von Bahr"
    FLAGS PRE
    INDEX 00 08:48:00
FILE "Gunilla von Bahr - Sun-Flute\02 - Debussy - Syrinx.wav" WAVE
    INDEX 01 00:00:00
(...)
			

EAC 0.99 has a column for pre-emphasis (and of course also produces cue sheets like EAC 0.95 does, that contain the pre-emphasis flag if applicable).

image loading...

12b. De-Emphasising Introduction


The solution to the pre-emphasis problem is to de-emphasise the files. However, be warned that if you de-emphasise the files, they will be changed; you can not re-create an exact copy of the CD from de-emphasised files.

In the EAC support forum thread it sounds like you have to manually edit the wave files, but the last post in that thread mentions WavEmph, a GUI application that you will find if you click the link to picosound above. When I tested it (or, rather, tried to test it), I concistently got overflow errors, though, in spite of trying to run it in different compatibility modes for earlier Windows versions. Instead of messing with WavEmph, I de-emphasised the files using the command line tool SoX. I describe the process and its results here. (To be sure, SoX is a very powerful tool, useful for many things besides mere de-emphasising.) If you, like many Windows users, are a bit uncomfortable with using command line tools, you might want to read up a little on the subject. There are many web resources, for example CommandWindows.com.

When I know that a CD has pre-emphasis, I choose to rip the files uncompressed, to .wav. SoX can handle FLAC files, too, but it goes much slower since it has to decompress the files in order to process them, and then compress them back to FLAC when the de-emphasising is done:

image loading...

I have extracted the zip file for SoX to C:\Program Files (you don't need to create a folder for it, the zip file contains one). However, when I use it for de-emphasising, I copy the file "sox.exe" to the folder with the wave files. The reason for this is plain laziness: with the program and the files residing in the same folder, you don't have to type the path to the files.

12c. File Name Complications


There are more complications to using SoX, though. Being an original Linux application, it does not handle spaces in file names very well. I use the file re-naming application Oscar's File Renamer to deal with those difficulties (it's freeware). Actually, I turn the difficulties into an advantage by making the file names so short that they are easy to type into the command line later on.

  • In the Renamer, browse to the folder, then select and copy the file names.

image loading...

  • Save the copied file names to a text file, called, for example, "tracks.txt". This is important: you do want to keep a record of the original file names.
  • When you have that backup copy of the file names safely saved, rename the files to something simpler. I choose to simply call the files "01.wav", "02.wav", etc.

image loading...

  • After all the changes are done, click the File menu and then "Apply changes to folder", and click OK to the sanity check - you do want to apply the changes.

12d. De-Emphasising the Files


Now it's time to start using SoX.

  • Click Start - Run, type "cmd" without the quotes and hit Enter.
  • In the prompt, browse to the right folder using the "cd" command. In this case, the folder is in the C:\EACrips folder, so I use the command "cd C:\EACrips\Gunilla von Bahr - Sun-Flute" (without the quotes). An easy way to get the path right is to have the folder open in Explorer and copy the path from the address bar, then right-click in the prompt and choose "Paste".
  • Type "sox [name of first file] [name for the changed version of first file] deemph" (without the quotes). When the first file is done, type "sox [name of second file] [name for the changed version of second file] deemph" (without the quotes), etc, until all the files are de-emphasised.

The syntax for de-emphasising files is pretty straight-forward: sox [inputfile] [outputfile] deemph. So, in order to de-emphasise track 01, I would simply type "sox 01.wav 01new.wav deemph" (without the quotes), then hit enter. I added a couple of extra commands in order to produce the following picture, though. I made SoX write a brief report of what it did:

image loading...

The result as far as the files are concerned is of course the same if you only use the relevant command as stated above:

image loading...

12e. The Result


So, in what way have the files changed?

A comparison between the wave forms for a file, before and after, shows that the highest amplitude has been slightly reduced by the processing:

Before:

image loading...

After:

image loading...

A spectral analysis, focussing on the part of the file that contains most high frequency sound (approximately between 6:30 and 7:30) shows more bright red (which equals higher amplitude) for the high frequencies before processing than after, and it also seems that some noise has been reduced:

Before:

image loading...

After:

image loading...

A check using st5 checksums shows that the audio properties are indeed changed. (I included the same files in FLAC here, too, in order to show that it does not really matter if you process the files as .wav or .flac - it is just a bit faster to do it with wave files):

34a72872e6194038cc4d766a72c89915  [shntool]  01.flac
34a72872e6194038cc4d766a72c89915  [shntool]  01.wav
2404edbe975eec6dab20a0faf70dcb53  [shntool]  01new.flac
2404edbe975eec6dab20a0faf70dcb53  [shntool]  01new.wav
			

Most important of all: I can hear the difference. After de-emphasising the files, the music is enjoyable to listen to using the computer, too.

12f. File Names Revisited


After processing the files, use Oscar's Renamer to get the original file names back.

  • Remove the old non-processed .wav files from the folder (store them elsewhere, if you want to keep an archival exact copy of the CD, too). Also, remember to remove the copy of sox.exe from the folder.
  • Open the text file with the original file names ("tracks.txt"), and select and copy the original file names.
  • Then open the folder in Oscar's Renamer, select the changed files, and paste the original file names in their place.

image loading...

image loading...

  • As before, make the changes stick by clicking the File menu and choose "Apply changes to folder". (You can of course give the old non-processed files their proper names back, too, by the same procedure.)
  • Finally, compress the files to FLAC using FLAC frontend or some other application.
  • Remember to tag the files, for example with an application such as Tag&Rename or mp3Tag (freeware, that will handle FLAC tags/Vorbis comments, too, in spite of its name).

12g. Conclusion + Edit the Cue Sheet


So, the bottom line is that, yes, you can de-emphasise audio files from CDs that were produced using pre-emphasis, but if you do, your copy of the CD will no longer be exact. The files will in this sense no longer be lossless, so you should only do this for files that you plan to use only for listening on your computer, not for CD archiving purposes.

If you do choose to de-emphasise the files, you should also change the cue sheet to reflect the change. If there is no pre-emphasis, the "PRE" flag should be edited out of the cue sheet.

From...

REM GENRE Classical
REM DATE 1977
REM DISCID 900D2C0B
REM COMMENT "ExactAudioCopy v0.99pb4"
PERFORMER "Gunilla von Bahr"
TITLE "Sun-Flute"
FILE "Gunilla von Bahr - Sun-Flute\01 - Albinoni - Adagio.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Albinoni - Adagio"
    PERFORMER "Gunilla von Bahr"
    FLAGS PRE
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Debussy - Syrinx"
    PERFORMER "Gunilla von Bahr"
    FLAGS PRE
    INDEX 00 08:48:00
FILE "Gunilla von Bahr - Sun-Flute\02 - Debussy - Syrinx.wav" WAVE
    INDEX 01 00:00:00
(...)
			

...to:

REM GENRE Classical
REM DATE 1977
REM DISCID 900D2C0B
REM COMMENT "ExactAudioCopy v0.99pb4"
PERFORMER "Gunilla von Bahr"
TITLE "Sun-Flute"
FILE "Gunilla von Bahr - Sun-Flute\01 - Albinoni - Adagio.wav" WAVE
  TRACK 01 AUDIO
    TITLE "Albinoni - Adagio"
    PERFORMER "Gunilla von Bahr"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Debussy - Syrinx"
    PERFORMER "Gunilla von Bahr"
    INDEX 00 08:48:00
FILE "Gunilla von Bahr - Sun-Flute\02 - Debussy - Syrinx.wav" WAVE
    INDEX 01 00:00:00
(...)
			

Keep a copy of the original cue sheet if you keep copies of the original pre-emphasised files, so that you can use it in order to re-create an exact copy of the CD.