jump to navigation

Everything about File Compression: Take 1 November 13, 2008

Posted by ConnorSmith in : Chit Chat, File Compression, Project Studio , trackback

(as a side note, sorry for the lack of my posts lately, grad school is getting the better of my time…)

Ah…. the internet.  One of the greatest inventions of our time, not only for information technology… but also for (you guessed it) the audio industry!

The internet has allowed us to turn the music market upside-down.  With CD sales on the fall and internet music on the rise, a substantial need for good-sounding compression formats has arisen.  But how do these compression codecs actually do what they do?  Why do some sound better than others?  Why do some sound like… well… bad?  We’ll explore this over the series of articles.

Most of the common compression formats you will see online (mp3, AAC…) are lossy codecs.  That means, once compressed, data has been lost.  Once you convert your uncompressed (WAV, AIFF) file down to mp3, you can never convert it back without loss of bits (and therefore quality).

I will get deeper into these concepts in the articles following this one, but its good to know that many of these lossy encoders are using a psychoacoustic model of human hearing to predict what elements of the signal may be masked by our hearing system (usually the masking occurs as a result of critical bands on the basilar membrane… I guess I should give an introduction to the human hearing system as well… noted).  If part of the signal of the original file will likely be masked by our hearing system, then technically, the encoder could lower the volume (speaking in bits) of the masked sound without a difference in the final sound.

Sorry, getting into some wooly passages. I’ll try to simplify with an exaggerated example:

Imagine you have a tune where a 170′ diameter gong gets smashed by the back end of Paul Bunyan’s axe (of course, by Paul himself).  Right after the initial attack of the gong, someone lightly clangs some finger cymbals.  Yes, some of the high frequency information from the finger cymbals may get picked up by a mic in the room, but it will be overwhelmingly covered by the sound of the massive gong.  The encoder (based on psychoacoustic modeling) knows this and can lower the number of bits it is using to encode the sound of the finger cymbal.

So, in a simple summation, the goal of the lossy compression encoders is to predict which sounds we won’t hear, and make them quieter (less bits).

In the next few articles, I’ll get into mp3, AAC, Ogg Vorbis (maybe a few others)… and then… FLAC! (which is a lossless audio compression format)

That’s all for now…

C

The Studio Files

Comments»

1. PJ - November 14, 2008

Excellent article Connor! All this talk about audio compression reminded me of a a couple useful tools.

First, for iTunes users that rip a lot of CD’s – the LAME encoder plugin is far superior to the built in encoder for iTunes. You can grab it from:

http://blacktree.com/?itunes-lame

and second for anyone in general, the dedicated app Max can compress to almost any file imaginable. Read all about it here:

http://sbooth.org/Max/#download

Can’t wait for Take 2

PJ

2. ConnorSmith - November 14, 2008

^^indeed

LAME is an open source mp3 compression codec (but not originally!)
iTunes encodes with AAC

We’ll get into the differences between these formats


Close
E-mail It