Wednesday, June 23, 2010

My digital audio guide - the ultimate burn


This third part of my complete guide to digital audio covers burning your audio CDs

Now I know you are probably thinking, burning an audio CD?  Child's play, right?  Yes, it is if you don't really care about the details.  However, if you want your burned audio CDs to be perfect replicas it will require a little effort and the right tools.   Fortunately, all of the hard work really is in ripping accurately to cue sheets.  Making a replica from a cue sheet becomes pretty easy.

Most people assume (incorrectly) that when they rip a CD they get a perfect copy.  A similar set of problems cause errors during the writing process as well.  Try it sometime (and compare the results) and you will find it isn't so easy (impossible with most audio tools).

Why would you want to burn an audio CD anyway?

Good question.  Frankly, I don't do this very often anymore.  However, I can still think of some uses:
  1. Expendable CDs for your children (or your parents).  We all know that kids can be pretty hard on CDs.
  2. Expendable CDs for your car.  Many car stereos don't have fancy MP3 player plugins, and still use old fashioned CDs.  Cars and CDs don't always get along (heat/sun do bad things to plastic).   Again, you don't want your originals destroyed when a blank CDR costs only a few pennies.
  3. Adding CD-Text to a CD.  Most CDs don't have this, but you can add it to your CD-Rs as long as your burner supports it
  4. Peace of mind knowing that you can reproduce the original, exactly
  5. Obsessing over technology details is just plain fun sometimes
Besides, even if I wanted to play my original CDs in some old player, I'm not sure I could even find them.  All of my CDs are stored away, unorganized, in dusty corners of my home (one down side to having already ripped all of my music).  It would take me a hour or more to find any one disc.  I'd rather burn a CDR.  Much faster (but not a very green thing to do).   Like I said, I rarely do this, but it is nice to know I can.

So, why is it hard to get a perfect burn?

I'll ignore some of the basic problems of burning media.  You obviously should start with reasonable quality blank media, use good software and have a quality burner.  All those issues aside, there are specific problems that occur with audio CDs during during the burning:
  • CD burners have write offsets, which if not accounted for, will shift the audio data.  This makes the new audio CD different and no longer a perfect copy.
  • Even if you have your tracks stored losslessly, if you are not careful your writing software can add extra gaps between tracks.   This is annoying and also makes the copy no longer perfect.  This is major problem in CDs that are originally gapless (e.g. live recordings, etc).
  • Unless you use Cue Sheets, any information about track index marks or preemphasis will be lost.  In the case of preemphasis, your newly burnt CD-R will sound markedly different (bad) when compared to the original.  Preemphasis is rare, but you'd be surprised how many times it shows up and on what discs.  Unless you check for this, you'd never know.
Using Cue Sheets makes recreating the original CD relatively easy.  All we really need to do is configure EAC properly.  Many people are surprise to find out that EAC contains good burning software as well as some useful tools.

Configure EAC

This takes a few steps (and you will need a blank CDR or two).  However, this is nowhere near as much work as setting up for perfect rips.   I'll take you through this step-by-step.

Bring up the "EAC->Drive Options..." menu and open the "Writer" tab

First we are going to determine if your drive supports CD-Text, etc

  • Put a blank CDR disk in your burner (it won't write to it yet), and press "Detect Write Features".
  • This will determine if you burner supports writing UPC/ISRC codes as well as CD-Text.  When the test is done, click "Apply" (not OK) to save your results.
  • As you can see, my laptop (which I'm writing this on), doesn't support either of these features.  However, my desktop's burner does.  These features are drive dependent obviously.
  • Next, let's figure out what the write offset is.
  • Again, you need a blank CDR in your drive, but this time we will be writing to it.
  • IMPORTANT:  If you are running Vista or Windows 7, you must run EAC as administrator (exit and restart it if needed).   This is necessary whenever you try to write to the CDR.  Use right mouse click to launch EAC and select "run as administrator".
  • Click on "Create Offset Test CD".   This will write to the CDR (so be prepared to throw it away afterwards).  You can use a CDRW if you like.
  • You may see a blank "cdrdao" window pop-up, ignore it.  It will go away when the process is done.
  • After the CD ejects, push it back it to finish the process.
Next, open the "EAC->Drive Options" Menu and select the Gap / Speed Tab:

  • (Write down) the "Read sample offset correction value" reported by Accurate Rip.  This is your CD burners' read offset.
  • Temporarily uncheck "Use AccurateRip"
  • Click "Detect read sample offset correction"
  • AccurateRip should recognize your disc as an "EAC Offset CD", wait for the test to finish.
  • (Write down) the sample offset, this is your combined read/write offset.
  • Click OK, not APPLY (you don't want to overwrite your read offset).
  • Now, re-check "Use AccurateRip" (this restores your read offset)
  • Click OK
To calculate your write offset, just take your combined read/write offset and subtract the read offset.  In my case I would take 0 (combined r/w offset) minus 6 (read offset) which equals -6 (write offset).

Then, open the Write tab and set your write offset:


All Done!

Ready for that ultimate BURN?

Now that EAC is all configured (for your drive), let's do a test burn.  Select one of your CDs that you have previously ripped to a Cue Sheet and you got a good AccurateRip result.

Unfortunately, you can't burn a FLAC file directly to a audio CDR with EAC.  So, I've written a little helper script that decompresses the CD image and prepares it (and the cue sheet) for easy burning.
As in my previous guide, just place this script in the Audiotools folder that you created earlier.  This script requires that you have FLAC installed (and optionally Monkey's Audio, if you like).  It also requires ActiveState Perl.

Now launch the script.

All you do is drag and drop the folder containing the album that you want to burn to the window:

UPDATE:  I've changed the script to use Tk (a GUI toolkit library).  Before running the script you must also install Tk.  After installing ActiveState Perl, simply type "ppm install Tk" in a command window.  Tk should install automatically.

After you launch the script, it will now open a file selection dialog. Simply select the cue file of the album that you will be burning.

If you specify a folder as a command-line argument to the script, it will use that folder when launching the file open dialog.  Then, if you create a Windows shortcut to the script, you can add this folder to the command line.  To add an argument to a shortcut, right click on it, select properties, then add it to the "Target" line.  This way you can have an icon on your desktop (or wherever you want), and it will open the folder that contains your cue/flac files.


When the script finishes, you will have a cue sheet and wav file (saved in a temporary directory) ready for EAC to burn.

Launch EAC next.  For Vista and Windows 7 users, make sure you run EAC as administrator (whenever you plan to write to the CD).

To use EAC's burn tool, open the "Tools->Write CD-R..." Menu:

  • Use "File->Load Cue Sheet..." and browse to the C:\tempcdimage directory
  • Select the file "CDImage" (with .cue extension)
  • You should see all of the track/index information displayed as above
To start burning, open the "CD-R->Write CD..." menu

  • Make sure the Write mode is "No Test Write" to actually write the disc
  • Click on "Make It So"
  • As before, ignore the "cdrdao window"
  • It will report status as it goes, just like any other burner software.
All Done!

There you go, the ultimate burn!

How do I know the write is perfect?  You don't take my word for it?  I wouldn't either!

If you want to verify it, just rip the CDR that you just burned.   Once you rip it, you can verify that it is identical to the original in a few different ways:
  1. The whole disk checksums reported by EAC in the Rip log file (saved in album folder directories) should be the same.
  2. AccurrateRip will report the same positive results that you got with your original CD
  3. If you want to be really sure, you can use EAC's built-in WAV file comparison tool.
Here are the two log files compared with PSPAD's handy TextDiff tool.  I've highlighted the important bits anyway below:


Not only does the whole disk CRC match, but so do the per-track checksums (naturally).  Likewise, we can see that AccurateRip reports success in both cases.  Of course, the confidence numbers could change as the database is being updated by other users.

Ok, just for fun, let's use EAC's WAV compare tool...  Just to be sure

First, we need to create the two wav files.  We can use the cue-2-cd.pl tool for this.  Since the script writes the file into the same temp directory, you need to rename the folder before cue-2-cd.pl has a chance to delete it:
  • Use the cue-2-cd.pl tool to expand the FLAC file of the original CD rip
  • Rename c:\tempcdimage to c:\original
  • Use the cue-2-cd.pl tool on the rip of the CDR copy
  • Now you have two wav files that EAC can compare
In EAC open the "Tools->Compare WAVs..." menu

  • The EAC tool will prompt you for the two WAV images.  If there are no differences, you will get a blank report (as above).  This means the WAV files are sample-for-sample identical (same size, no shifting, etc.)
SUCCESS!

The ultimate, verified almost perfect burn!  You have even added CD-Text (if your drive supports it).

Hey!  What do you mean almost perfect?

Well if you remember that point about supporting overread in the lead-in / lead-out (beginning / end) of the CD in my perfect ripping guide?  The same issue applies with write offsets and writing CDs.  If your burner isn't capable of writing into the lead-in / lead-out area you might not have a perfect burn (assuming there are non-zero audio samples in the overwrite area).

There is nothing you can do about this (other than getting a new CD burner that supports this).  There aren't any options in EAC to control this either.  Of course very few audio CDs have non-zero data in the samples that would be affected by the write offset.

Some References:


No comments:

Post a Comment

Copyright (c) 2010 CuttingTheBills.com. All Rights Reserved.