The way we listen to music has changed considerably over the years. The age of physical formats is over, and digital files now dominate.
Whether you stream or download your music, it’s almost certainly in formats like MP3 or AAC. These are compressed into small and convenient file sizes, and to achieve that they remove sound from the original recording.
In this article, we’ll take a look at how music compression works, and whether it has any real effect on how your music actually sounds.
How Compression Works
Digital music is most often served to us — through media stores and streaming services — in formats that use lossy compression. In order to compress the file — to make it smaller — data is stripped from the original, and it can never be restored.
This data isn’t removed randomly. The file formats use psychoacoustics to work around the limitations of human hearing, stripping out things that we did not even know were there.
Human hearing works in the range of around 20Hz to 20kHz, so in theory anything beyond this range can be removed without us even noticing. Our hearing range also diminishes as we get older, so no one really hears the same thing the same, anyway.
This video helps you identify which frequencies you can hear. Try it out using headphones, but make sure you turn the volume right down as you progress through it to avoid damaging your hearing.
In addition to this, sounds with a higher frequency are more difficult to hear if they’re surrounded by louder, lower frequency sounds. A persistent drum beat, for example, can drown out some of the subtleties in a recording.
Compression exploits this phenomenon through something called “masking”. This is where a louder, lower frequency covers up the loss of a higher, quieter one. This can be done throughout the frequency range, but sounds over 15kHz are particularly susceptible to it.
So, there’s clearly a lot of scope for removing apparently useless data from an audio recording, although some audiophiles argue that this removes less tangible qualities such as ambience and space and results in a more two-dimensional sound. Ultimately, the goal is to find the balance between file size and quality.
Bitrate (or Bit Rate)
The size of a file is determined by its bitrate. Many people think bitrate is an indicator of quality, but it’s not as simple as that. Bitrate does tell you the level of compression used, so it gives you a vague idea of what you can expect, but there are many other factors that influence quality.
- Different codecs have different levels of efficiency, so two file formats encoded at the same bitrate will be of significantly different quality.
- Even within the same format, the software used for compression matters. Some encoders are better than others, and many will even offer different quality settings at the same bitrate. Faster processing, for example, equals lower quality output.
- The type of audio being compressed is vital. The human voice has a frequency in the range of 85Hz to 300Hz, and can handle far more compression without loss of quality than orchestral music can.
Bitrate is measured in kilobits per second (kbps). CD audio has a bitrate of 1411kbps, which means there are 1,411,000 bits of data for every second of a song. MP3s are now commonly compressed to 320kbps, with 60% of the original data being thrown away. At 128kbps, it’s 90%.
The Effect of Audio Equipment
It isn’t just our ears that dictate what we can hear. The audio equipment we’re using plays a major role.
In some respects, a set of cheap earbuds is much more forgiving of compressed sound because they aren’t capable of handling the full dynamic range of uncompressed music. Or to put it another way, bad audio gear makes everything sound bad.
And even more expensive headphones might sometimes be tuned for particular frequencies (bass, for instance) which can render other frequencies — and the nuance of the recording — inaudible.
The best headphones and speakers, however, will be able to play the recording as it was originally intended, and are more than capable of showing up the difference between compressed and uncompressed music to a discerning ear.
What Compression Removes
A study by Ryan Maguire at the Virginia Center for Computer Music perfectly illustrates how compression works.
Using the Suzanne Vega song Tom’s Diner as an example — a song used in listening tests during the development of the MP3 format — Maguire effectively subtracted a 128kbps MP3 of the song from an uncompressed version, to be left with only the sounds that were removed during compression.
This is what was removed:
It rather contradicts the notion that compression only removes inaudible sounds. But to what extent are you actually aware that these sounds are missing?
From the same study, here is the uncompressed version:
And the 128kbps version:
Now that you know what has been removed, can you tell the difference?
MP3, Ogg Vorbis and AAC
MP3 is the most famous digital music format, used by services like Amazon MP3 and Google Play, and supported by pretty much every device, app, or cloud service that can play music.
Ogg Vorbis was developed as an open source rival to MP3, and is used by Spotify in three bitrates: 96kbps for “Normal” quality on mobile, 160kbps for “Standard” quality on desktop and “High” quality on mobile, and 320kbps for “High” quality on desktop and “Extreme” quality on mobile.
AAC is the format that gained popularity through Apple’s use of it in iTunes, and is now used in Apple Music as well. It’s also used for other streaming services including Tidal, Deezer, and Pandora. Apple Music uses a bitrate of 256kbps, while the other services offer quality levels up to 320kbps.
The three formats work along the same principles, but function in different ways and discard different pieces of data. For this reason, you should never transcode a file from one format to another, as it will result in markedly worse quality.
MP3 pre-dates the other formats by several years, and while this gave it a head start in the digital music market, it also means it is less efficient than its rivals.
There are many very technical reasons for this. One example is that both Ogg Vorbis and AAC use an average bitrate instead of the constant bitrate of MP3. This enables them to produce comparable quality at smaller file sizes.
320kbps is often referred to as the industry standard. Many also describe this as being CD-quality, where you can no longer tell the difference between compressed and uncompressed.
Audio compression isn’t always lossy. FLAC — promoted heavily as a unique selling point for Tidal — and Apple Lossless provide lossless compression. The quality of files in these formats is essentially the same as that in a WAV file. The file size is also considerably smaller, albeit still around twice as large as the lossy formats deliver.
These formats are the musical equivalent of a ZIP file. The encoder removes redundancy in the data, and can shrink the original file by as much as 50%. Because it is lossless, there are no quality settings when encoding a file, but it does also need to be decoded when it is played. This makes it more resource intensive.
Can You Hear the Difference?
Whatever compressed format you’re using, the main question is whether you can even notice the difference between it and an uncompressed alternative.
Certainly at 128kbps or lower compression, artefacts (distortion) will be noticeable on most formats. Beyond that, your experience may depend on the quality of your headphones or speakers.
You can test it yourself with various blind tests online. At mp3ornot.com you can compare MP3s encoded at 128kbps and 320kbps. Tidal enables you to test its lossless audio (and pitches it as a test of your audio equipment, just in case you can’t tell the difference). And there’s another fun test at NPR Music.
Alternatively, you can test your own music with the Lacinato AMX app for Windows, Mac or Linux. Simply add in songs encoded in different formats or bitrates and see which you prefer.
Can you tell the difference between lossy and lossless music? Do you have a favorite format, and are there ones that you avoid? Sound off in the comments below.
Image credits: Grado headphones via Jonathan Grado