This HowTo describes how to make an audio CD in a way so that you can reproduce it exactly - even in years, and on different computer systems.
What can go wrong, and why am I spending time writing this tutorial?
(EDIT: CD production facilities usually won't handle TOC files, but might accept BIN/CUE images. I've also written an additional tutorial about creating a BIN/CUE audio CD image with GNU/Linux)
When I made the very first audio CD for the band I was playing in, I just burned the final WAVs onto an audio CD. No big deal, right?
Any CD burning application can do that... right?
Well, here's a summary of the lesson I've learned the hard way - and how to do it right...
- I was using Nero, because I got a free copy with my CD-writer drive
- I wanted every CD to be an *exact* copy. Bit-proof copy. So I needed some sort of "master image" - and that's why I've made a Nero audio project image.
- Now I was locked to using Nero, because no other application can handle their images
- My band-colleagues did *not* have a copy of Nero, so I we couldn't distribute the burning of the CDs among us. :(
- Well, now guess what: I was using Nero v5 - and one year after our album was released, v6 came out and it wouldn't open my v5-image anymore. fsck! Ok. So I stuck with v5. But how long could I do that?
- No matter which application you use for burning audio CDs, usually each one of them has its own format
- Nowadays, there we even have different operating systems in our band (GNU/Linux, MacOS, Windows, ...) - so it's really tricky to find something that everyone has.
Well, with a reasonably serious album production, you should be able to reproduce your master in case you're running out of copies (You should even think about that if you have a glass-master, because things can get lost, broken, etc).
That's why I've finally switched to using TOC files.
Here are the benefits of using TOC:
- It's a plain text file. No special editor needed. And you can read/migrate it if you have to.
- Several applications can burn/create TOC files.
- There's at least one application that exists on all common operating systems and is free software: "cdrdao" - so I can keep a copy of its binaries and sourcecode, which enables me to keep my CD-burning environment exactly as-it-was for almost infinity. :)
- It's now possible for anyone in our band to re-create the audio CD master, using the same environment I was using.
- I can even provide the whole "burn your own CD bundle" online without licensing-, vendor-lock-in-, or other uncomfortable issues.
It might not be as trivial as using a regular CD burning application, but hey: we're talking about a serious piece in the chain of professional audio CD production here, and not about burning an MP3-mix-CD for a friend! :)
So, where do we start?
One can create a TOC file from scratch, but I think it's more comfortable to use a GUI tool to create the TOC file basis and then manually "polish" it to your needs. I've used "Gnome CD Master" for this, but you can use any other tool that can write TOC files, as well.
STEP 1:
Generate a basis TOC file, using "Gnome CD Master" (gcdmaster)
- Rename all your CD track audiofiles to start with their track number.
Example: 03-love_over_systems.wav
- Create a new audio project (Create an audio CD from wav files)
- Choose "Edit > Append Track (Ctrl+T)"
- Select all tracks (WAV files)
- Since they started with their tracknumber in the filename, they should be appended in the correct order.
- Edit the metadata for the album:
- Edit > Project info
- Edit > CD-TEXT
- Edit > Track info
- Save the file as "audiocd.toc"
Here is an example of the TOC file that gcdmaster generated for 'x marks the spot'.
STEP 2
Manually verify and improve the data in the TOC file
-
Human readable song duration:
You should now have a valid, and useful TOC file, but gcdmaster outputs the duration of some songs in samples, like this:
FILE "Music/BlueRoom_Project/audio/CD/2010-x_marks_the_spot/cdrdao/09-brea.wav" 0 38807767
I haven't found a comfortable tool to do that with, so I've had to manually copy the duration in this format from gcdmaster's "Edit > Track info" dialogue for each track. There's a small caveat with gcdmaster: You have to subtract "1" from the last time digit, so instead of "14:40:00", you write "14:39:74" (The time format is: "m:s:f.x", so 00 really reduces to 74 frames).
In the end it just looks waaay nicer than samples:
FILE "Music/BlueRoom_Project/audio/CD/2010-x_marks_the_spot/cdrdao/09-brea.wav" 0 14:39:74
-
Make the CD-burning package (TOC, audiofiles, ...) portable:
As you can see above, each audiofile still has its path information stored with it. That's fine on the machine you've created the TOC, but if you open the file somewhere else (or relocate it on your own computer), it won't find the audiofiles anymore. :(
That's why I usually either copy the WAVs into the same folder as the TOC, or simply create symlinks.
This makes it possible to work without paths, which then looks like this:
FILE "09-brea.wav" 0 14:40:00
Short, nice, clean - and portable!.
-
Human readable silence gap information:
gcdmaster writes a silence gap in the following format:
SILENCE 233
Again, I prefer human-readable data, so just add a "SILENCE" line before the filename, and a "START" line, right after it:
SILENCE 00:02:00
FILE "09-brea.wav" 0 14:40:00
START 00:02:00
Of course, you can adjust the silence duration to whatever you like - now that it's written in a readable format. ;) The default value is 2 seconds.
Here is an example of the TOC file I've manually cleaned and improved (It already contains CD-TEXT and ISRC metadata, as explained below).
STEP 3
Add metadata (CD-TEXT, ISRC codes, ...) to the TOC file
Nowadays, CD-TEXT can be written by almost all CD-writers, and is read even by car stereos. I think it's a good thing to use it, because it provides basic information like artist, album- and song titles without requiring an internet connection. :)
ISRC codes on the other hand, are unique IDs for each track given to you by a recording label, and they are mandatory if you want to get airplay on radio stations (Yes, it's a stupid requirement. I know).
All this information is simply added to the TOC file as plain text.
There's a global block, valid for the whole album, which looks like this:
CD_TEXT {
LANGUAGE_MAP {
0: 9
}
LANGUAGE 0 {
TITLE "X marks the spot"
PERFORMER "XBloome"
SONGWRITER "XBloome"
ARRANGER "XBloome"
COMPOSER "XBloome"
MESSAGE "CC-BY-NC-SA"
}
}
More information about the tags (e.g. "LANGUAGE_MAP") can be found on the cdrdao man page ("0: 9" means that the first language is English).
Now, you can also add metadata for each track. Here's an example of a track-metadata block (with ISRC):
// Track 1
TRACK AUDIO
COPY
NO PRE_EMPHASIS
ISRC "ATV721002001"
TWO_CHANNEL_AUDIO
CD_TEXT {
LANGUAGE 0 {
TITLE "Depends on the situation"
PERFORMER "XBloome"
ARRANGER "XBloome"
SONGWRITER "XBloome"
COMPOSER "XBloome"
MESSAGE "CC-BY-NC-SA"
ISRC "ATV721002001"
}
}
//SILENCE 00:02:00
FILE "01-depends_on_the_situation.wav" 0 03:08:74
//FILE "01-depends_on_the_situation.wav" 0 8334847
START 00:02:00
Repeat this for every track, and you're done!
STEP 4
Burn it to a blank CD recordable disk
You need to know 3 things to burn it using the "cdrdao" executable:
- The speed you'd like to burn it with (e.g. 16x)
- The SCSI bus ID of your CD-writer
- The driver to use for communicating with your CD-writer
That sound super-complex, but in fact you only have to figure that out once on a new system.
- The speed is something you can choose freely, but keep in mind that faster means more possible bit-errors.
-
You can get the SCSI device id by calling:
cdrdao scanbus
You'll get some output like this:
5,0,0 : HL-DT-ST, DVDRAM GSA-4120B, A111
And the first 3 digits are the SCSI bus ID. In my example, it's: "5,0,0".
-
Usually, most drives work fine using the "generic-mmc" driver. There's a list of other drivers on the cdrdao homepage, in case you need a different one.
Now that we got all we need, the syntax to burn using "cdrdao" is as follows:
cdrdao write --device <device> --speed <speed> --write-speed-control 1 --buffer-under-run-protection --driver <driver> audiocd.toc
Here's a real-world example:
cdrdao write --device 5,0,0 --speed 1 --write-speed-control 1 --buffer-under-run-protection --driver generic-mmc:0x10 audiocd.toc
Step 5
Verifying the outcome
It's important to verify that the audio CD you've produced contains everything the way you want it to be.
The following steps have prooven to prevent nasty problems/surprises:
- Verify track order & duration
- Verify pre-gaps
- Verify CD-TEXT metadata
- Verify ISRC codes
1) Verify track order & duration:
That one is trivial: Take the CD-R, put it into a regular hifi-stereo and check the following:
- Does each track start at the right position and clean (no clicks, ...)?
(If you've exported/cropped the WAV at a non-zero sample value, it might click)
- Is the end of each track clean?
(full duration; not cropped - and enough silence before the next one starts?)
2) Verify pre-gaps:
- Do the tracks have a proper pre-gap silence?
(Choose a track and rewind to the end of the previous one. There display should count down from e.g. 02:00 between the tracks)
3) Verify CD-TEXT metadata:
If the CD-TEXT was written correctly, there are several options to verify it:
- Put the CD-R into a stereo, capable of displaying CD-TEXT (e.g. car stereo)
- Open the CD-R with any audio-CD-extraction tool (e.g. K3B, Konqueror, EAC, ...). You should see artist, album- and songtitles
4) Verify ISRC codes:
Cdrdao offers to read only the metadata of an audio CD - no audio data is being extracted:
cdrdao read-toc --device <device> read_info.toc
This displays possible CRC errors, track order, duration, CD-TEXT and ISRC codes.
Here is an example of the TOC file read by "cdrdao read-toc".