Wednesday, October 26, 2011

Putting The Squeeze On: An Intro To Compression, Pt. 1

It could be argued that nothing has had a bigger impact on the way we hear recorded music today than compression. It is present in some form in every stage of the recording, mixing and mastering processes, as well as in both TV and radio broadcasting. It is one of the most common and effective tools in an engineer's arsenal, and yet it is also one of the most misunderstood. Over the next couple of weeks, we will explore compression, discussing both what it is, and when and how to use it.

So what exactly is compression?

Have you ever mixed a song where you can't seem to get the vocal level just right? Certain words or entire lines keep poking out of the mix because the singer is getting too loud, while others are so quiet that you can barely hear them? Or maybe you are dealing with a flabby snare drum sound that just doesn't seem to have enough "crack" to it? Or you can't seem to get your mix as loud as those you hear on commercial recordings? Well, these are all common problems that an engineer will face regularly, and all are instances where compression could help save the day. 

Put simply, a compressor's job is to reduce the distance, or dynamic range, between the quietest and loudest parts of a sound to make the overall volume level of the sound more consistent. Compressors accomplish this by reducing the volume of a signal once it crosses a user-determined volume level, or threshold.

In Fig. 1, you see a waveform with a few large volume peaks that we want to control. If we set the compressor's threshold (represented by the horizontal red line) to a level that will allow the lower peaks to pass through unaffected, then the compressor will act only on those peaks that exceed the threshold, turning them down so that they are closer in volume to the lower peaks. 

Fig. 1
By reducing these strong peaks, it becomes easier to keep the sound at its relative volume level in the mix. In Fig. 2, we see on the left side a vocal recording that has a very large dynamic range between the last line of the verse and the first line of the chorus. To avoid the singer completely overpowering the music once the chorus kicks in, we need to control the volume level of those chorus peaks, but without reducing the level of the verse any further. You can see in the image to the right that our compressor has kicked in and turned down the chorus vocal for us.

Fig. 2

Taking Control

No two recorded sounds are exactly the same, so it stands to reason that we wouldn't want to compress every sound in exactly the same way. So to help out with this, compressor designs often incorporate some user adjustable settings that allow us to adapt the compressor's behaviour for different sounds and situations. The most common controls you will find are threshold, ratio, attack, and release.

As we've discussed, the threshold setting allows us to decide at what volume level the compressor will begin working. But we don't necessarily want the peaks that rise above that level to be completely flattened, as this would probably not sound very natural, so the ratio control allows us to gradually introduce the compression effect so that we aren't completely destroying the dynamics of the sound. Here's how it works; if you set your threshold at -24 dB (decibel levels in recording are always referred to in negative numbers) and your ratio at 3:1, for every 3 dB that the input signal exceeds the threshold by, the compressor will allow 1 dB to pass above the threshold. So if your input signal level reaches -21 dB (3 dB louder than our threshold of -24 dB), the compressor would reduce the output level of that peak to -23 dB (1 dB louder than our threshold.)

It can take a few moments to wrap your mind around these numbers, but once you do, you'll see that it's really not that complicated. Here's another example; you set your compressor's threshold at -18 dB and your ratio at 2:1. The incoming signal peaks at -12 dB, which is 6 dB above the threshold. Based on your 2:1 ratio, the compressor allows 1 dB to pass for every 2 dB that exceeds the threshold, meaning that the outout from the compressor would be -15 dB, or 3 dB above the threshold of -18 dB.

Fig. 3
In addition to controlling the ratio of our compression, it is also important that we be able to control how the compressor reacts to the beginning of our sound. If the compressor kicks in too soon, it can squash the initial transient, or the spike of energy you see at the beginning of many waveforms (Fig. 3). This is often a bad thing, because the transient is a key part of helping our ears determine the sound that we are hearing, especially in a dense mix. So to help us deal with this, we have the attack control. The attack control allows us to delay the onset of the compression by a predetermined amount of time, usually measured in milliseconds.
The best attack setting for a sound is entirely dependant on the source and what you are trying to accomplish. A good rule of thumb, though, is to use slower attack times on more percussive sounds and faster attack times on more sustained sounds. A snare drum, for example, would probably need an attack time of 15-20 ms or more, to allow the initial crack of the stick to slip through, while a typical vocal track can get away with a much faster attack in the 2-5 ms range.

In Fig. 4, the snare drum recording on the left has been compressed at a 4:1 ratio with a 16 ms attack setting. You can see that the initial transient remains intact, allowing the snare drum to retain most of it's energy. In the image on the right, the same recording has been compressed at the same 4:1 ratio with a much shorter attack of 5 ms, which effectively destroys the initial transient and will probably leave the snare drum fighting to be heard through the mix. Another side effect of this is that, if you increase the level of the snare drum so that it can be heard in the mix, you also increase the level of the hi-hat and kick drum leakage (the smaller peaks in between the larger peaks of the snare drum hits) along with it, reducing the separation between your individual drum tracks.

Fig. 4

Setting Compressor Attack by Production Notes Blog

So as you can see, the ability to adjust the attack time for particular sounds is essential. But just as we need to be able to control the way the compressor reacts to the beginning of our sound, we also need to have control over how it reacts to the end of our sound. The release control allows us to tell the compressor how quickly to stop compressing our sound once it has gone back under the threshold level. This is very important because too long of a release can cause sounds that come after the peaks we are controlling to be turned down, and too short of a release can cause a compression artifact called pumping. This occurs when the compressor reacts to the beginning of the peak by reducing volume, but releases the compression too early, causing the end of the sound to be louder in volume than the beginning. You hear this often in broadcast radio where compressors are permanently set for heavy amounts of compression with fixed attack and release times.

There is a fifth parameter that, while not commonly included as a user-definable setting, is incorporated into every compressor design. This parameter is called the compressor's knee, and it comes in two main flavors: hard knee and soft knee. With a hard knee setting (Fig. 5a), the compressor will begin to act on the signal with the full amount of compression as soon as the signal crosses the threshold. With a softer knee (Fig. 5b), the compressor actually starts to compress the signal gently as the level begins to near the threshold, and continues to increase the compression ratio up to the pre-determined setting once the signal level crosses the threshold. This more gradual introduction of the compression effect can make the compression sound more natural on many sources, such as vocals. On compressors that do allow user adjustment of the knee, you will often find that it is continuously variable, giving you the freedom to tailor the compressor's response to your source.

Fig. 5a: A compressor with a hard knee setting. Notice that once the signal reaches the threshold
(represented here by the vertical orange line), the compression kicks in instantaneously.

Fig. 5b: A compressor with a soft knee setting. Notice that the compression is applied much
more gradually as the signal level approaches the threshold.

One important thing to note is that while all compressors will incorporate each of these five parameters in some form or another, not all will have them available as user adjustable settings. Many classic compressors consisted of only a couple of user adjustable controls, with the others being permanently set by the manufacturer. This may not sound like the optimal situation, but some of the greatest compressors in history were configured in this way and worked wonderfully, albeit not on every source. For example, the Universal Audio LA-2A, still being manufactured today, is a simple 2 knob compressor that has become legendary for the smooth, silky quality it imparts to vocals, but because of it's relatively slow release time, it doesn't usually work well for shorter, attack oriented sounds like drums.

In part two, we will discuss how and when to use compression, and some common settings for the various sounds you may be confronted with in your mixes.

No comments:

Post a Comment