Chapter 4. Digital Audio Formats

Recorded music has appeared in a variety of shapes and sizes over the decades, including frail discs spinning at 78 rpm, vinyl records in colorful sleeves that were artworks in themselves, pocket-size cassette tapes, and futuristic-looking meaty discs. But no music format e'er exploded into the public consciousness as apace and widely as the bits of reckoner code known as MP3 files.

The MP3 format makes it possible to compress a song into a file small enough to exist uploaded, downloaded, emailed, and stored on a difficult drive. That feat of smallness fix off a sonic boom in the belatedly 1990s that continues to reverberate across the music world today.

This chapter tells all virtually MP3 and other music formats, including the main iPod–canonical format: AAC (Advanced Audio Coding), a copy-protected file blazon that makes Apple'southward iTunes Music Store possible.

Introduction to Digital Audio

The era of modern digital audio began in the early 1980s. A new, small, shiny format called the audio compact disc, developed past Sony and Philips, began to announced in music stores alongside albums on tapes and vinyl records. Dissimilar analog tapes and LPs, audio CDs stored music in digital form, and produced a bright, clean sound with pristine clarity. (Some audiophiles all the same adopt the "warmer" sound of vinyl, not to mention the expansive canvas that records provided for detailed album artwork, but many have accustomed the CD.)

1985 was a pivotal yr for the CD. The format's popularity got a huge boost from its first large seller, Brothers in Artillery past Dire Straits, and a variation on the audio CD technology called CD-ROM (Meaty Disc, Read-Only Memory) edged into the computer market as a way to play multimedia files and interactive programs.

When CD Met PC

Over the years, a CD drive became a standard component of a reckoner. On most audio CDs, songs are stored in a format called CD-DA (Compact Disc, Digital Audio), which is substantially the aforementioned thing as AIFF format.

On a Windows PC, if y'all inspect the contents of a music CD, you come across a screenful of names like "Track01.cda." These plough out to be nil but 1 KB files that signal to the hidden sound tracks, as shown in Figure iv-one. Mac OS 10 displays the audio tracks in all their hefty glory equally AIFF files, correct in the Finder window.

Left: Here's what a desktop window looks like for a music CD inserted into a Mac. It looks just like an MP3 playlist, except that these AIFF files are much larger. Your computer can play these high-quality files, but they eat up a lot of hard drive space. Right: Audio files are more bashful when a disc is inserted into a Windows drive. The tracks on this Prince CD remain hidden behind tiny pointer files, and you can lure them out only with CD-extraction software.

Figure 4-one. Left: Here's what a desktop window looks like for a music CD inserted into a Mac. Information technology looks merely like an MP3 playlist, except that these AIFF files are much larger. Your computer can play these high-quality files, but they eat up a lot of difficult drive space. Right: Sound files are more inconversable when a disc is inserted into a Windows drive. The tracks on this Prince CD remain hidden behind tiny pointer files, and you can lure them out merely with CD-extraction software.

Even if you tin can't see the audio files, y'all can still excerpt them from the CD with software. "Extracting sound tracks" may sound similar an uncomfortable medical procedure, but it means copying them from the CD to your hard bulldoze in a reckoner-readable format. Yous may too hear the term ripping CDs, which is the aforementioned thing.

And while you're digesting new-millennium terminology: once the music files are on your Mac or PC, you encode them into a compressed audio format like MP3 or AAC so that more music fits on a CD that you burn—or on a music player like the iPod.

Compressed Audio Formats

Upward until a few years ago, the MP3 format was the only game in town for playing quality song files on your computer, whether downloaded from the Internet or taken from CDs. MP3 nevertheless dominates the Internet, just other formats—like Ogg Vorbis (an audio format favored past Linux fans and the open source software oversupply; details at http://www.vorbis.com)—have dedicated fans, too.

Ogg Vorbis isn't on the list of iPod–compatible formats, only many others are, including MP3, AAC, AIFF, Apple Lossless, and WAV. Hither's some explanation of each Podworthy format.

MP3

Suppose you copy a song from a Sheryl Crow CD directly onto your computer, where it takes upward 47.3 MB of hard disk space. (This sort of audio extraction is quick on a Mac, somewhat harder in Windows; run into page 84.) Sure, you could now play that song without the CD in your CD bulldoze, but y'all'd likewise exist out 47.three megs of precious hard drive real estate (see Figure 4-1).

Now, say y'all put that Sheryl Crow CD in your estimator and employ your favorite encoding program to convert that song to an MP3 file. The resulting MP3 file still sounds really good, but only takes up about 4.8 MB of space on your difficult drive— about 10 percent of the original. Ameliorate yet, yous tin fire a lot of MP3 files onto a blank CD of your own—upward to 11 hours of music on one disc, which is enough to get you from Philadelphia to Columbus on Interstate 70 with tunes to spare.

How It Works

MP3 files are then small because the pinch algorithms apply perceptual noise shaping, a method that mimics the ability of the human ear to hear certain sounds. Just as people tin't hear dog whistles, most recorded music contains frequencies that are too high for humans to hear; MP3 pinch discards these sounds. Sounds that are blotted out past louder sounds are also cast aside. All of this space-saving past the compression format helps to make a smaller file without overly diminishing the overall audio quality of the music.

New portable MP3 player models come out all the time, but many people consider the iPod'south arrival in 2001 to exist a defining moment in the history of MP3 hardware.

Tip

MP3 is brusk for MPEG Sound, Layer 3. MPEG stands for Moving Pictures Experts Group, the association of engineers that too defined the specifications for the DVD video format, amid others.

AAC

The Advanced Audio Coding format may be relatively new (it became official in 1997), but it has a fine pedigree. Scientists at Dolby, Sony, Nokia, AT&T, and those busy folks at Fraunhofer collaborated to come up with a method of squeezing multimedia files of the highest possible quality into the smallest possible infinite—at least pocket-sized plenty to fit through a modem line. During listening tests, many people couldn't distinguish betwixt a compressed high-quality AAC file and an original recording.

What's so great nearly AAC on the iPod? For starters, the format can do the Big Sound/Small File Size trick even better than MP3. Considering of its tighter compression technique, a song encoded in the AAC format sounds improve (to most ears, anyway) and takes up less space on the computer than if it were encoded with the same quality settings as an MP3 file. Encoding your files in the AAC format is how Apple says you can stuff 10,000 songs onto a twoscore GB iPod.

The AAC format can also be copy protected (dissimilar MP3), which is why Apple uses it on the iTunes Music Store (run across Chapter 7). (The tape companies would never take permitted Apple to distribute their property without re-create protection.)

Notation

Y'all tin think of AAC as the Apple equivalent of WMA, the copy-protected Microsoft format used by all online music stores except Apple's. For better or worse, the iPod doesn't recognize re-create-protected WMA files.

Real Networks, with its own online music store, released a program called Harmony in the summer of 2004 that can convert its WMA wares to an iPod–uniform format and tin fifty-fifty wrestle the files onto an iPod without iTunes. Apple tree released an update for the iPod Photograph in late 2004 that disabled this, however, and other members of the iPod family may one time once more be Existent-unfriendly past the time you read this. Apple, of course, would prefer that you lot do your 99¢-a-vocal downloading from its iTunes Music Store merely (Chapter seven).

Because the iPod can play several unlike sound formats, yous can take a mix of MP3 and AAC files on the device if y'all want to encode your futurity CD purchases with the newer format. If you desire to read more technical specifications on AAC before deciding, Apple has a folio on the format at http://www.apple.com/mpeg4/aac.

Note

AAC is the sound component of MPEG-four, a new video format that's designed to become loftier-quality video compressed enough to travel over figurer networks (even pokey former modem lines) and still look skillful onscreen.

Become iPod and iTunes: The Missing Transmission, Third Edition now with O'Reilly online learning.

O'Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.