Few effects cause more confusion, and are more often misused, than compression. Good compression can bring a mix to life, solve all sorts of audio problems, and even improve your live performances. Compressing the wrong way can ruin any chances of whatever you're working on sounding acceptable, and is a sure-fire way to ruin even the best of mixes.
I was recording and mixing for years without really understanding compression or how it worked, and as a result whether what I came out with sounded good was a matter of trial and error, or even blind luck. Compression is almost infinitely complex, but I've gained a good understanding of it over the years (though I'm still learning), so I'm going to take you through the basics to save you the guesswork I had to go through.
Let's start with first principles. The most important thing to understand, and to bear in mind at all times when working with compression, is that compression always makes loud things quiet. This may seem a little counter-intuitive, as we often associate compression with loudness, but when compression is used to make things seem louder it is not in fact the compressor that is doing that more on that in a bit.
Compression works by taking the loudest parts of the waveform it is assigned to and reducing the gain, bringing it more into line with the quieter parts of the waveform. The controls that come with compressors help you decide what parts of the waveform you want made quieter, how much quieter you want them to be, and when you want that to kick in.
What is it used for?
There are three main reasons that you will want to use compression. One is to even out a sound that is uneven in its volume levels. Vocals, in particular, will almost always need compression to sound consistent, as the wide range of sounds made by the human mouth have a wide variation in volume, and singers have this annoying habit of moving around, varying the distance between their lips and the mic in a most inconsiderate fashion. By compressing the louder parts down, the producer (or the sound guy in a live setting) can set a level for the vocals and leave it there, knowing that things won't get too loud or quiet. Other instruments that can benefit from this include acoustic and bass guitars, as well as drums.
The second, related use is to increase loudness. Because compression reduces the peak levels of the signal, you can increase the gain on a live or recorded track without causing overdrive or distortion. That way, rather than just the hardest-hit chords or biggest drum hits being the highest peaks in perceived volume, with enough compression everything can be made deafeningly loud without anything peaking or distorting. This is particularly noticeable in modern mastering techniques, whereby, to compete in the so-called loudness wars, engineers make everything near or at as loud as it can be. This has certainly been overdone on occasion, listen to the Foo Fighters' All My Life or the Deftones' Minerva for examples of over-compressed mastering. Both those songs have quiet introductions and burst into life when the drums come in, but because the main parts of those songs have been compressed down to match the level of the intros, and then had everything turned up to 11, those moments don't have as much impact in fact it almost seems as if everything gets quieter when the full band comes in, the exact opposite of what you'd expect and of what you'd experience in a live setting. Listen to Drowning Pool's Bodies to hear more sympathetic mastering which enables the band to really punch the listener in the face when they come in.
Compression for loudness is often used live, especially for bass guitar. A slap/pop bassline will have huge peaks as the strings slap off the frets, and without compression you'd have to set the levels for the bass guitar unacceptably low just to prevent the pops peaking and possibly blowing the speakers. With compression, those peaks are reigned in and you can turn up the volume so that the quieter parts of the bassline are audible as well.
A third use of compression is to make tonal changes, especially to drums (and sometimes acoustic guitar), by manipulating the percussive attack (the transient) of each hit (or strum). More on that below.
What do the controls do?
Every compressor will have different controls, but the essential elements of every compressor are:
Threshold: This is the level (counting down from 0dB as the maximum possible extent of the waveform) at which the compressor will start to reduce gain. Set it high, and the compressor will only quieten the very loudest peaks. Set it low, and the compressor will cut into even medium-gain peaks and reduce the gain of much more of the waveform in effect, it will make the quieter sounds in the waveform (those below the threshold) sound louder rather than make the loud ones seem quieter.
Ratio: This is the extent to which the peaks above the threshold will be reduced. Set at infinity, the compressor will not allow any sound that is louder than the threshold to go past this turns the compressor into a limiter. Limiting can cause distortion if it is cutting too deeply into the tops of the waveforms, though some plugins, especially specialist limiters, have features designed to reduce this. Otherwise, the ratio determines how squashed the signal above the threshold should be, ie a ratio of 3:1 means that a peak above the threshold of 3dB would be reduced to 1dB etc.
Soft Knee: Some compressors have a setting that tells the compressor to start gently compressing before the threshold is reached. This helps reduce distortion and other artefacts from high-ratio compression or limiting, at the expense of slightly greater gain reduction and slightly reduced loudness. Some compressors, particularly vintage or analogue-style compressors, do this automatically as part of the way they work.
Makeup Gain: As discussed at the start, compression makes things quieter, but one of its chief uses is to make things louder. To achieve this, most compressors have a makeup gain control which lets you add gain after the compression stage to achieve the compression/loudness process all in one plugin. Most such compressors let you either choose the amount of gain you add or have an auto setting to bring it back to the average or peak gain before compression.
Attack/Release: These controls set the length of delay between a signal passing the threshold and being compressed, and the length of time that the compression lasts for. These can make big tonal differences to the sound created, and in particular, are the most important controls when using compression to manipulate transients. Careful use of the attack and release controls lets you either emphasise or reduce the attack of instruments (or, looking at it another way, emphasising or reducing the sustain) of instruments with strong and distinctive attack characteristic, notably drums, but also acoustic guitar and bass. The process of how to achieve this is quite difficult without audio examples, so I've created a short audio guide to doing this. Sign up to my newsletter and download it for free.