Many people burn compact discs almost as casually as they once usedfloppy disks, and CDs serve many of the same purposes as floppies. ButCDs do not act like floppy disks. Whereas floppies and hard disks wereconceived from the ground up as media for storage and exchange ofcomputer data, the CD was designed for music, and it had to work withinthe limitations of affordable hardware technology in the early 1980s.The CD has evolved as a medium for data storage and for entertainment,but it can never fully escape its roots. That accounts in large partfor the different, and at times quirky, ways that CD-Rs behave.
The variety of CD types can also be confusing. You know CD-Audio andCD-ROM are different beasts, but what are the differences, and how dothey affect you? Many people don't really understand or know how to useother application formats, such as Video CD.
Although you may be using CD-R successfully, if you know a littlemore about what's going on, it's likely you'll be able to do more coolthings with it. When problems strike, knowing something about what'sunder the hood can save your butt. With that in mind, I'll try toanswer some of those nagging questions and give you practical hints forgetting the most from the medium.
CD recorders write data to CD-R blanks by “burning”spots, or pits, onto the disc (see the sidebar “How CD-RsAre Made”). A writing laser that draws 4 to 11 mW of power heatsa special dye in the recording layer and the substrate of the disc. Therecording layer melts, and the substrate expands to fill the space. Theresulting spot where the substrate peeks through is seen by a CD-ROM orCD player in nearly the way that a true pit on a manufactured discappears, and thus the disc can be read. Lingering incompatibilities,especially with CD-rewriteable (CD-RW), indicate that those spots arenot precisely identical to the pits in a replicated disc, but they areclose.
So far, so good. But consider the tolerances involved. You have adisc spinning at 200 to 500 revolutions per minute. As it spins, thewriting laser has to focus on a recording layer that's about one eighthof one millionth of a meter (one eighth of a micron), or 125nanometers, deep. The disc is flat to a tight tolerance, but at thelevel of the focusing laser, it appears to be bouncing up and down by ahuge amount around three to ten times per second. That absurdly tightfocus is held with almost complete reliability by an electronic servothat continuously detects any tiny deviation from focus and applies theappropriate correction (see Fig. 1). Bull riding would be easyby comparison, but these inexpensive little mechanisms perform theirtask without a burp or hiccup.
At the same time, the rotational speed must be precisely controlledwhile the head laterally tracks a groove on the disc that is just halfa micron wide and less than two microns from the next turn of thespiral. Those miracles of control are performed by the drive'scontroller chip and by additional servos in the drive. This remarkablecontrol of focus and tracking is maintained as the laser writes aspiral track that is three to five miles in length. That's pretty gooddriving!
While all that is going on, the writing laser flashes on and offapproximately 100 million times a second. Not only is it flashing thatfast but it's doing so with precise control to deliver exactly theright amount of heat to melt the recording layer in precise multiplesof 0.83 microns. That deserves your respect.
CD-RW uses the same dimensional specification and trackingmechanisms as CD-R, but the mechanism used to create the required spoton the disc is different. In CD-RW, the recording layer is made of ametallic alloy rather than a dye. The alloy is a special blend that hastwo states: polycrystalline and amorphous. The alloy hasa distinct index of reflectivity in each of the two states; that is, itlooks darker in one state than in the other.
During CD-RW writing, a laser that is slightly more powerful thanthe one used for CD-R heats the alloy to 500 to 700 degrees Celsius, atwhich point it switches from the polycrystalline state to the amorphousstate, creating a spot that is seen by the reading laser as beingdarker than the surrounding polycrystalline material. To erase thedisc, the laser heats the surface to just 200 degrees Celsius, at whichpoint the alloy softens but doesn't actually melt, returning to itspolycrystalline state. CD-RW discs can be completely erased, buterasing and writing are usually done in one operation.
The difference in underlying technology is the reason that CD-RWremains incompatible with a lot of older CD players and CD-ROM drives.The distinctions in reflectivity that enable the read process areshallower in CD-RW than they are for CD-R. If the drive was not builtwith CD-RW media in mind, it probably will never be able to read it.Today most drives are manufactured to be CD-RW compatible, so theproblem is becoming less widespread, but it might never go awaycompletely.
THE WAY TO GO
When should you use CD-R, and when should you use CD-RW? For onething, if you are going to hand discs out, you definitely will want touse write-once CD-R. It has the highest compatibility, and the discsare cheaper — important if you don't expect to get the discback.
When CD-RW was introduced, CD-R blanks were still a few bucks. Inthat context, the rewriteability of CD-RW was compelling. Today,though, blank CD-Rs cost about 50 cents each if you buy in bulk, andthe need for rewriteable discs is less critical for many people. Ifyou're backing up data and do not need to continually update the backupdisc, or if you are writing discs that you want to keep, using CD-Rs isprobably cheaper.
If you are dynamically iterating test discs for a CD-ROM or an audioproject, are continually updating a backup (for example, doingincremental backups), or are just bugged by the accumulation of discs,it may be worthwhile to use CD-RW discs. It's up to you to figure outwhere the exact crossover point lies. But first, make sure that all theplayers and ROM drives you use will read the media.
For the remainder of this article, most comments apply to bothformats but primarily to CD-R. I'll note where there's a distinction,but otherwise assume that anytime I say CD-R, I also mean CD-RW.
One common problem when burning a CD-R is buffer underrun. AsAndy McFadden puts it in his excellent CD-R FAQ (see the sidebar“For Further Information”), “[buffer underrun] meansyou have an attractive new coaster for your table.” That's true,at least for non-Multisession CD-R. But where does the nuisance comefrom?
CD writing is a continuous process and cannot be interrupted inmidsession. Once the laser begins to write, any interruption will makea physical gap on the disc that cannot be read. To ensure writingcontinuity, data is stored in a buffer within the drive. Depending onthe drive's make and model, the buffer ranges from 512 KB to 4 MB insize. More is better. As the host computer feeds data to the drive, thedata is stored in the buffer; from there it is sent to the disc in anice, well-behaved stream.
Thanks to the buffer, the drive can tolerate an interruption in datatransfer from the host — up to a point. But if new data doesn'tarrive before the buffer runs out, that constitutes an underrun (seeFig. 2), and at least for Disc-at-Once and Track-at-Oncewriting, the disc is ruined.
Underruns occur for any number of reasons relating to the host'sability to provide data continuously. Not all underruns can beprevented, but elementary housekeeping can reduce their incidencesubstantially. Here are a few guidelines:
- Use a fast hard drive, one that doesn't do slow thermalrecalibrations in midtransfer. Almost any hard disk made in the pastcouple of years will work fine. For older drives, check out thecharacteristics before you rely on them for this purpose. If you havean underrun problem, drop the CD-writing speed.
- Be careful about using your computer during CD writing. AvoidI/O-intensive tasks that might interfere with regular data transfers tothe drive.
- Don't try to write from a file server on a multiuser network.
- Defragment your drives often.
- If you have trouble with underruns, try recording from a precompileddisc image instead of recording on the fly.
- Put the recorder and the hard drive on separate SCSI or FireWirebuses if possible.
- Turn off virtual memory (Mac only).
- Watch out for antivirus programs that run at odd moments, screensavers that activate during the CD-creation process, unusual networkactivity, and background downloads of data or faxes. One way to checkfor those potential interrupters is to run the hard-drive defragmenterin Windows. If it restarts every few seconds, something is accessingthe drive.
Buffer underruns are becoming less of a problem as faster hardware,bigger buffers, and better controller technology permeate the market.If you encounter the problem today, chances are good that it's becauseyou're using older or dysfunctional gear. If and when an underrunoccurs, keep your head and look around at what's going on in yoursystem. Do what optimizing you can and try again.
VIVE LA DIFFERÉNCE
Red Book audio tracks on CD are not accessed the same way CD-ROMdata is. Audio streams sequentially, as with playing a phonographrecord. For that to happen, even on dirt-cheap CD players, the methodof access to the stream has to differ markedly from a computer's way ofreading a CD-ROM, and the data itself must be carefully structured forrobust, steady streaming. Remember, CD-Audio was created more than 20years ago, and the specification is exactly the same today.
CD-ROM uses a complete file system that tells a computer or othercontrolling device exactly where every piece of data starts and ends.It isn't like that for CD-Audio or for Red Book audio tracks on acombination CD-Audio/CD-ROM.
All CDs have a lead-in area, a program area, and a lead-out area. Asthe name implies, the program area is where the meat of the content is,whether the content is audio tracks, ROM files, or some combination ofthe two. The lead-in area and lead-out area help the drive andcontroller “lock on” to the disc and locate information inthe program area.
For CD-Audio, the lead-in area includes a table of contents (TOC) todefine where audio tracks start and end. On a consumer player, theinformation in the TOC is loaded into the player's memory when the discstarts up. When the CD format was established, memory was nowhere nearas cheap as it is today, and it was important to limit the amount ofinformation in the TOC. For that reason, the audio TOC is far simplerthan any standard computer file system.
To save memory, the pointers to tracks in the TOC do not pinpointthe exact byte that begins the track; instead, they drop the read headsomewhere near the actual start. Because audio CDs are designed to playsequentially, like phonograph records, that originally was not anissue. It's like dropping the needle into the space between tracks on arecord: unless you're a DJ doing beat matching, you are happy as longas the needle goes in somewhere between the end of the previous songand the beginning of the song you want to hear. In contrast, a drivereading a CD-ROM must locate the exact beginning of the desired datafile.
CD-ROM and CD-Audio also differ in the ways that data is formattedand grouped. All CDs are made up of 2,352-byte sectors. In CD-ROM, 304bytes of each sector are dedicated to header information that is partof the file system and allows direct and precise access to every one ofthe remaining 2,048 data bytes. CD-Audio sectors also contain 2,352bytes, but all are dedicated to audio, with no header. In normal audioplay, that is perfect, but when a CD-ROM drive tries to read CD-Audiodata, it has problems. Computers don't read data in continuous streamsbut in snippets of varying size that are loaded to memory andprocessed. When the computer finishes processing one snippet, theprocessor goes back and gets the next, and so on until completion.
When a CD-ROM drive tries to extract (rip) audio data to turnit into a file, it has a hard time locating the start of each snippet.The direct addressing of CD-Audio only gets the head to within onesecond of a desired location. The drive controller and software thenhave to use data embedded into audio-data frames to home in on thedesired location. But the accuracy of this subcode information islimited to 1/75 second.
To make matters worse, many older drives locate only to within fourof these units so that accuracy of position is limited to somethinglike 50 ms. That's close enough for listening, but it's a nightmare fordata extraction, and it's the reason ripped files sometimes have popsand clicks. The extracting software must rely on the capabilities ofthe drive's controller chip to locate audio data accurately, and somecontroller chips can do that much better than others; in fact, manyolder CD-ROM drives cannot be used for audio extraction at all.
The trouble isn't over when the audio track's start point has beenlocated. CD-Audio data is arranged into 24-byte frames, whichinclude actual audio data along with sync bits, error-correction data,and control bits. The data in those frames do not appear sequentiallyon the disc but are interleaved with the data of many other frames.That prevents a scratch on the disc from ruining a whole chunk of data.Instead, the error is spread over individual bits and words. The playerthen relies on data correction and interpolation to correct the errors.That doesn't always work, but most of the time it does.
In audio play, the deinterleaving of frames is performed as the CDplays, in silicon, which can be made very efficient for the purpose. Inaudio extraction, software usually has to perform this job and do audioerror correction, as well. Depending on the drive, condition of thedisc, speed of the processor used, and sophistication of the extractingsoftware, the whole process can grind to a halt. Do you have any discsyou just can't rip with your system? That's probably why.
Improvements in hardware and software technology make audio rippingmuch less troublesome. One such improvement is a revision of the ATAPIspecification that governs drive interfacing. The latest specification,used for many of the current generation of drive controllers, includesa new command set that supports functions that previously had to behandled by the ripping software, including a lot of error-correctionand subcode functions.
With those functions embedded in the drive, audio extraction becomesmuch easier and more efficient, and the complexity of software requiredfor ripping goes way down. When the drives position the heads moreaccurately, even older software works better, because less iterativesearching is required to cue the next snippet. The feature is calledAccurate Streaming, and if you're shopping for a new CD-ROM drive, lookfor it.
FILLING IN THE GAPS
The system of tracks and indexes on a CD-Audio dischas some interesting aspects that can affect your work. Audio tracks ona CD are defined as groups of indexes. Each CD has as many as 99groups, or tracks, and each track has multiple indexes, also calledindex points.
In the original specification (IEC 908), index points on CDs weredefined to allow access to tracks and for cueing to points within atrack. The latter application never really caught on, though; few discsare made with indexes other than those that cue the start of tracks,and few players permit access to indexes. For that reason, most folksare probably unaware that indexes exist.
Index points are mostly used to define the start of a track and thegap between a track and the previous track. Index 0 defines thebeginning of a gap, and index 1 indicates the start of the actualtrack. When you play through a disc sequentially, you hear all of thegaps. If there is audio in the gap, you'll hear that audio. But if youseek a particular track, the player will cue to index 1, and you won'thear the material in the gap. This mechanism is sometimes used to“hide” tracks on a disc. You can't find a hidden track bysearching, but if you play through the disc, you'll find the track.
IN THE MODE
The various modes for writing to CD can be confusing. When you'regetting this in perspective, remember that the original mode for CDrecording was Not-at-All! Recordable technology evolved years after CDwas created, and at every step, the ability to write has had to begrafted onto a format and technology that was never meant to gothere.
For a long time after CD-R came on the market (remember when burnerswere $10,000 and blank discs $50?), the only mode of writing wasDisc-at-Once (DAO). People didn't call it that, because there wasnothing to contrast it with. All you knew was the whole disc had to bewritten in one pass, and if there was any error in the content or theprocess failed for one reason or another, that disc was completelyuseless other than as arts-and-crafts materials.
In DAO mode, all the data is written to the disc without everturning off the recording laser. These days Track-at-Once andMultisession modes are in common use, but DAO has advantages,especially for audio mastering. Because the data is recordedcontinuously, audio tracks can be set back-to-back, with no gap inbetween. That allows for crossfades and segues between cuts. If you'remastering for CD release, DAO is the way to go.
When writing in DAO mode, all the data needs to be easilyaccessible, because there's no time for search and retrieval betweentracks. Preferably, the data is arranged continuously on a recentlydefragmented hard disk, though with today's fast drives, you'llprobably have success even if the data is spread across one or morelocal volumes. Be cautious about attempting to burn multiple tracksacross a network, however. Data can be interrupted on a network in lotsof ways, and DAO is the least forgiving mode.
If you encounter problems completing a burn, the most foolprooftactic is to compile a disc image. A disc image is a single filethat incorporates all the data content and the file system that will goon the disc. In the early days of CD mastering, burning from discimages was the rule, but today it is the exception. To prepare a discimage, you need to have a chunk of hard-disk space equal to the size ofall the data you want to put on disc.
Track-at-Once (TAO) is the most widely supported mode of CDrecording because of its versatility. Because the laser is turned offbetween tracks, the writing software can take the time to search forthe next chunk of data, prompt for a new CD, and so on.
The principle disadvantage of TAO mode is that there will always bean audible gap (generally about two seconds but variable with somerecorders) between tracks. If you plan to send a CD submaster out forreplication, be aware that not all replicators can properly interpret adisc submaster done with TAO. That is another reason to record audiomasters in Disc-at-Once mode.
In Multisession recording, data is added incrementally, letting youadd, replace, and delete files. Multisession recording makes itpossible to use the CD-R disc in a way that is similar (though notidentical) to the way you're accustomed to using floppy disks.
The trade-off is platform compatibility. Audio-CD players generallydo not know Multisession discs from Adam, so you can't use that mode tomake audio CDs. Many older CD-ROM drives also cannot interpret theMultisession structure. Multisession is most useful when the context isvertical — that is, you are reading back the disc on yourown drive and on other drives that you know for sure arecompatible.
In Multisession recording, each track of data is written in aseparate session, and the session is closed after recording bywriting a lead-out. That makes each session into a separate file systemthat can be recognized by a CD-ROM drive. The lead-out uses some space(about 22 MB for the first session and 13 for subsequent sessions), soyou can't get quite as much data on a Multisession disc.
If you were to record sessions in that manner, without doinganything to tie them together, a Multisession-compatible CD-ROM drivewould see the sessions as separate volumes. (A non-Multisession drivewill see only the first session). That is known as a multivolumedisc, and it has its uses.
More often, though, you will want to create discs that are seen as asingle large volume with read, write, and delete capability. That isdone by linking sessions together. The linking process creates adirectory structure that references files in all sessions on the disc.As you record additional sessions, replace or delete files, and soforth, the directory structure is re-created to reflect updates to thedisc. The Multisession-compatible CD-ROM drive has intelligence todirect it to use only the most recent version of the file system sothat previous versions are effectively disabled.
You can turn a disc into a Multisession disc after recording(assuming there's space), but that can introduce other compatibilityissues. Not all Multisession CD-ROM drives will recognize the discunless the first track is recorded in a specific format (CD-ROM XA).It's all just part of the fun and games of grafting new capabilitiesonto an established format.
Multisession mode is not very useful for audio. In theory, audiotracks can be recorded in Multisession mode, but most CD players willsee only the first track. Many CD-recording software packages supportrecording tracks incrementally using Track-at-Once recording. However,the disc is not readable for standard CD players and CD-ROM drivesuntil the disc is closed by writing the lead-out area.
Track-at-Once, Disc-at-Once, and Multisession are basically threeways to slice the same orange. Packet Writing, though, is afundamentally unique approach to the medium. In Packet Writing, data isactually written in little pieces rather than in the large chunks knownas Tracks or Sessions. Packet Writing must be supported at the hardwareand firmware level, and it absolutely will not work on recorders anddrives that predate the technology. Packet Writing brings CD recordingthat much closer to the grail of behaving like a big floppy disk.
With Packet Writing, there are two types of data chunks, orpackets. Fixed-length packets are tailored for CD-RW, allowingdata to be randomly erased and rewritten without the need to keep trackof a potentially huge and changing map of different-length packets. Thedownside is that fixed-length packets entail a substantial overhead,which cuts the disc capacity down to something in the range of 500MB.
Variable-length packets are optimal for CD-R recordingbecause the mapping remains fixed once the files are written. WithMultisession CD-R, you can delete files from the disc, but the data isnot actually deleted. Instead, the file system that points to the filesis updated so that the deleted file becomes invisible to the user. Themapping of packets is not affected. With variable-length packets, morespace on the disc is available.
COLOR MY WORLD
Various types of CD-R and CD-RW blank discs do have differences, andsome recorders may work better with one type than another. In somecases, the firmware of a drive may even limit it to working withcertain types of media. However, that is a matter of the match of mediaand drive rather than a general superiority of one type to another.
These days the process of manufacturing blank discs is refined, andit's unlikely that a manufacturer will ship inferior-grade discs to thestores. In fact, recorded CD-R and CD-RW discs on the whole exhibitsubstantially lower error rates than pressed discs. No matter whatmedium you use, the disc you record is of better of quality than anycommercial CD-ROM or audio title you can buy at the store.
If you have purchased different brands of CD-R and CD-RW blanks,you've probably noticed that the business side of the discs comes inseveral colors. Those distinctions in color result from the combinationof the dye formulation and the type of reflective layer. Reflectivelayers are either gold or silver. For the dye layer, four formula typesare used: phthalocyanine, so-called advance phthalocyanine,cyanine, and metal azo.
Cyanine-based media are usually bright green. The dye itself isblue, but it is usually paired with a gold reflective layer that showsthrough the translucent dye. Phthalocyanine (say that three timesfast!) is a pale green color that results from pairing a yellow-greendye with a gold backing layer. Advance phthalocyanine has an aqua hue.Metal-azo dye is deep blue in color. With a silver backing layer, thedeep blue color is preserved, but if gold is used, the disc appears asgreen. Gold or silver backing can be used with metal-azo dye.
Do those colors matter? Yes and no. Phthalocyanine and advancephthalocyanine are known to be less sensitive to ordinary light thanthe others. If you are going to leave your discs out in the sunlight,they may hold up better. Does that make phthalocyanine better? Not forpractical purposes: you shouldn't leave your discs out in sunlight orany kind of light. Store all CD-Rs in a case, away from light, and theywill be good for 30 years at least. Sensitivity to ordinary lightshould not be an issue.
Other differences in media affect what happens when a disc is beingwritten. With the drive controllers and software used today, however,those dissimilarities are generally unimportant. Current drives useactive control and feedback from the media itself to optimize the writestrategy for the disc in the drive. You should get good, consistentresults with any media.
If you use an older drive, you can take advantage of others'experience. Cyanine and phthalocyanine have been around the longest andare compatible with the largest range of legacy hardware. Of the two,cyanine has a broader range of writing power and may work in moredrives than phthalocyanine.
As exciting as DVD is — and it is very exciting, indeed— the CD formats are still likely to be around for quite a while.Admittedly, sundry CD specifications have developed in peculiar waysbecause so much has been grafted onto what started out as astraightforward music-delivery platform. But CD-ROM, CD-Audio, CD-R,and CD-RW are proven, practical, and perhaps most important,ubiquitous. CD is as close as it's come to a universal digital deliverymedium, with support for audio, data files, video, text, andgraphics.
Now that you know how CD-R works, you should be well equipped todecide which CD format and mode to use for each application, and toknow what problems are likely to arise, how to avoid them, and why thisalready venerable medium works the way it does. In short, you are readyto satisfy your burning ambitions!
Gary S. Halllives and works in Alameda, California. He'sworking on a surround techno-tribal album, to be released on DVD-Audio,with collaborators in Brazil, Switzerland, and upstate New York.Special thanks to Royal Scanlon of replication firm RSRT (www.rsrt.com) forhelping acquire graphics.
HOW CD-RS ARE MADE
Knowing something about how CD-Rs are made can be enlightening. Theprocess is nearly the same as that of manufacturing replicated CDs. Infact, in many plants, manufacturing lines are switched back and forthaccording to demand. Replicators can make higher margins fromreplicating audio or CD-ROM titles, but the demands for CD-R areconstant. From the manufacturer's point of view, it's a great way tokeep those lines running. The main differences between the commercialCD and CD-R manufacturing processes are the inclusion of a dye, adistinct type of reflective metal, and the physical content of theglass master.
For CD-ROM, CD-Audio, or CD-R, the first step in the process is thecreation of a glass master, using a Laser Beam Recorder (LBR). The LBRis by far the most expensive item in the process. The glass masterconsists of an extremely flat piece of glass that is coated with aphotoresistive chemical. The glass itself is reused many times and iscoated anew each time a new master is created.
When replicating CD-Audio and CD-ROM, the LBR creates pits and landsin the photoresistive layer by varying the intensity as the laser beamsweeps around the disc in a tightly controlled spiral. For CD-R, theLBR simply creates a continuous spiral instead. That spiral is“wobbled” with slight sinusoidal modulation that allows therecorder to synchronize with the disc even before the disc is recorded.In replicated discs, the placement of pits and lands serves thatpurpose, but for CD-R they don't exist until the disc is being written.Pregrooving is one key technology that allowed CD-R to exist and takeover the world.
After exposure in the LBR, the coated master is washed in a solutionthat dissolves the photoresist wherever it has been exposed to thelaser's strong beam (see Fig. A). That is the first point atwhich the smooth coating of the glass master becomes a physicalrepresentation of the disc to be manufactured.
The glass master is then tested, after which it is coated with anextremely fine layer of silver. The layer renders the disc electricallyconductive. The next step in the process, called electroforming, turnsthe conductive glass master into a big electrode that is immersed in anickel sulphamate solution. The charge on the coated master isincreased gradually until the whole disc is covered with a heavy buteven coating of pure nickel metal.
The metal image that results is called a father; it can be useddirectly to make discs. But only a certain number of discs can be madefrom a metal mold (called a stamper) before it wears out. If theoriginal father mold is used, it wears out, and you have to go back tothe glass master or to expensive LBR m