“I bought some beautiful choral music on iTunes and it sounds muddy – no detail and it seems there is a loss of complexity. How does mp3 compression work and what do we lose in the compression process?”
Audio files contain a huge amount of information. Think about a favourite song or piece of music. Every beat, tone and voice must be stored precisely. To a computer, this is a lot of ‘1s’ and ‘0s’; in its rawest form, a CD-quality album would take up about 400MB of data.
So to stream music and store libraries full of songs on your laptop, these audio files need to be compressed. And the MP3 format is the most common way of doing this. So, what is it?
MP3 stands for MPEG-3, which in turn is an acronym of “Moving Picture Experts Group, Layer-3.” You’re right, that name doesn’t make much sense for an audio file, but it was originally used as a way to make video files smaller. (We don’t use it for that anymore).
The idea behind compression is that we throw away parts of the sound file we can’t really hear anyway. This makes the overall size of the file smaller without compromising too much on quality. For example, a recording of some beautiful choral music will contain frequencies outside of the human hearing range. These are effectively taking up space without offering us anything extra. Similarly, when two notes play at the same time, we tend to hear only the louder one.
An MP3 discards this redundant information to free up space. It then uses a few clever mathematical tricks to make the file smaller – one of which is Huffman coding. It’s a bit complicated, but it is a bit like turning the whole piece of music into a sequence of alphabetical letters – sounds or notes that are repeated are remembered as letters (e.g. ‘A’ or ‘010’ in computer-speak) rather than recording the exact volume and frequency each time (which could be a very long line of ‘0s’ ‘1s’).
The final compressed file can be can be 1/14th the size of the original. But the more data that gets dumped, the less authentic the track will sound. The amount of the original data left is expressed by the ‘bit rate’ of the MP3 – files of 90-128kbps (kilobits per second) provide a quality similar to FM radio, whereas 256kbps is closer to that of a CD.
Experiments show that through the same speakers, you can’t really tell the difference between a 256kbps MP3 and a CD. However, at the end of the day, whatever recording process you use, there will always be some loss of quality. There truly is no substitute for the real thing.
One final thought, Tim, is that the “muddy” sound you report may be due to the speakers or headphones you’re using. Perhaps the subtle nuances of your choral melodies have exposed a limitation here rather than in the music file itself.
Answer by Ross Harper
Question from Tim via Facebook