Audio Vs. File Compression: What To Avoid For Better Audio Quality
It's hard to depict sound. Most apps show it as a wavelength, but in reality, it's a more complex mesh of multiple wavelengths that span different high and low frequencies. But the process of capturing that sound in a recording, and then sharing it over the internet, often leads to sounds that feel slightly different from what you'd experience in the real, natural world around you. One reason is that the sound you're listening to has probably been compressed, which is an editing process to sculpt sound. The end result can affect how you perceive the soundstage as well as the tenable audio quality you're experiencing. If either type of compression is used incorrectly, though, it can lead to something worse than when you started.
When it comes to music, an audiobook track, or any sort of audio that goes with visual media, there are ways artists and editors can ensure that different elements of a recording are heard at the volume levels they'd intended. This is what we refer to as audio compression. Then, when those compositions get delivered to listeners and viewers, file compression helps make sure they sound just as good as when they were mastered, but that they also don't take up groves of memory. Those who wear wireless headphones may experience an additional step of compression and decompression than most who plug in as sound makes its way from the device to their final destination.
What is audio compression?
In a studio or a digital audio workstation (DAW) application like Audacity, FL Studio, or Logic Pro, compressors are used to even out the perceived loudness of certain sounds: louder sounds are tamped down, thus bringing out quieter sounds. The apps can control the dynamic range of an entire piece or specific tunable bands of frequency, enabling producers to make their cymbals more cohesive with the other tracks or, for podcast editors, level host and guest voices with each other easily. Whether it's a digital plug-in or a physical machine that passes input through amplifiers, vacuum tubes, light bulbs, or transistors, a compressor also lends the sound they're affecting a certain characteristic evocative of their modulation technique — you'll hear "warm," "smooth," and "creamy" in typical mixer parlance. Vocals in particular can benefit from a decent dose of compression as they are the element most prone to quick swings in loudness, though it can overexpose breathing and sibilance, or sounds like 'Zs' or 'shushes.'
There are two primary levers to compression in a DAW environment: the loudness threshold at which the compression begins to apply and the ratio or the strength at which it is applied. At a ratio of 8:1, which is generally considered to be on the edge of moderate to heavy, a compressor will limit anything louder than the threshold by a division of 8. So, if the input is 16 decibels (dB), it gets reduced to 2 dB. Compression is further affected by attack and release variables, or the times a user sets for the compressor to ramp up and down when it detects an audio signal passing either way through the threshold. The overall process decreases the apparent loudness of the affected audio.
What is file compression?
A codec (a portmanteau of compression-decompression or encode-decode) is responsible for taking media and shrinking it down for transport and storage before it is played back. With lossless audio codecs such as the Free Lossless Audio Codec, or FLAC, the file is preserved in a way where no data is lost when compressing and decompressing. However, most codecs including MP3 and Advanced Audio Coding or AAC, are lossy, meaning that they compress by removing data using algorithms that focus on lesser perceptible differences in sounds within the file. Nearly all major music streaming platforms offer lossless as well as lossy audio quality options for online and offline playback.
Streaming audio, whether it's from a live broadcast or a Bluetooth link from your phone to your earbuds, also uses codecs to transport audio on the limited bandwidth radio signals between devices, often with a focus on low latency. In addition to AAC, parts of the tech industry have come out with their own wireless transmission codecs that optimize for various aspects including device power consumption. One of those codecs is AptX Adaptive from mobile chipmaker Qualcomm, a widely supported codec that, as the name suggests, dynamically adjusts from quick-response video calls one minute to hi-fi listening the next. That said, in cases where an advanced Bluetooth codec isn't available, your equipment may fall back to the default Subband Codec (SBC) where quality is constrained by a relatively low bitrate limit.