BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?


MP3: The Definitive Guide
MP3: The Definitive Guide By Scot Hacker
March 2000
Pages: 400

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: The Nuts and Bolts of MP3
In April of 1999, the term "MP3" surpassed "sex" as the most-searched-on term at some of the Internet's top search engines—a phenomenal achievement for a complicated digital music encoding algorithm devised over the course of a decade by a few scientists and audiophiles in an obscure German laboratory.
What is it about MP3 that inspires such unprecedented levels of enthusiasm? For some, it's the prospect of being able to store vast quantities of music on a computer's hard drive, and to shuffle and rearrange tracks from that collection around at a moment's notice. For others, it's the promise of an entirely new model for the music universe—one that allows creative artists to publish their own work without the assistance of the established industry. But for millions of users, the thrill of MP3 is more simple than that: it's the possibility of getting their hands on piles of high-quality music, free of charge.
In this chapter, we'll get a bird's-eye view of the format and the MP3 phenomenon: what it is, how it works, how to download and create MP3 files, and how to listen to them. Then we'll take a look at some of the many issues surrounding MP3, including piracy, politics, digital rights, and the recording industry's stance on the matter. Finally, we'll examine the correlation between the MP3 and open source software movements, and find out why file-based digital music distribution is here to stay.
If you're new to the MP3 game, you'll want to know exactly what MP3 files are, where to get them, how they work, and how to make the most of a growing MP3 collection. As you read through this brief overview, keep in mind that these topics are covered in much greater detail elsewhere in this book.
Simply put, MP3 is an audio compression technique. Raw audio files—such as those extracted from an audio CD—are very large, consuming around 10 MB of storage space per minute. But MP3 files representing the same audio material may consume only 1 MB of space per minute while still retaining an acceptable level of quality. By drastically reducing the size of digital audio files, it has become feasible for music lovers to transfer songs over the Internet, for users to build enormous digital music collections on their hard drives, to play them back in any order at any time, and to move them around between different types of playback hardware. These possibilities have far-reaching ramifications not just for music lovers, but for artists and the recording industry as well. We'll explore the politics and philosophical issues raised by MP3 in the second part of this chapter.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
MP3 Basics
If you're new to the MP3 game, you'll want to know exactly what MP3 files are, where to get them, how they work, and how to make the most of a growing MP3 collection. As you read through this brief overview, keep in mind that these topics are covered in much greater detail elsewhere in this book.
Simply put, MP3 is an audio compression technique. Raw audio files—such as those extracted from an audio CD—are very large, consuming around 10 MB of storage space per minute. But MP3 files representing the same audio material may consume only 1 MB of space per minute while still retaining an acceptable level of quality. By drastically reducing the size of digital audio files, it has become feasible for music lovers to transfer songs over the Internet, for users to build enormous digital music collections on their hard drives, to play them back in any order at any time, and to move them around between different types of playback hardware. These possibilities have far-reaching ramifications not just for music lovers, but for artists and the recording industry as well. We'll explore the politics and philosophical issues raised by MP3 in the second part of this chapter.

Section 1.1.1.1: Why the term "MP3?"

"MP3" is the quick way of referring to an encoding algorithm called "MPEG-1, Layer III," developed primarily by a German technology group called Fraunhofer and Thomson and now officially codified by the International Standards Organization, or ISO. The name, of course, corresponds to the extension found on MP3 files: After_the_Goldrush.mp3, for example. More on Fraunhofer and Co. can be found in Section 1.1.3 later in this chapter.

Section 1.1.1.2: Small is beautiful: How MP3 works

Raw audio does not compress well via traditional techniques: if you try to zip up a WAV file, for instance, you'll find that the resulting archive is only marginally smaller than the uncompressed original.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Rights, Piracy, and Politics
The flexibility and portability of MP3 has left the recording industry wondering where to turn, unsigned musicians newly empowered, signed artists with mixed reactions, and fans making out like bandits. The debate centers on a quest for the right balance between exploiting the promotional power of this new medium and protecting the intellectual copyright of artists and labels.
In July of 1999, the International Federation of Phonographic Industries (IFPI) estimated that around three million tracks were downloaded from the Internet every day, most of them without the permission of their copyright holders. The Recording Industry Association of America (RIAA) claims to have lost as much as $10 billion through music piracy in 1998. It's not just record company executives and artists who stand to lose; the digital music revolution has implications for everyone in the channel: record store owners, CD pressing plants, and even truck drivers. Of course, most signed artists resent having their intellectual property illegally distributed as well. Well-known artists ask the RIAA every day to clamp down on pirate sites hosting their music (although it's also the case that many signed artists are much more supportive of MP3 than are their labels). In the rest of this chapter, we'll take a look at some of the many difficult issues currently being faced by the industry and music lovers alike, and take a look at some of the techniques the industry is proposing to deal with the situation. The legal nitty-gritty of MP3 is discussed in more detail in Chapter 7.

Section 1.2.1.1: File-based digital audio changes the game

For nearly a century, the record industry has held the distribution of musical content in a hammerlock. If you wanted to own music, you had to do it on their terms, purchasing music distributed on the media they had officially blessed, and only through their approved channels. While the industry's stranglehold on music distribution slipped for the first time in the 1950s with the advent of reel-to-reel tape decks, and even more in the '70s with the popularization of the cassette tape, tape technologies had a major Achilles' heel: analog copies always lose a little quality as successive copies are made—a third-generation copy of a well-recorded LP doesn't sound so well-recorded anymore. In addition, the person making the copy is burdened with having to create a new physical instance for each person to whom she wants to distribute her tunes.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: How MP3 Works: Inside the Codec
So what's the trick? How does the MP3 format accomplish its radical feats of compression and decompression, while still managing to maintain an acceptable level of fidelity to the original source material? The process may seem like magic, but it isn't. The entire MP3 phenomenon is made possible by the confluence of several distinct but interrelated elements: A few simple insights into the nature of human psychoacoustics, a whole lot of number crunching, and conformance to a tightly specified format for encoding and decoding audio into compact bitstreams. In this chapter, we'll take a look at these elements in detail in order to understand exactly what's going on behind the scenes of MP3 encoding and decoding software, as well as some of the chicanery that takes place between your ears.
Note that this chapter goes fairly deeply behind the scenes of MP3, and is somewhat technical in nature. You can skip this chapter if you're not interested in learning how MP3 works. If you just want to get started creating and playing MP3 audio, you can skip ahead to Chapter 3, Chapter 4, and Chapter 5.
Well-encoded MP3 files can sound pretty darn good, considering how small they are. As mentioned in Chapter 1, your typical MP3 file is around one-tenth the size of the corresponding uncompressed audio source. How is this accomplished? That's a somewhat complex topic, so we've devoted this entire chapter to explaining the process.
Uncompressed audio, such as that found on CDs, stores more data than your brain can actually process. For example, if two notes are very similar and very close together, your brain may perceive only one of them. If two sounds are very different but one is much louder than the other, your brain may never perceive the quieter signal. And of course your ears are more sensitive to some frequencies than others. The study of these auditory phenomena is called psychoacoustics, and quite a lot is known about the process; so much so that it can be quite accurately described in tables and charts, and in mathematical models representing human hearing patterns.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
A "Perceptual" Codec
Well-encoded MP3 files can sound pretty darn good, considering how small they are. As mentioned in Chapter 1, your typical MP3 file is around one-tenth the size of the corresponding uncompressed audio source. How is this accomplished? That's a somewhat complex topic, so we've devoted this entire chapter to explaining the process.
Uncompressed audio, such as that found on CDs, stores more data than your brain can actually process. For example, if two notes are very similar and very close together, your brain may perceive only one of them. If two sounds are very different but one is much louder than the other, your brain may never perceive the quieter signal. And of course your ears are more sensitive to some frequencies than others. The study of these auditory phenomena is called psychoacoustics, and quite a lot is known about the process; so much so that it can be quite accurately described in tables and charts, and in mathematical models representing human hearing patterns.
MP3 encoding tools (see Chapter 5, for examples and usage details) analyze incoming source signal, break it down into mathematical patterns, and compare these patterns to psychoacoustic models stored in the encoder itself. The encoder can then discard most of the data that doesn't match the stored models, keeping that which does. The person doing the encoding can specify how many bits should be allotted to storing each second of music, which in effect sets a "tolerance" level—the lower the data storage allotment, the more data will be discarded, and the worse the resulting music will sound. The process is actually quite a bit more complex than that, and we'll go into more detail later on. This kind of compression is called lossy, because data is lost in the process. However, a second compression run is also made, which shrinks the remaining data even more via more traditional means (similar to the familiar "zip" compression process).
MP3 files are composed of a series of very short
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
The Anatomy of an MP3 File
Aside from being familiar with the basic options available to the MP3 encoder, the typical user doesn't need to know how MP3 files are structured internally any more than she needs to know how JPEG images or Word documents are structured behind the scenes. For the morbidly curious, however, here's an x-ray view of the MP3 file format.
As mentioned earlier, MP3 files are segmented into zillions of frames, each containing a fraction of a second's worth of audio data, ready to be reconstructed by the decoder. Inserted at the beginning of every data frame is a "header frame," which stores 32 bits of meta-data related to the coming data frame (Figure 2.4). As illustrated in Figure 2.5, the MP3 header begins with a "sync" block, consisting of 11 bits. The sync block allows players to search for and "lock onto" the first available occurrence of a valid frame, which is useful in MP3 broadcasting, for moving around quickly from one part of a track to another, and for skipping ID3 or other data that may be living at the start of the file. However, note that it's not enough for a player to simply find the sync block in any binary file and assume that it's a valid MP3 file, since the same pattern of 11 bits could theoretically be found in any random binary file. Thus, it's also necessary for the decoder to check for the validity of other header data as well, or for multiple valid frames in a row. Table 2.1 lists the total 32 bits of header data that are spread over 13 header positions.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 3: Getting and Playing MP3 Files
At bottom, playing MP3 files is no more difficult than opening any file in any application. In fact, it's usually little more than a simple matter of drag and drop. There are, however, literally hundreds of different MP3 players out there, all of them with specific differences, features, and quirks. There are also a few considerations to keep in mind when building an MP3-optimized computer/sound system, and of course there's the question of how to get MP3 files to begin with, not to mention how to organize them once you've got them. In this chapter, we'll get an overview of the best/most popular MP3 players available for Windows, Mac OS, Linux, and BeOS, and discuss some of their more important options and features. We'll save the more advanced functions and features for Chapter 4.
Of course, before you hear the first note, you'll have to get your hands on a starter MP3 file or two. You'll find a basic introduction to MP3 download concepts in Chapter 1, and we'll treat the subject in much more detail in Section 3.3, later in this chapter.
At this writing, there are several hundred different MP3 players out there, with new ones appearing practically on a weekly basis. While the lion's share of players exist only for the Microsoft Windows platform, there are great players for Mac OS, Unix/Linux, and BeOS as well (of course there are players for just about every audio-capable operating system in existence, but we cover just these four platforms in this book). MP3 players vary radically from one to the next. Some are more efficient than others, some have groovy psychedelic interfaces, some work only from the command line, some can be extended to do things their authors never dreamed of by way of plug-ins, and so on. You have some choices to make.
While this book gives URLs for most of the tools covered, you'll find plenty more by surfing around the "players," "encoders," or "software" sections of sites such as
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Choosing and Using an MP3 Player
At this writing, there are several hundred different MP3 players out there, with new ones appearing practically on a weekly basis. While the lion's share of players exist only for the Microsoft Windows platform, there are great players for Mac OS, Unix/Linux, and BeOS as well (of course there are players for just about every audio-capable operating system in existence, but we cover just these four platforms in this book). MP3 players vary radically from one to the next. Some are more efficient than others, some have groovy psychedelic interfaces, some work only from the command line, some can be extended to do things their authors never dreamed of by way of plug-ins, and so on. You have some choices to make.
While this book gives URLs for most of the tools covered, you'll find plenty more by surfing around the "players," "encoders," or "software" sections of sites such as http://www.mp3.com, http://www.emusic.com, http://www.mp3now.com, http://www.mp3-tech.org, and hundreds of other dedicated MP3 web sites.
If you're serious about MP3, there's no reason to stick with the first decoder you download. Try out a bunch of them, run some careful listening and performance tests, and think about exactly what you want to do with MP3 before making your decision. Note that most MP3 decoders play many more audio file formats than just MP3, including WAV, AIFF, AAC, VQF, RealAudio, ASF/WMA, MOD, XM, IT, S3M, and many more. Many players are also equipped to play audio CDs, and most are easy to set up as your system's default sound player if you like. Fortunately, it's not going to cost you an arm and a leg to experiment with multiple MP3 players to find the one that suits your needs, as most of them are low-cost, and some of them are even free. Even the players that aren't free generally let you test them out in some form before making any commitments.
If you're the user of a Unix-based operating system other than Linux, keep in mind throughout this book that most POSIX command-line tools will compile properly on nearly any other POSIX-compliant platform, including the BSD family, Sun's Solaris, QNX, IRIX, and many others. GUI applications may or may not be cross-platform compatible. We don't mean to leave you out here—we're just attempting to address the widest possible audience.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Players by Platform
With the basics out of the way, we'll take a look at some of the more idiosyncratic or less intuitive features of the most popular players available for various operating systems. The players are listed by operating system, and alphabetically within each operating system section.
Needless to say, there are more applications written for Windows than for any platform on the planet, and that includes MP3 encoders and players. Search your favorite MP3 software archive and you'll find a bottomless pit of options. And because of the sheer critical mass behind Windows, its MP3 apps are also without question the most evolved and mature available.
Unfortunately, Windows users may also expect a few hitches along the way: Glitches in the sound stream, hung applications, and the dreaded blue screen of death are all part of the Windows experience that many of us have come to simultaneously respect and hate. In all fairness, these behaviors may be the exception and not the rule, and most Windows MP3 applications are very well behaved most of the time. If all you want to do is run one audio stream at a time and you have a relatively stable Windows installation, you don't have anything to worry about, and will likely enjoy trouble-free audio. However, you may also experience a perceptible impact on overall system responsiveness when working in other applications while MP3 players do their thing in the background, depending on your available horsepower and the configuration of your hardware. The primary reason for this behavior is that threading in Windows is rather coarse-grained, meaning that when multiple applications are trying to do work simultaneously, they take long turns with the processor in comparison to, say, Linux or BeOS.
You may also experience specific limitations in the architecture of Windows' audio subsystem. For example, MP3 players like WinAmp and Sonique allow you to specify "Allow multiple instances" in their preferences. Unless you have Microsoft's DirectSound installed, however, trying to open any two audio applications at once in Windows with a SoundBlaster card will result in a "Could not open audio device" message. In other words, Microsoft has added the capacity for handling multiple simultaneous audio streams to the system late in the game, and many millions of Windows users are not able to do this by default. For general-purpose MP3 playback, though, issues like this one are of little concern to the vast majority of users. Meanwhile, many Windows MP3 players are very efficient, with feature sets unmatched on any platform.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Obtaining MP3 Files
Before you begin building up your MP3 collection, it's important to understand the basic legal issues behind the distribution of what is the intellectual and creative property of artists and the recording industry. As with most technologies, MP3 has both legal and illegal applications. Despite the excitement surrounding the prospect of the public undercutting the traditional distribution mechanisms of the recording industry, and no matter how you might feel about the moral rectitude of the profit-mongering of these traditional music supply chains, the mere fact of an MP3 being available to you does not automatically make it legal to help yourself. It's easy to steal candy bars, and you may feel they're too high-priced, but that fact doesn't make it legal to steal. Keep these points in mind as you begin to build up your collection:
  • For the same reason that it's legal to make backup copies of software that you've purchased (so you still have access to it in case the physical media is damaged), it's perfectly legal to create and listen to MP3 copies of music that you've purchased. It is not, however, legal to make these copies available to other people via the Internet, through portable devices, or on any other storage media. You bought the rights to own a copy of that music—you didn't buy the rights for the rest of the world to own a copy as well.
  • Many artists and record companies make their music available for download from the Internet (either for free or for a small fee) as a way to promote themselves. There are many sites that legitimately distribute hundreds or thousands of these tracks, and it's perfectly legal to download and listen to them. At the same time, hundreds of thousands of ordinary Joes make their MP3 collections available over the Internet for other people to download. It is illegal for them to do this, and it's illegal for you to download and come into possession of these tracks. If you're in doubt about whether music you're about to download is being legally distributed or not, poke around on the site in question looking for the fine print. If the site is distributing legal music, it will say so, or will be clearly endorsed by the artist or the label. Sites distributing music illegally will generally say nothing, or may even be brazen about their illegality.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Organizing Your Collection
Before your collection starts to grow, it's worth giving a bit of thought to establishing file naming conventions and an organizational system. While you can always use Explorer/Finder/Tracker to organize your collection later, you may find it useful to think a bit about filenames and directory structures a bit before you start downloading and encoding, as a number of variables enter the process. You'll be happier later on.
When encoding your own files, you should have total control over the way your files are named, although many players do impose some limitations in this department, such as disallowing spaces in filenames even for those who choose to use them. Dig around in the options and you should be able to find controls for choosing among many possible formats (more on that in Chapter 5). If you're downloading files from the Internet, however, it's a different story—files arrive with whatever naming convention was used by the person or organization who posted the file to begin with. Many files you'll find out there are simply named after the song, e.g., "Blue_Jay_Way.mp3". Would it make more sense to name a file with the artist's name as well, e.g., "Beatles-Blue_Jay_Way.mp3"? That depends on how anal you are. First off, keep in mind that the name of the artist is usually—but not always—stored in the file itself, in the form of its ID3 tags. Thus, even when the artist's name isn't in the filename, it will appear in the MP3 decoder's player's interface as the file is being played. However, there are files floating around out there with no information whatsoever stored in ID3 tags (Figure 3.18), so if you don't give your files a meaningful name when you download them, you may never discover the actual artist or track name.
Figure 3.18: The artist's name and song title is embedded in the file itself, eliminating the need for their mention in the filename
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Equipment Considerations
This book assumes that you already have basic audio working on your machine, but since you may be about to start listening to real music through your computer on a regular basis, you may want to invest a little time and/or money into making sure you're getting the highest quality possible from your system.
Most computers sold today ship with sound cards preinstalled and configured, but the cards in many discount and mid-range machines leave something to be desired from an audiophile perspective. Because the sound card is a fundamental bridge between what goes on in software and what ends up in your ears, it pays to make sure you've got a good one—overall quality can be drastically affected by the quality of your audio device.
While any recommendations on specific cards would quickly go out of date, keep in mind that better sound cards will also include digital signal processing chips (DSPs), which can take some of the computing load off your machine's CPU. Good DSPs can go a long way toward minimizing the performance impact of MP3 playback, particularly if you've got a slower machine. If you intend to do any serious recording and/or mixing, look for a "full-duplex" card, which is capable of handling incoming and outgoing audio streams simultaneously. If you want to interface your card with external devices such as high-end digital-to-audio Converters (DACs) or home theater systems, look for a card with digital output jacks as well as the standard analog outputs.
When hooking up your speakers, most sound cards offer two analog outputs: one that is pre-amplified and is suitable for connecting directly to a set of unpowered computer speakers or headphones, and another that is unamplified, and is thus suitable for being connected to an external amplifier, such as a powered satellite/subwoofer system or your home stereo. This latter jack, labeled simply "Line," may offer a cleaner signal due to the fact that it hasn't been run through the sound card's (usually) suboptimal amplifier. If you're playing MP3 through a high-quality system, use the Line jack for output: the difference in quality could be noticeable.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 4: Playlists, Tags, and Skins: MP3 Options
The stock $35 SoundBlaster-compatible card, driving a pair of $25 plastic desktop speakers, has become a de facto standard throughout the '90s. But as computing power increases in accordance with Moore's law, media production and playback functionality takes a more central role in the consumer computer. With the advent of audio cards like the SoundBlaster Live! and the increasing popularity of satellite/subwoofer systems and computer-to-stereo connections, quality file-based audio becomes a realistic possibility for millions of users. MP3's natural home may be the wildlands of the Internet, but its reach is quickly being extended into other domains as well. As homes embrace the "convergence" model, computers, stereos, and televisions are blending together into all-in-one, networked infotainment centers, and stereo component manufacturers are introducing hardware-based MP3 players. Sales of portable units such as the Diamond Rio and Creative NOMAD are skyrocketing, and more and more cars are being fitted with MP3 playback units as well. As a result of all this, it becomes more important than ever to think beyond the simple task of encoding and playing MP3 files. Increasingly, people need to move large amounts of data between their computers and their playback devices, optimize the quality of their MP3 collections, maintain a well-organized filing system or MP3 database, make sure all of their files are tagged with useful meta-data for future reference, parse meaningful playlists out of collections extending into the gigabytes, and extend the reach of their MP3 players to handle unusual situations.
Once you've mastered the basics, you'll want to expand your horizons a bit and start checking out the many advanced capabilities, cosmetics, playlist generation techniques, ID3 tagging tools, plug-ins, and other toys available. There's a lot out there, and we'll only have space to touch on a handful of examples of useful "peripheral" software here. Do some searching through your favorite MP3 site or software library and you'll find hundreds of tools not discussed in this book.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
MP3 Options and Considerations
Once you've mastered the basics, you'll want to expand your horizons a bit and start checking out the many advanced capabilities, cosmetics, playlist generation techniques, ID3 tagging tools, plug-ins, and other toys available. There's a lot out there, and we'll only have space to touch on a handful of examples of useful "peripheral" software here. Do some searching through your favorite MP3 site or software library and you'll find hundreds of tools not discussed in this book.
Before we get to the goodies, however, we'll discuss some of the issues affecting the quality of MPEG audio. Because the compression format discards some data, MP3 already stands on shaky ground from a fidelity standpoint. That's not to say the quality of MP3 stinks, as some critics claim—but there are some things you can do to optimize the quality of your MP3s during encoding and during playback.
On the lighter side of things, MP3 players can often be dressed up in "skins"—small collections of bitmap images that sit on top of your player to give it a customized appearance. You can download skins from the Internet or create your own, although the process is admittedly a bit tricky. Don't worry—we'll show you how to create your own skins from start to finish.
Two of the most important "peripheral" technologies you'll meet in this chapter are ID3 tags and playlists. We discussed ID3 tags in a technical vein in Chapter 2; they're the extra space in MP3 files that let you store "meta data" about a file, including the artist, album, and track names, as well as genre, year, and personal comments. An up-and-coming modification of the ID3 specification, called ID3v2, is much more powerful, and lets you store a nearly unlimited amount of additional information (up to 256 MB). We'll check out the many ways in which ID3 tags can be created or edited, either directly through your MP3 player or via separate software.
One of the most enjoyable aspects of building a large MP3 collection, and one of the things that makes it so different from building a tape or CD collection, is the fact that you can mix and match songs into a customized sequence at a moment's notice. These personalized "albums" are called playlists, and consist of simple text files referencing the locations of tracks scattered across your system. Playlists can be created by dragging tracks one at a time into an MP3 player's playlist editor, by dragging entire directory structures onto your MP3 player, by trawling your disk with scripts, by running command-line queries, or by scanning through your collection with a database-like solution like Helium.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Equalization and Sound Quality
While true audiophiles may never accept lossy compression formats as a home standard just for the convenience factor, most of us do place a very high priority on the many conveniences offered by the MP3 format. So we're left with a question: How do we make sure we're getting the most from our MP3 collections?
Before even thinking about evaluating standards of quality, it's critical to understand that "this way lies madness." Audiophiles have wrestled for decades to achieve "objective" measurements that would fairly represent the quality of a recording. And while there are many objective measurements that can be made for any given signal, it's important to understand that the mathematics of audio measurement and the subjective experience of quality are two different animals. Furthermore, the mechanics of lossy compression (discussed in Chapter 2) more or less nullify the validity of just about any objective criteria. In other words, the only tests that matter for MP3 audio are subjective tests, i.e., real-world listening tests. Your ears don't lie. Even so, it's possible that the file you encode to your own standards today could end up being played on much better equipment tomorrow, so it pays to shoot for quality a little above your own thresholds.
The most important thing to keep in mind when testing for MP3 quality is that your computer probably isn't the best place to do it. How's that? Unless you've invested a fair sum in high-end computer audio equipment, chances are that your home stereo sounds a lot better than your computer. And if you're planning to keep your MP3 collection around for a long time, your home stereo may very well be the ultimate destination for your MP3 files. Because your sound card and computer speakers may mask a whole lot of subtlety, it's important to eliminate those components from the testing chain so that you can tell which limitations are introduced by your hardware and which are introduced by the MP3 encoding itself. In other words, you want to isolate the encoding as much as possible and give it an optimum environment in which to be tested.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
ID3 Tags and Playlists: The Virtual Database
ID3 tags and playlists are two of the most important extended topics for people who take their MP3 collections seriously. Taken separately, both technologies are important in their own right, but taken together, these two functions can complement one another in very powerful ways, giving you the means to sort, store, organize, name, and build highly customized virtual collections. Because these two technologies are so synergistic, and because many tools exist to help you organize both of them simultaneously, we'll treat both of them together in this section.
Every MP3 file has the ability to store "meta-data" related to the track in the file itself, in the form of what are known as "ID3 tags." For example, a file's ID3 tags may store the song's artist, album, year, genre, and comments in ID3 tags. Many MP3 players have the ability to read ID3 data out of your files, and to display this information in the MP3 playback interface. Thus, giving your MP3 files descriptive names isn't the only—or even necessarily the best—way to identify the tracks in your collection.
Conveniently, ID3 tag information can either be included in the file at the time it's encoded or added in later. Most of the better encoders will provide a number of options to let you control whether and how ID3 tag data should be written to the file. While some MP3 players include the ability to edit, as well as to display ID3 tag information, you may want to download and install additional utilities that specialize in ID3 manipulation, for maximum control. We'll look at some examples of ID3 tag editors later on.

Section 4.3.1.1: ID3v1 vs. ID3v2

It's important to understand that there are two basic flavors of the ID3 specification, conveniently named ID3v1 and ID3v2. Of the two, ID3v2 is vastly superior, for three reasons:
  • Unlike ID3v1, ID3v2 imposes no arbitrary limitations on the amount of storage space available for meta-data, which means there's plenty of space for storing images, complete lyrics, performance notes, equalization presets, et cetera.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Skins: Dressing Up MP3 Players
As shown throughout this book, WinAmp and other MP3 players can be "costumed" with alternate interfaces called "skins." Because skins are merely collections of bitmap images with pre-specified names and sizes, skins are not tied specifically to WinAmp, or even to Windows. While WinAmp is by far the most common place to find WinAmp skins in use, you'll also find MP3 players for Mac OS, BeOS and Linux that wear WinAmp skins. In addition, there other MP3 players out there with even more radical interfaces (such as Sonique and K-Jöfol) that also wear skins. Note, however, that these players don't wear WinAmp skins; see their sites for availability of skins for those players.
There are a number of large skin repositories on the Internet. The definitive collection is on WinAmp's own site, at http://www.winamp.com/skins/. There you'll find nearly 3,000 downloadable skins made by WinAmp users like yourself, categorized into groups like "Computer," "Game," "Stereo," "Anime," and even "Ugly" (and believe me, some of them deserve their place in that category). You'll probably find the highest quality skins in the "Best Skins" category, a group that has been selected by WinAmp employees for their finesse and professional look. There are (at this writing) three other notable skins sites out there: http://www.1001winampskins.com is a site run by WinAmp fans for other fans (not connected to NullSoft), while http://www.skinz.org and http://www.customize.org offer skins for dozens of products, not just WinAmp (though their WinAmp skins collection is smaller than that of the other two sites).
Each skin collection arrives as a single zip file, and becomes accessible to WinAmp simply by living in the skins directory specified in the WinAmp preferences (which by default is in C:\PROGRAM FILES\WINAMP\SKINS). If you have an older version of WinAmp, you'll need to unzip each collection into a subdirectory of the skins directory. For example, a skin archive called "Evo" might need to be decompressed in
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Plug-ins: Extending Your Reach
Just as the capabilities of programs like Adobe Photoshop or Netscape Navigator can be extended through the addition of third-party extensions called "plug-ins," so can many MP3 players. The beauty of the plug-in model is that the developers of the MP3 application get to have their product's capabilities extended indefinitely by the contributions of the larger developer community, and a cottage industry can be established for plug-in programmers. As a user, you'll find that your MP3 player may actually be far more capable than it originally appeared, thanks to these additions. While skins let you customize the look and feel of your MP3 player, plug-ins let you extend its actual functionality. Unlike skins, however, which are generic enough to work across multiple operating systems and players, plug-ins must be written specifically to work with each MP3 player. While you must have programming experience to write plug-ins, anyone can use them. Some are free, some are shareware, and some are available only by paying a fee up front.
Some MP3 players, like WinAmp, are built modularly, around the very concept of plug-ins. Because much of these programs' functionality is derived from the presence of certain crucial plug-ins, you should not delete the plug-ins that come with the WinAmp distribution. You may very well end up disabling your player's ability to export any sound at all.
There are a seemingly infinite variety of third-party plug-ins available, but they all fall into a few overarching categories:
Input plug-ins
Allow your player to play audio file formats that are not built into the player itself, or to accept signals from external devices such as keyboards or stereo components.
Output plug-ins
Allow your MP3 player to export signals to other audio file formats.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Listening to MP3 Streams
MP3 files don't have to be downloaded to your hard drive, necessarily. In many cases, you'll be able to play them back in your favorite MP3 player directly from the server on which they're located. As you'll discover in Chapter 8, there are several ways in which MP3 webmasters can dish up files for "streaming." As an end user, you won't need to worry much about the particular streaming technique in use, though it's interesting to know the difference. In some cases, you may have to tweak a few settings in your browser or player to make sure streamed files are handled by your operating system properly.
There are two primary ways in which MP3 files can be streamed to users without being downloaded: MP3-on-demand and MP3 broadcast.

Section 4.6.1.1: MP3-on-demand

In this form of streaming, control of the download is in the hands of the MP3 player, rather than the browser. Because this capability is built into most MP3 players, users can choose at any time to listen to an MP3 file directly from a web server, without saving it to their hard drives first. Of course, this assumes that the user has sufficient bandwidth to listen to the file in real time without it skipping or halting, but we'll get to bandwidth issues later. If you have a fast Internet connection, look around in your player's menus for an option labeled something like "Open Location" or "Play URL" and enter the URL of any MP3 file on the web. The easiest way to get this information is to right-click a link to an MP3 file in your browser and choose "Copy Link Location" from the context menu, then paste the URL into the Open Location dialog in your player.
In addition, MP3-on-demand can be forced by the webmaster, so that clicking a link normally will cause MP3 files to be pulled down by the player and played directly, rather than saved to hard drive as with a normal download. To do this, the webmaster creates an "M3U" (MPEG URL) playlist file, which is a plain text document containing the full URL to an MP3 file (or list of files) on a web server. Because the text file is tiny, the browser can download the M3U file to the user's hard drive nearly instantaneously. The web server sending the M3U file should (if it's configured correctly) dish it up with the MIME type
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Performance Considerations
The average consumer machine of today is much more efficient than it was a few years ago, and most people have gobs of underutilized computing horsepower to spare. Nevertheless, there are still plenty of older machines hanging around out there, and owners of those machines will want to make sure they've got the most efficient decoder available. And, of course, true geeks will want access to the most efficient decoder whether they need it or not. Here are a few techniques you can use to determine the efficiency of your MP3 player. The same techniques apply to MP3 encoders, by the way.
As mentioned in Chapter 2, MP3 decoders have a lot less work to do than encoders, since the task of MP3 playback is far less CPU-intensive than encoding. All the decoder has to know is how MP3 files are structured, and how to reconstruct a coherent signal from the combination of audio data and "side information" stored in the files' frames. In days of yore, when a Pentium 90 was considered top-of-the-line and most people were using 486-based computers, playing MP3 files was proportionally intensive enough to be cause for concern, and many experienced a significant impact on system responsiveness when MP3s were playing in the background.
However, modern CPUs have so much processor bandwidth to spare that decode speed isn't much of an issue for most users. For example, playing an MP3 stream on a Pentium 233 with the average decoder for Windows will generally consume only 5% of your processor speed.
If you're experiencing a noticeable performance impact when playing MP3 files, you might want to do a little benchmarking of your own. CPU/resource monitors are available for most operating systems, either as part of the system itself or as a separate download. A few of the more popular options are listed in this section. If you can't find a CPU monitoring app for your system that breaks up CPU usage by task (as opposed to giving you an overall rate), just note CPU consumption with and without your MP3 decoder running, then calculate the difference.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 5: Ripping and Encoding: Creating MP3 Files
Sure there's tons of free music available on the Internet. But are you able to find the music you're actually looking for? Chances are that the music you seek is out there somewhere, but servers go up and down every day, and you'll quickly discover that the MP3 search engines don't always deliver the goods. When you do find the track you're looking for, you may find that it's poorly encoded. Most of the time, you won't even know what bitrate has been used in the encoding until you've already got the file in question on your hard drive. And, of course, there's the fact that most MP3s available for download are pirated, which means many users end up depriving the artists they respect out of income to which they're entitled.
There's one meta-solution to all of this: Spend your energy on encoding your own CD/LP/DAT/8-track collection, rather than trying to download someone else's. If you don't redistribute the files you encode, you won't run afoul of legal hassles, you'll have complete control over quality issues, and you won't have to wait for lengthy downloads. Of course, if you're an artist, you'll also want to know how to create MP3s from your own original music.
Creating MP3 files is generally a two-step process: Extract your audio from the original source medium into an uncompressed format stored on your hard drive, then run that uncompressed audio through an MP3 encoder. However, many tools exist to help you rip and encode through a single interface, in a single pass. Before taking a look at the tools and processes, you may want to read these notes and suggestions on ripping and encoding principles.
As described in Chapter 2, MP3 is a "lossy" compression format, meaning that some audio information is discarded in exchange for smaller file sizes. The big question you have to face when encoding your own MP3 files is how much information do you want to discard. The more you throw away, the worse your files will sound and the smaller your MP3 files will be. The more you keep, the better they'll sound and the larger the resulting files will be. Only you can decide where on this spectrum you want to sit, but again, always remember that your computer may not be the only place where you play your MP3 files. Next year you may purchase an MP3 playback component for your home stereo, a better sound card, or better computer speakers. All of a sudden, you may discover that the MP3 files you once thought sounded just fine don't sound so hot after all. Always aim for a threshold higher than your current tolerances, and remember that disk space and blank CDs just keep on getting cheaper. Unless you'll be listening to MP3s in a noisy environment such as a car, or will be dealing with limited storage space (as you might with a portable MP3 player), you can probably afford the larger file sizes incurred by going with a higher bitrate. I recommend setting 128 kbps or approximately 50% VBR (VBR is explained later in this chapter) as your lower threshold, and going for 160 kbps, 192 kbps, or higher if you're serious about this stuff. Music with a lot of smooth, or synthesized tones (such as techno) will far better at lower bitrates. Note, however, that no matter how high you set the bitrate, Garth Brooks will still suck lemons.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
General Encoding Principles
Creating MP3 files is generally a two-step process: Extract your audio from the original source medium into an uncompressed format stored on your hard drive, then run that uncompressed audio through an MP3 encoder. However, many tools exist to help you rip and encode through a single interface, in a single pass. Before taking a look at the tools and processes, you may want to read these notes and suggestions on ripping and encoding principles.
As described in Chapter 2, MP3 is a "lossy" compression format, meaning that some audio information is discarded in exchange for smaller file sizes. The big question you have to face when encoding your own MP3 files is how much information do you want to discard. The more you throw away, the worse your files will sound and the smaller your MP3 files will be. The more you keep, the better they'll sound and the larger the resulting files will be. Only you can decide where on this spectrum you want to sit, but again, always remember that your computer may not be the only place where you play your MP3 files. Next year you may purchase an MP3 playback component for your home stereo, a better sound card, or better computer speakers. All of a sudden, you may discover that the MP3 files you once thought sounded just fine don't sound so hot after all. Always aim for a threshold higher than your current tolerances, and remember that disk space and blank CDs just keep on getting cheaper. Unless you'll be listening to MP3s in a noisy environment such as a car, or will be dealing with limited storage space (as you might with a portable MP3 player), you can probably afford the larger file sizes incurred by going with a higher bitrate. I recommend setting 128 kbps or approximately 50% VBR (VBR is explained later in this chapter) as your lower threshold, and going for 160 kbps, 192 kbps, or higher if you're serious about this stuff. Music with a lot of smooth, or synthesized tones (such as techno) will far better at lower bitrates. Note, however, that no matter how high you set the bitrate, Garth Brooks will still suck lemons.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
General Ripping Principles
Before you can encode a single bit, you've got to get the music you intend to compress into your computer. This may be accomplished by piping the signal directly into your machine through your sound card's Line In jack (either from a mixing board or from home stereo components) or by extracting tracks from compact discs by way of your machine's CD-ROM drive in a process known as "ripping."
When you insert an audio CD into your machine's CD tray, then try to view its contents through your file manager (such as Explorer), you'll notice that all you see is a collection of 1 KB tracks labeled "Track1.CDA," "Track2.CDA," and so on. Drag one of these tracks to another location, and you'll find that you haven't copied that track's audio data to your system at all. This is because CDA (Compact Disc Audio) tracks aren't actually audio tracks—they're just "handles" that tell the operating system where on the CD to find the actual audio bits. Technically speaking, what you see when you view a folder full of CDA files is the CD's "table of contents," which tells the CD player at which byte offsets to find corresponding PCM data on the disk. By default, most operating system's file managers will only give you access to CDA handles and not to actual audio data, so you need to find a way around the situation if you want to encode those tracks.
You could take the long, cumbersome route and play the audio CDs through your machine's CD player application, then record the sound stream to disc as it plays, but that would grow very tiresome very fast and degrade quality, since the audio stream would be passing through a superfluous set of digital-to-analog and analog-to-digital conversion routines. The real solution is to use "ripping" software, which is specially designed to read CDA files, find their associated audio data on the CD, and transfer that data to your hard drive as an uncompressed WAV, AIFF, or RAWS file. In other words, rippers let you get around the barriers the operating system throws up in your face, and gives you direct access to the actual audio data living on the CD. There are exceptions to this, as you'll see later on in the chapter.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Ripping and Encoding Tools
Depending on the tools you use, ripping and encoding may either be a one-step or two-step process. The traditional path is to rip first and then encode. However, increasing numbers of tools that perform both steps in one pass are beginning to appear. We'll cover rippers, encoders, and combination tools together in this section, which is broken down by operating system. Many of these tools have been ported to various platforms, with operation virtually identical for each port.
As is usually the case, there are far more ripping and encoding options available for Windows users than for any other platform. The following are just a few.

Section 5.3.1.1: HyCD's HyCD

http://www.hycd.com HyCD is a well-rounded, multi-purpose tool designed to handle every facet of your CD ripping, encoding, and CD copying needs. Users looking for a way to clean up pops and scratches from LP and other noisy recordings will also find an excellent Effects processor included in the HyCD package. While most of the HyCD tools include an interface dedicated to the task at hand, its built-in ripper/encoder is somewhat oddly designed. Rather than launching a separate application, just navigate through Windows Explorer to the location of an audio CD track or tracks you want to rip. Right-click on those tracks and choose HyCD Copy from the context menu. A dialog will appear, asking whether you want to "paste" the files into the selected folder in WAV or MP3 format. In other words, do you just want to rip the selected tracks, or do you want to rip and encode them all in one step? If you think you'll need to pre-process or clean up your WAV files prior to encoding, then you'll just want to rip. Otherwise, choose Encode to go straight from PCM to MP3.
The biggest disadvantage to HyCD's ripper/encoder combination is that it offers no connectivity with the CDDB, so you'll have to manually rename and add ID3 tags to your tracks later. Despite this design limitation, HyCD offers a great collection of additional tools that anyone serious about building a quality MP3 collection will find useful, including a "Sampler" that will turn MP3 files back into WAVs in preparation for burning your own CDs (covered later in this chapter).
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Ripping from Other Sources
Of course, the audio you want to encode isn't always going to originate on audio CDs. Many of us still have huge music collections stored mostly on LPs, cassettes, DAT, 8-tracks, reel-to-reels, and possibly other media. MP3 represents a great opportunity to finally create a permanent digital archive of these collections... or at least the best of them (most people would have to be horribly masochistic to dedicate themselves to the digitization of every track they own). The good news is that encoding your existing collection in this way is do-able. The bad news is that it's going to require quite a bit more manual labor than encoding from CD. Since you can't stick an LP into your computer and let it twirl, you've got to go to the extra step of patching your home stereo into your sound card and manually cueing everything up properly. And of course, there are no batch-ripping/encoding solutions available for digitizing 8-track tape collections. Finally, you may have to separate songs manually when encoding from analog sources—LPs don't have any real awareness of when one track ends and the next begins. Without special software (see the following section), you'll have to do all of that yourself in an audio application prior to encoding.
The term "ripping" doesn't exactly apply when talking about sources other than compact disc—nothing needs to be ripped since the source isn't hidden, as it is with .CDA files. We use the term "ripping" in a somewhat looser sense in this chapter, though it might be more accurate to refer to "extraction."
If you're a recording artist, you'll probably already have your repertoire stored on tape, DAT, or another medium, so this section applies to you as well. Of course, it's possible to connect a microphone or other instrument directly into your sound card and save the signal direct to disk, and you may even have a fancy-schmancy sound card that handles multiple inputs and lets you do all kinds of preprocessing with dedicated DSPs, etc. But even if you are a digital-friendly musician, you're still going to want to do all of your mixing and mastering in dedicated multi-track audio software, creating a final stereo mix before going to MP3. In other words, while recording live to MP3 is a possibility, it's not often done unless you're capturing a live performance—and even then, you'll probably want to store that unencoded first.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Roll Your Own Compact Discs
When compact discs first appeared, they were "black boxes"; unlike LPs or cassettes, few people understood how they worked. In the mid-'90s, writeable CDs appeared for the first time, enabling anyone to create their own audio or data CDs at home... as long as they were sufficiently wealthy. By the end of the '90s, however, the cost of CD-R (the "R" is for "recordable") devices had fallen to well within the casual user's reach, and the cost of blank CDs dropped to the point where CD-R had a lower price-per-megabyte than any other storage medium.
MP3 collections typify the kind of problem CD-R was meant to solve: What happens when the amount of data you want to keep around exceeds the amount of storage space available on your system's hard drives? True, the price of hard drives has plummeted as well, but no matter how big a hard drive you install, it won't be long before your MP3 collection is even bigger.
However, relying on compact discs as a primary storage medium probably isn't the way you want to go either. With the price of hard drives continuing to go down, some people are surprised to discover that storing large MP3 collections on hard drives is actually cheaper than storing them on compact disc. Let's do the math. At this writing, 28 GB hard drives could be had for around $8/GB. Assuming you encode at 128 kbps, you'll need around one megabyte per minute of music. Now let's assume a baseline price of a CD-R drive at $200 and $1 for each disc. One 28 GB disk will cost around $224 and hold around 470 hours of music. Storing the same number of MP3s on CD-R will require around 44 discs, at a cost (including the drive) of $244. Storing the same number of tracks in CD audio format will require around 380 discs, at a cost (including the drive) of $580. So to store approximately 500 hours of music, hard disk is the best cost option. On the other hand, if you double this (i.e., 1,000 hours of music), then storing MP3s on CD-R looks like the best option. But by then, the inconvenience of having to search through 90 CDs to find the track you want will probably outweigh the marginal cost benefits.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 6: Hardware, Portables, Home Stereos, and Kits
Until recently, MP3 audio was a software-only proposition for most people. MP3 files were created on the computer and listened to on the computer. But that was before the appearance of the now-legendary Diamond Rio, which won the landmark court battle against the RIAA and, in so doing, legitimized a tidal wave of hardware-based MP3 playback devices. At this writing, there are at least a dozen portable MP3 players, and a whole genre of MP3-oriented home stereo devices is threatening to enter the consumer channel. Dozens of sites are available on the Web designed to help you build an MP3 player from scratch, and many alternatives for playing MP3 in your car are available.
This chapter covers the aspects of MP3 playback that escape the limited confines of the personal computer. Since many of the devices covered here involve connecting computers, home stereos, and custom devices, we'll start with an overview of analog and digital connection issues, before examining the field of MP3 portables and the quickly changing question of how best to store files for use with portables (including the advent of Lilliputian hard drives and removable memory cards). In a similar vein, you'll see how you can use a hand-held computer to play back MP3 files, assuming you've got a suitable PDA. We'll survey the landscape of MP3 equipment designed for use in home and car stereos, then move on to the tricky stuff: Do-it-yourself schemes for building your own MP3 hardware from pre-fab kits and plans, or, for the truly hardcore among you, from scratch.
Note that in most cases, the hardware mentioned here will not help you create MP3 files outside your computer—only play them back. The fact that commercially available hardware-based players are classified exclusively as storage devices—and thus do not contribute to piracy—is the essence of the landmark Rio suit and has completely shaped the MP3 hardware landscape.
There are basically two ways to listen to MP3 audio through your home stereo. Both methods have their advantages and disadvantages.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Playing MP3 Through Your Home Stereo
Content preview·