It just sounds better.

Brian (and a few others) have asked me why exactly it is that the AAC Audio used in Apple's Music Store just plain "Sounds Better" than the usual MP3 encodings they are used to listening to.

Well, the answer is somewhat complex, but it generally revolves around two key issues. Stereo handling in traditional "ripped" MP3's, and advantages to the AAC compression method.

Most MP3's that you'll find through file sharing networks employ a Joint Stereo audio track. Joint Stereo is an attempt at reducing the size of a file while still retaining "stereo" signals. In a joint stereo file, the compressor takes advantage of the fact that both stereo channels contain mostly the same information most of the time. So, when the two channels are similar, instead of compressing both a Left and Right channel, it adds the two together and produces a middle (L+R) and a side (L-R) channel. This allows a reduction in the final size of the file by using less bits for the side channel. During playback, the decoder will reconstruct the left and right channels from the middle and side data.

Sounds great, right? Well, not really, because when the middle and side channels are created, a lot of information from the original Left and Right channels is lost. This lost data generally ends up being subtle harmonics and tonal depth, and without it, you end up with a flat sound.

So why do most files end up in Joint Stereo? Well, because most encoding/ripping programs come set up to use it by default, including iTunes.

To get around this, one can tell their encoder to specifically use true stereo encoding, which will result in a larger file size, especially at higher bitrates.

Now, AAC does things a bit differently. First off, you may have read that AAC files at a 128k bitrate will sound as good as normal MP3 files at 192k, while resulting in a much smaller file. Put simply, it does this by using a better compression system.

Instead of using a hybrid filter bank (a method of analog to digital conversion) like MP3, AAC makes use of a Modified Discrete Cosine Transform, or MDCT. This basically does the same thing, only with increased "space" in each transform, or conversion, and it does so much more efficiently.

Without getting too technical, AAC also makes use of a bunch of other overly cool technologies which MP3 simply doesn't have. These include Temporal Noise Shaping (a method of time/frequency coding), better Quantization (control of data in the bitstream at a given bitrate), and entropy encoding in the bitstream which keeps redundant bits of information as low as possible.

Roll that all together, and you get a compression technology that vastly outperforms the old MP3 system, while allowing for greater flexibility. For example, while MP3 supports a maximum of two channels of audio (stereo), AAC supports up to 48 full frequency channels.

AAC also uses a higher sample rate. Most ripped MP3 files you'll find (or create) are sampled at 44.1 or 48kHz. Most AAC you'll find is sampled at 96kHz. This provides a huge amount of extra data in the sample, which results in more information reaching your ears, even when compressed via a lossy format.

So, in a nutshell, it sounds better because all the discrete harmonic data that most MP3 compressors throw out is still there. Compare this to listening to a cheap pair of headphones for several weeks, and then walking into a THX Theater. The difference is amazingly dramatic, because all the information you had previously been missing is suddenly there again.

AAC is probably the most advanced and downright elegant lossy audio compression format out there right now. It should come as no surprise that Apple went with the codec that "Just Works".

UPDATE: Welcome, Bleat readers!

posted by Mr. Lion | 04/29/03 @ 01:32 | comments (1)