You are here

Digitally Transfering Sounds From Audio CD To Your PC

Tips & Tricks By Martin Walker
Published August 1998

Figure 1: Here you can see the effect of jitter on grabbed audio: in the left‑hand window a section of the data has been repeated, whereas in the right‑hand window the vertical jump in both channels indicates a section that has been missed altogether.Figure 1: Here you can see the effect of jitter on grabbed audio: in the left‑hand window a section of the data has been repeated, whereas in the right‑hand window the vertical jump in both channels indicates a section that has been missed altogether.

To get the maximum quality from audio sample CDs, you need to transfer the sound data to your PC in the digital domain. Martin Walker explains why the process isn't always as easy as you might expect.

Sample CDs now come in three main formats. The first are those that are read directly by a specific make of sampler, such as Akai, Roland or Emu (although many samplers can now read formats other than their own). For computer use, CD‑ROMs are also available with sounds in PC WAV or Mac AIFF format. The third type is the audio sample CD, and while these lack the looping and performance information of the previous types, they offer a much wider variety of sounds, at often a third of the price of the sampler‑specific CDs. To extract the highest quality from audio sample CDs it's always best to go for a bit‑by‑bit digital grab, rather than re‑sampling the sounds through another A‑D converter.

You might also want to do a digital grab in some circumstances if you have a CD‑R drive that you use for creating master CDs of your own music for duplication. Once you've burnt your latest album, you might expect that reading back the same audio data into your hard drive would be as easy as the writing process. However, this is not always the case, and the digital audio extraction can cause various unexpected problems.

To extract the highest quality from audio sample CDs it's always best to go for a bit‑by‑bit digital grab, rather than re‑sampling the sounds through another A‑D converter.

Getting On Track

Figure 2: The latest 3.01 version of Easy CD Creator has audio re‑syncing options, which should make glitches a thing of the past with most drives.Figure 2: The latest 3.01 version of Easy CD Creator has audio re‑syncing options, which should make glitches a thing of the past with most drives.

According to Adaptec, who market Easy CD Creator for PC, and Toast (and Jam) for Macs, all CD‑R drives can perform digital audio extraction. However, many CD‑ROM drives do not support it at all, and those that do can rarely perform it reliably at anywhere near their top speed. For instance, the typical 24‑speed CD‑ROM drives currently supplied with many machines may not manage to extract audio at more than 8x normal speed, and in some cases the only recourse for reliable reading may be to resort to reading at single speed — or, in other words, real time.

Although some SCSI CD‑ROM drives can cause problems with digital audio extraction, the EIDE drives used in many PCs are in an even greyer area, since few professional applications even attempt to read audio from them. Although there are various shareware utilities that claim to do this, even here the success rate varies widely, not only between drives from different manufacturers, but also from model to model, and sometimes even depending on the firmware version (operating system stored on a chip inside the drive) that you have.

The reason for these problems is another version of our old friend jitter. Normally, when we refer to jitter we're talking about minute inconsistencies in the timing of digital audio, as it is 'clocked out' by the D‑A (digital to analogue) converter. These timing variations can be either periodic (regular), in which case they result in spurious fixed‑frequency distortions at low audio levels, or random, which causes an increase in the level of background noise. In the case of digital audio extraction jitter, the mechanism and effects are rather different, and rather more audible if not dealt with.

When an audio CD is being read, the information is usually simply passed into a buffer which acts rather like a bucket containing water. As long as there is water (data) in the bucket, a highly accurate clock reads it out at an extremely steady rate (the accuracy of this determines the amount of traditional jitter). The spindle speed of the CD player (how much water is being trickled in) is simply adjusted to make sure that there is always water in the bucket. However, for digital audio extraction, the computer system has to grab a chunk, write this data to the hard drive, and then return to exactly the same point in the data stream. Since the absolute position in the data stream of the previous grabbed block is now slightly uncertain, the computer may not always continue extracting at exactly the same place in the stream of audio data that it left off. The extraction process may thus continue from a slightly different place in the stream. If it restarts from a point a few bytes earlier in the stream, part of the waveform will get repeated; a few bytes later, and there will be a gap in the waveform. Either way there will be a sudden discontinuity in the grabbed waveform, which will result in an audible click on playback. (See Figure 1.)

The difference with a CD‑ROM is that each block of data contains a header, with sync information, and a copy of the block's address, so that the drive can easily find the start and address of each block — vital for data storage. When it comes to CD Audio, apparently only Plextor CD‑ROM drives have special extra hardware built in to guarantee the absolute position of audio data, although I have heard some conflicting reports about this.

Some drives have problems if the pre‑gap before the first audio track isn't exactly two seconds (the expected default timing). A few drives can't cope with this, and start digital audio extraction slightly late, so that they also read slightly beyond the end of the track. Fortunately this problem only seems to be associated with a some older drives, such as the Yamaha CDR100/102 and the Philips CDD2600, but if you're creating CD‑Rs of your own music it would seem safest to leave the initial two‑second gap alone, whatever you do with timing between the other tracks.

Trying It Out

Figure 3: If you've ever wondered why some CDs are fatiguing to listen to, grabbing a track and examining it in a WAV editor can prove instructive. This one could be described as powerful or lacking in dynamics, depending on your viewpoint.Figure 3: If you've ever wondered why some CDs are fatiguing to listen to, grabbing a track and examining it in a WAV editor can prove instructive. This one could be described as powerful or lacking in dynamics, depending on your viewpoint.

Many drives that support digital audio extraction may not achieve reliable results at their higher speeds, so some experimentation is in order. If you try grabbing an audio track with your CD‑ROM drive operating at its maximum digital audio extraction speed, you may hear obvious problems as soon as you listen to the result, or you may just hear the odd tiny tick or pop in the grabbed file. An occasional glitch may not worry you, but if you want to guarantee that a read will work reliably every time, slow down the grabbing rate, so that your system has more time to ensure proper synchronisation of the audio data. This involves a bit of trial and error, but you'll probably only need to try three or four times to establish the maximum reliable grabbing speed of your drive.

A particularly bad drive may only extract at single speed, and in this case it will be impossible to back up your audio CD in real time to another CD‑R drive, since even if you reduce your CD‑R to 1x write speed it's unlikely that the audio extraction will be able to reliably keep up with the writing process. You'd then have to create an image file of the source CD on your hard drive, and write from that. This is usually the most reliable method anyway, since there can be various problems when performing digital audio extraction while using the same buss(SCSI or otherwise) to write data. Anyone who read the SOS review of the Yamaha CDR400tx (in the December 1997 issue) may remember that I suffered from low‑level 'ticks' in a CD‑R that I burned while simultaneously using digital audio extraction to read an audio CD using a TEAC CD‑ROM drive. I now know what caused the problem.

Many drives that support digital audio extraction may not achieve reliable results at their higher speeds, so some experimentation is in order.

One software solution to this hardware problem has been adopted by various pieces of utility software. It's called re‑syncing (or jitter correction), and relies on grabbing larger, overlapping sections of audio. These sections are then moved backwards or forwards until the overlapping sections match exactly, at which point they will be exactly in sync. This technique is used in the latest version of Adaptec's Easy CD Creator (see Figure 2). The procedure with this program is first to run the system tests, to determine the maximum extraction rate for your drive. You can choose from three selectable speeds for digital audio extraction: the highest (default) setting simply uses the maximum speed already established by these tests. The medium speed still allows CD‑R drives, and a few specific well‑behaved CD‑ROM drives, to extract at the maximum speed, but uses re‑syncing for all other drives. This is a sensible setting if you have a CD‑R and a less reliable CD‑ROM in the same machine. If you experience any glitches, switching to the Slow speed always uses audio re‑syncing, but this significantly reduces audio extraction speed. You may find that personally establishing a maximum reliable extraction speed for your drive will achieve faster results than resorting to audio re‑syncing.

Testing Your Drive

The only absolute test of accuracy is to grab a track several times at a certain read speed, then compare the resulting files. If there are no obvious audio glitches or ticks you should be safe to continue grabbing at this speed. Those with noise‑reduction plug‑ins can also use any 'find click' functions, which will speed up the search. If you find anomalies, reduce the CD read speed in your grabbing software and try again.

Another way to double‑check the data is to use the DOS utility FC.EXE (File Compare) that comes with Windows 95. You'll need to open a DOS window to do this, navigate to the folder containing your WAV files, and then type the command line 'fc/b File1.wav File2.wav' (with File1.wav and File2.wav being replaced by the names of your own two files). The /b part ensures that a byte for byte comparison is carried out. Any bytes that differ will have their respective values printed out on screen. By the way, if you do get stuck in a seemingly endless printout of different bytes, you can use the Ctrl+C or Ctrl+Break key combinations to escape.

Using Wavelab 1.6, my attempts to grab at Auto (fastest) speed with the Yamaha CRW4260 at 6x read speed produced occasional glitches, but at 4x speed I didn't hear a single one. However, when I'd grabbed a two‑minute track six times, using FC.EXE suggested that every single byte was different every time but one, since only one pair of the six files proved to be identical. I have seen references on the Internet to this non‑repeatability of data, but although the numbers are different, the audio always seems to sound the same. This didn't make sense to me at first, since it suggested that the data was being modified in some way, so I investigated further. The big clue came when I examined the actual bytes in a binary file editor. After some zero bytes (digital silence), the first few non‑zero bytes of each of my six files were identical, but not their position within each file; this varied by anything up to 16 bytes.

Since Cool Edit Pro allows you to view data right down to byte level, I used the program to carefully trim off all the zero byte values from the beginning of each file, so that each waveform started at precisely the same place. After this, all six grabs proved identical when tested with FC.EXE. So the answer is that the timing uncertainty will normally give you identical audio files, but with slightly varying numbers of zero bytes at the beginning. This is perfectly acceptable, and seems to prove that you can always get back exactly what you burned onto an audio CD‑R, though I can't guarantee that this will be the case with every drive.

A Bit Tricky

If you have yet to buy a CD‑ROM or CD‑R drive, the possibility of audio extraction will probably enter into your choice. However, attempting to check this aspect of technical performance can be a tricky business, since manufacturers' specifications often tend not to mention digital audio extraction at all. Buying such drives is a gamble, since although many modern drives provide this facility it's still by no means universal, particularly for PC EIDE types. You are also unlikely to see this feature quoted in advertising, although some specialist music dealers may know whether the models they stock can extract digital audio.

Often the only place to turn is the web site of a particular manufacturer, where technical details are normally available in full. You can sometimes even download a complete copy of the user guide. However, even if the drive supports digital audio extraction it's often difficult to find out the likely maximum speed without a test run. Drives generally recommended are from Plextor (all models), the Pioneer 10x speed CD‑ROM, and Sony.

As I said earlier, from my own experience it's always safest to create an image file on your hard drive before attempting to burn a CD‑R disc, to minimise the chances of glitches. Don't forget to defragment your drive before you start the process: the last thing you want is to make the drive's head assembly jump about more than is needed. The other advantage of creating an image file is that it gives you a chance to check the audio before you waste any CD‑R blanks on duplicating glitches.

If you're compiling your own music for an album, I suggest that you burn an additional data CD‑ROM of the separate tracks in WAV or AIFF format for backup purposes, and not rely totally on an audio CD version for posterity, since this provides added error correction. Aren't computers wonderful?

Copy Rights?

Being able to digitally copy audio CDs opens up the tricky question of copyright. In this country, people have been making copies of their own CD or vinyl albums onto compact cassette for many years, but the whole issue remains a hazy one. The new consumer CD‑R recorders (such as the Philips CDR870 reviewed in the December 1997 issue) can only use special consumer CD‑R blanks, and the price of these includes an amount which goes towards any copyright fees that may be lost.

However, even huge companies like Adaptec are now marketing programs such as Spin Doctor, which are designed to help you transfer your vinyl collection to CD‑R, complete with pop and crackle reduction. They do include a red sheet inside the box, advising you to contact your legal adviser before copying anything.

The bottom line is that is that we musicians can see both sides of the fence. If you do have a CD‑R drive, and are using it to compile your own music, think on before you copy someone else's — one day you may be relying on sales of your own CDs to earn a living.

Another Reason To Be Grabby

Looking at other people's recordings in more detail is always a good way to learn more about the recording process, and now that individuals can master their own albums it can be very instructive to view professional releases (see Figure 3). You can scan the peak recording levels to see how hot the recording is, and look at its typical dynamic range — often it's fairly obvious when compression has been used before you even listen to the material. You can also examine how the professionals place their PQ codes to ensure that every track starts cleanly on a wide variety of audio CD players.