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?

Can Quality Be Measured?

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.

Conducting listening tests

Since “CD quality” is our benchmark here, you want to get your MP3s onto an audio CD. To run this test, you’ll need access either to a CD burner or to a dedicated MP3 playback device. Find a couple of songs with which you’re well-familiar, preferably ones that include a wide range of instruments, including those from the brass and strings families. It’s often easier to detect limitations in the MP3 codec with non-electronic music, and the brass and string families do an especially good job of putting the codec to the test. However, it’s also important that you choose music you enjoy personally. To be well rounded, you might want to choose one each of your favorite jazz, classical, and rock tracks, for example.

Note

If you have a portable or home stereo MP3 player, just patch it into your stereo as described in Chapter 3, and load it up with encodings created as described in the next section. The same principles described in this section apply whether you’re working from a test CD or from a dedicated playback device.

Next, you’ll need to save a reference track for each song, meaning you should rip uncompressed versions of each track to your hard drive (typically in WAV format, though Mac OS users will want to use AIFF format). See Chapter 5, for details on ripping tracks directly from CD without encoding them. For the actual compression, you’ll want to use the highest quality encoder you can find (again, see Chapter 5),[29] and encode each track a number of times, at different bitrates. As you encode, give each file a descriptive name, including its bitrate. For example, you might use the following scheme:

Improv.Spacious.64.mp3
Improv.Spacious.128.mp3
Improv.Spacious.160.mp3
Improv.Spacious.192.mp3
Improv.Spacious.256.mp3

Once you’ve encoded each sample at a variety of bitrates, you’ll need to translate them back to WAV format and burn the resulting tracks to an audio CD (although your burning software may take care of this conversion for you; see Chapter 5 for details). Because the filenames won’t be present on the audio CD, take care to print out or write down the track numbers and the corresponding bitrates so you’ll have a reference sheet later on. Once your audio CD is complete, find the highest quality stereo you can (yours or a friend’s), grab your reference sheet, dim the lights, relax, and listen through the CD. While you may want to skip back and forth between the reference tracks (which will sound identical to the original CD audio tracks) and the encoded tracks later on, you should first listen to the disc all the way through. Don’t be too quick to flip back and forth between tracks, as that will only lead to schizophrenia and ear fatigue. The idea is to internalize the “flavor” of the tracks relative to one another. Evenings may produce the best listening environment, as you’ll likely get less ambient noise and less sensory competition from vision (assuming some darkness). If you’ve been listening to loud music or noises during the day, save the test for another day—your ears will already be fatigued. Self-run audio tests using your own hearing as a “benchmark” should always attempt to isolate variables and incorporate a best-case scenario, against which everything else should be measured.

Note

If your home stereo or entertainment system includes an on-board digital-to-analog converter which offers settings for surround sound or for various room effects (concert hall, small room, etc.), it’s important to disable these options and make sure your system is set on the defaults. If you use an equalizer or other audio “enhancing” device, disable it or run it flat (unless it’s a “set-and-forget” processor carefully tuned to neutralize a particular room). You’re testing your encodings here, not your equipment. Artificial interferences in signal flow will compromise the integrity of the test.

As you listen, take note of the most subtle sounds in the reference track, and try to determine whether those sounds are still present in the various encodings. Can you hear the clarinetist taking that breath just before his solo? The sound of the guitarist’s hands gliding over her strings? What about the sense of space (soundstage expansiveness)? Can you pinpoint the location of various instruments in the recording studio as accurately with files that have gone through the MP3 process as you can with the reference track? What about dynamic range? Are you detecting certain subtleties of the high and low ranges being chopped off or smeared out? Perhaps most importantly, do the MP3 encodings have a sense of “presence?” Can you close your eyes and imagine that the performance is taking place there in your living room? Does a given encoding make the performer sound sort of “mechanical” or “electronic?” Does the performance seem to be more or less intense with any of the encodings? Do any of them do a better job of making you want to tap your foot or sing along or dance, or do any of them make you feel edgy, or bored? Do the MP3 encodings sound “hollow” or “swishy” to you? Chances are, you’ll be amazed to discover just how much quality has been lost in the 128 kbps and lower encodings.

The bitrate at which you literally cannot tell the difference between the reference track and the MP3 encoding is the bitrate at which you should start encoding your MP3 tracks, provided you’re willing to part with the extra disk space this will consume (of course, if you’ll be burning a lot of tracks to writeable CD for permanent storage, this may be less of an issue). To be really safe, and to make sure your tracks will sound great no matter what playback system they end up on one day, encode at a bitrate higher than the one at which you couldn’t tell a difference.

If you don’t have access to a CD burner, then your next best bet is to connect your sound card’s line-out jack to one of your home stereo’s inputs, and try similar tests. However, keep in mind that unless you use a fully digital transfer system (i.e., using digital coax or optical cable from the sound card to your digital receiver or external DAC), you’ll be hearing the limitations of your sound card’s digital-to-analog converter.

Digital to Analog (and Back)

As you know, computers store and manipulate information—including audio information—digitally. But your ears are analog devices, and so are speakers.[30] Somewhere in the process of getting information out of your computer and into your ears, the signal must be converted from digital to analog. The device that affects this conversion is called the digital-to-analog converter, or DAC, and its role is crucial. The quality of the DAC plays a huge part in the overall quality of the resulting audio pouring from your speakers or headphones.

In the case of most stock sound cards, the DAC is a part of the card’s chipset. However, some higher-end sound cards offer digital outputs, which can be hooked up directly to the digital input of a digitally equipped stereo receiver or pre-amplifier. If your receiver or amplifier doesn’t have digital inputs (they’ll be clearly marked), you can purchase an external DAC or use the DAC built into a DAT deck, Minidisc player, or DCC, which will then sit between your computer and your receiver/pre-amp. The quality of external DACs is often directly related to their cost; a very high quality DAC can cost $1,000 or more, though you should be able to pick up a suitable model for a few hundred bucks.

In any case, by turning the job of conversion over to a dedicated unit, you can bypass the typically poor quality built-in DAC on most sound cards, and get a far better resulting sound stream out of your system.[31] When purchasing a sound card, make sure it has digital outputs in addition to the standard line out. If you’re serious about quality, do some research online to find out which cards have the best on-board DACs. If you’re really, really serious, consider a high-end outboard (external) DAC.

On the flipside, the reverse process—analog-to-digital conversion (ADC) may also come into play, depending on your needs. If you plan to encode music from analog sources such as tapes, LPs, or microphones, you’ll also appreciate the extra input quality you’ll get by making sure your source signal is stored in the computer after having passed through a high-quality ADC (either onboard or outboard), rather than the one built into your average sound card.

Equalization

Most GUI MP3 players include some sort of equalization mechanism, typically accessed by clicking a button on the player’s interface labeled "EQ.” Bringing up the equalizer usually displays a row of sliders (most often 10, though there could theoretically be any number of them). So, what exactly is equalization, and what does it get you? The simplest way to conceptualize equalization is to think of the bass and treble controls on your home stereo, and imagine that you had a separate knob for each of many much finer slices of the frequency spectrum, affording you much tighter control over the resulting output signal.

Why equalize?

The point of equalization, of course, is to make the resulting audio sound better. EQ can be applied to compensate either for poorly recorded audio, for limitations in your speaker quality or design, or for the speaker placement or acoustics in the listening room. The ultimate objective of equalization is to obtain a “flat” frequency response (hence the name “equalization”)—one in which the signal does not sound “colored” by the signal processing chain, storage media, or playback equipment.[32] Equalization can also be used to eliminate audio artifacts stored in the original recording. For example, you may be able to partially correct a recording with an annoying 60Hz hum, or to partially remove some of the scratchiness of encodings taken from LPs (though the latter can be pretty tricky, since scratchiness typically crosses many different frequencies, and you don’t want to throw the baby out with the bath water).

Despite these advanced capabilities, many (if not most) people use equalizers not so much to correct for anomalies as to boost the frequencies they like and to diminish the ones they don’t. For example, hip-hop fans may want to pump up the bass frequencies, while classical listeners may want to “sweeten” the strings.

Before you go tweaking your equalizer’s sliders with wild abandon, consider the equalizer as something to be experimented with gently and systematically. Listen carefully to the resulting sound after each adjustment, and pay attention to how manipulating one sub-band affects your perception of others—diminishing one sub-band can cause others to sound more prominent. Note also that if you find you have to equalize heavily to compensate for room acoustics, poor speakers, or a poor sound card, you should consider addressing these problems directly. Equalization is a band-aid, not a panacea. Be aware of the potential for over-equalization, and of the limitations of EQ principles in general:

  • Without a lot of expensive test equipment, you have no concrete goal to aim for—you’re just tweaking until something in the sound “feels” better for one reason or another.

  • EQ bands come in predefined widths and slopes, but your equalization needs don’t—they’re typically more “fuzzy” than the usual set of EQ bands allows for (it’s kind of like trying to apply mascara with a hairbrush... and no mirror).

  • Analog equalizers can introduce distortions, especially phase distortion. Digital equalizers can minimize some of these effects.

It’s easy to confuse louder and brighter sound for better sound. Optimum quality is achieved when music sounds as natural as possible—equalize with an ear toward a natural sound atmosphere. Over-equalization can easily degrade sound quality. In other words, the answer to the question, “Why equalize?” is often “You shouldn’t, unless the situation demands it.” It’s easier to ruin the sound than to improve it. Experiment with your EQ, but don’t overdo it.

The Fletcher-Munson curve

While you should, of course, equalize as necessary to hit the sweet spot that works for a given situation, there’s one commonly used configuration of which you may want to be aware: The classic "Fletcher-Munson” curve, which takes advantage of the fact that the ear is not as sensitive to low and high frequencies when music is being played at low volumes. Thus, boosting these frequencies somewhat above normal can help music to sound more natural at lower volumes (Figure 4.1).

Note

Interestingly, the function of the loudness button on your receiver is similar; apply an Fletcher-Munson equalization curve to the music makes it sound more natural at lower volumes.

Fletcher-Munson curve, for use in low-volume situations

Figure 4-1. Fletcher-Munson curve, for use in low-volume situations

Note that many MP3 equalizers, such as WinAmp’s, let you store equalization curves as presets, which can be loaded up again later without painstakingly re-creating them. Depending on your player, it may also be possible to store a prime equalization curve directly in the MP3 file itself, so you can optimize all of your songs’ equalization curves independently. This capability is dependent on the fact that the ID3v2 specification allows for a huge array of meta-data storage capabilities in MP3 files; in other words, you must be using an ID3v2-compliant decoder capable of storing EQ presets. At this writing, this capability remained purely theoretical, though it should become a realistic possibility as the ID3v2 spec builds more momentum. See the ID3 section of this chapter for details.

Working with EQ presets

Because different tracks may require different equalization curves, WinAmp lets you associate an EQ preset with any given track. Here’s how to associate an EQ curve with a track:

  1. Play the track normally, and press AUTO in the EQ interface.

  2. Dial in your EQ curve.

  3. Click the Presets button and navigate to Save Autoload Preset.

  4. Allow WinAmp to associate the current track’s filename with the current EQ curve.

After creating an association between a track and an EQ curve, the association is stored by WinAmp in a file named winamp.q2 in the WinAmp installation directory (the file cannot be edited by hand). Any time AUTO is enabled in the equalizer and that track is played, the preferred EQ curve will snap into action.

Note

In most cases, the equalizers built into MP3 players will have no effect on the audio stream when playing audio CDs, since CD audio is often routed directly from the CD player to the sound card without moving through software first. In this case, the MP3 player is just used as a convenient interface onto the CD transport’s control buttons. However, there are plug-ins available that will “steal” the CD audio signal and route it through the MP3 player (the NullSoft CD/Line Input plug-in for WinAmp, with the “sampling” option enabled, for example). See Section 4.5 in this chapter for details. Once the CD plug-in has been enabled, you should be able to use the equalizer and various visualizers to interact with CD audio.



[29] The test described here can also be used to test various encoders against one another. The only difference is that you’ll want to encode the reference track at the same bitrate, but with different encoders. In fact, you may want to encode at various bitrates with each encoder in your test, so you can determine whether a given encoder excels at low bitrate encodings but falls down at higher bitrates, for example.

[30] Or, at least, most of them are; completely digital PCM speakers are beginning to appear on the market.

[31] Of course, the rest of your system should be of high quality before you go spending money on a DAC. Putting an external DAC in a system with poor speakers, for instance, probably won’t result in noticeably better sound.

[32] Note, however, that many recording studios use equalization to add color, not to remove it—a fact which drives some audiophiles nuts.

Get MP3: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.