Page 1 of 2MP3 is just a file format for audio files but judging by the revolution in the way music is listened to since it was introduced you might think it was much more and in a sense it is.
Forget for the moment the copyright issues that incense the music industry and consider the magic that allows you to take a high quality audio recording, convert it into digital form and then reduce the amount of storage needed by a factor of 10 or more without any loss of quality.
Well in theory there is no loss of quality but, as will become all too clear, this is something of an “issue” when it comes to actually using MP3.
First what does MP3 stand for?
The simple answer is that it’s short for the MPEG audio layer-3.
A more informative answer has to include the fact that MPEG stands for “Moving Pictures Expert Group” but this then raises the question of what experts on moving pictures have to do with sound!?
The solution to this is that moving pictures have sound tracks and MP3 is just one of a number of possible ways of encoding them.
MP3 is in fact part of the MPEG-1 standard, which covers how to compress both video and audio. It proved to be so good, however, that it has been widely adopted for sound tracks that don’t have any pictures!
A slice of history
The story of MP3 starts back in the incredibly far distant past of 1987 when the Fraunhofer institute started work on audio coding as part of the Digital Audio Broadcasting (DAB) project. The most important contribution to the work was from Professor Dieter Seitzer of Erlangen University – a name that will crop up again when it comes to the question of who owns the MP3 technology.
In 1988 the Motion Pictures Expert Group was born and by 1992 the Audio Layer 3 standard was created, based on the work at the Fraunhofer. Soon after a patent was granted to Dieter Seitzer for the MP3 method.
Frauenhofer produced the first MP3 player but it wasn’t very easy to use. Soon afterwards a free player – AMP - was developed by some university students and after being given Windows and Mac user interfaces – WinAMP and MacAMP – this started the music swapping MP3 craze that culminated in Napster, iTunes and similar Internet services.
So how does it work and what was the big breakthrough that made, and makes, MP3 so good?
You probably already know that there are two types of data compression - “lossless” and “lossy”.
Lossless compression works by using the most efficient use of the storage. For example, if you want to store a picture of a black and white page of text the simplest way is to represent the colour of every point or pixel as either being black or white. However, there’s a lot of white on a page and most of it happens together. Suppose we have a run of fifty white pixels. Using the simple representation this would take fifty bits to store but if we just write “50 white bits” you need to store the number fifty and the fact that these bits are white – much less storage is required.
This is called “run-length encoding” but it’s another story and all that really matters is that you can see that efficient coding schemes are possible and they save storage space without throwing away any information – hence “loss-less”.
Lossy data compression, on the other hand, does throw away information to save storage space – but it tries to do it so that you just don’t notice.
If you have a digital camera you will know all about JPEG (this one is from the Joint Photographics Experts Group - the still picture version of MPEG!). When you save a picture using JPEG compression some of the detail in the picture is lost but in general you don’t notice.
If you want to see what I mean simply try saving a picture with a high JPEG compression ratio selected and then look at part of the result at high magnification. This is lossy-compression, because it loses information. It promises the highest compression ratios of any method and it works fine as long as you really do only throw away information that isn’t useful.
MP3 is a lossy compression scheme for sound that takes advantage of the way human audio perception works. It’s based on a psychoacoustic model of human hearing.
You might think that your hearing is great and you hear everything perfectly all of the time but… There is a phenomenon known as auditory masking, which means you really don’t hear everything you just think you do. In auditory masking a loud tone in one frequency range masks quieter tones in nearby frequencies. Notice that we are not talking about tones far enough apart to be part of a chord – if we were then there would be no polyphonic music because the loud notes in a chord would mean you didn’t hear the quieter notes.
In addition to auditory masking there is also the simple fact that human hearing isn’t equally sensitive to all frequency ranges. It turns out that our hearing is most sensitive to the range 2kHz to 4kHz and the sensitivity falls off outside this range surprisingly rapidly. What this means is that you only need to use high quality representation in the frequency bands that we are really sensitive to.
Figure 1: A loud noise in one frequency band masks any sound in nearby bands and allows them to be ignored.
MP3 uses all of these ideas and the fact that the sound coming out of the left and right hand stereo channels is very similar to reduce the number of bits per second needed to produce high quality sound.