smokerblog

...mostly self-indulgent blather

January 17, 2005

Music to My Ears

So I've mentioned elsewhere about my external hard drive failing and having to re-rip my cd collection to mp3 files. I mentioned this to the wallace-l smarties and a discussion started about whether ripping files to mp3 is or is not a Good Idea.

The Idea being, in general, to get your music translated (aka encoded) into a computer-friendly format so that you can do all sorts of nifty things like create mix cds or search for that one artist or song that you want to hear all without having to sift through a pile of cds.

The problem is that audio files are large, too large to be practical. Plus, audio files come in different formats, much like images do. Just as you can have a tiff or eps or jpeg image format, audio files come in wav or aiff or aac or mp3 (or ogg-vorbis, which I'm not going to talk about here). And hey, guess what? Two of those formats (mp3 and aac) offer file compression, solving the large-file-size problem. Except. They introduce a new problem: loss in audio quality.

Of course, the internet is rife with flame wars of proponents of different encoding technologies duking it out. But here's a good description of the problems faced in music compression. That article is long and pretty detailed, so if you just want the basics, I'll try to summarize them here:


Humans can hear a range of sound from about 20Hz (20 cycles per second) to 20mHz (20,000 cycles per second). CDs are designed to capture anything that falls in this range, plus just a little bit more. Humans generally have more difficulty hearing at either end of that spectrum (the really high notes and the really low notes), so when music is encoded and compressed, the software makes a judgment about what information to "throw away" to save space. If the software is well-designed, it discards only the sound that falls outside this range or is otherwise masked by the music that your brain pays attention to. Ideally, and in most instances, you would never notice the difference.

To optimize the results, each encoding format allows the user to adjust the varying levels of compression that can be applied (measured in kilobits per second, or kbps). Obviously, higher the compression means poorer quality playback, but less compression means larger file sizes. The trick is to find the balance between the two. Finding that balance depends on the following conditions:

First, depending on other features of your listening environment, you may or may not even notice the differences between encoding formats. Background noise, the quality of your speakers, the quality of the original recording, and the quality of your own personal ears will all have a limiting factor on your ability to even notice any sound degradation.

Second, the kind of music you listen to makes a difference. If your collection is entirely made up of punk rock, you probably won't care or notice. But classical or jazz fans are more likely to want to be able to hear the fine details of the performances. Plus, certain instruments, like the piano, seem to cause problems for most encoders.

Fourth, if you do not use Apple products, you may not be able to use the aac format; the mp3 format is still more of a standard. It seems, though, that aac provides a better quality vs. compression ratio when compared to current mp3 encoders (although there are new encoders coming out that should help narrow this gap).

Finally, be aware that none of this matters to anyone who is not a geek, and it matters only slightly to those geeks who are not members of the audiophile geek subset. Quick definition: an audiophile is someone who actually cares about things like equalizer settings, frequency response, positioning of speakers, etc. An audiophile would rather spend $300 on a pair of really nice headphones than invest that money in something else, like say, more cds. (I probably should have told you this part first, huh?)

So what do you do? Well, obviously, I don't know. For all I know, you might be listening to the Sex Pistols through beat-up, Kmart-special speakers in a shack under a highway overpass. Or, you may have built an acoustically perfect listening room with megawatts of surround-sound speakers optimally positioned. All you can do is run a couple of tests and make your own decision based on what you hear. Here's a test that I did:

"Launcho Diablo" by Stanton Moore, from Flyin' the Koop

Now, if your computer can play all these, you might be able to tell that the mp3 file sounds a little "flatter" than the other two. For me, it seems to lose a little oomph in the bass and is maybe not quite as snappy in the higher registers (but that might be my imagination, I can definitely hear it more in the bass).

If you have super-deluxe speakers connected to your computer, you might be able to detect a difference between the aac and the original aiff. If you can tell and if you care, then congratulations! You may be an audiophile! However, I can't tell the difference. What this means is that I will bump up my encoding quality one notch just to be safe, and begin encoding my files in aac format at 160kbps from now on. If your eyes have glazed over by this time, you may just be happy with your encoder's default settings, which are probably either 128kbps mp3 or 128kpbs aac (this is the iTunes default).

Happy listening!

Posted by ksmoker | permalink
Comments

two not-terribly-quick comments as this pertains to what i do both for pleasure as well as money (ie, sound engineering)

firstly, regardless of what loonies will tell you, once you get above a certain level (about 192kpbs or so) the difference in sound quality is virtually nil. i've played @ venues w/ gigantic sound systems (not only played but mixed--beatmatching, chord-pitching, etc) & i can tell you plus the world w/ a reasonable degree of certainty that unless you are in a studio w/ a pair of professional headphones, or else listening to studio monitors, you will not notice the difference.

secondly, the future is vbr, variable bit rate, & here's why: let's take 2 seconds from different parts of a random track, any track. second #1 is taken from the introduction, with some very basic percussion & base, whereas second #2 is taken from the payoff, where you've all kinds of things happening--heavy percussion, base, a couple different leads, vocals, sweeps, stabs, rolls, chords etc. from a compression standpoint, second #1 doesn't take much space express/encode b/c there just isn't a lot of activity on the sound spectrum--only a few relatively narrow bands are used--& so the way the sound wave (which is another way of saying, the vibration pattern) works out is fairly straightforward.

second #2, however, has a shitton happening. the sound wave is more complicated, the range is wider & the amount of vibration happening within that range is also much greater.

in flat-rate compression, all seconds of a given track are pared down using the same algorhythm. in variable-rate compression, you've different algorhythms being applied to different time intervals--very short ones, under .01 of a second.

also: we're both using the term "compression" pretty loosely, when we should be instead talking about encoding. in sound engineering, compression means an entirely different thing which i won't attempt to babble about here.

Posted by: harmgasmic at January 23, 2005 03:38 AM

great comment harm, thanks.

i thought, and from what i can tell with a bit of random googling, aac uses vbr. i'm pretty happy with what i'm hearing w 160 kpbs aac, despite its proprietary nature.

but i just downloaded a lame encoder plugin for iTunes, so maybe i'll give that a whirl:
http://blacktree.com/apps/iTunes-LAME/

Posted by: ken at January 24, 2005 07:23 PM
Post a comment









Remember personal info?