Wednesday, May 14, 2008

Compression for beginners

Dynamics processing is a dangerous but essential beast in audio processing. It is also one of the most important effects in the mastering process of a song. But before we begin, I must refer you to the problem with over-compression:

Ear-fatigue and excessive loudness as described by turnmeup.org

Dynamics processing (compression/limiting/expansion/gating etc...) is an essential tool in getting the right mix of sound, but if abused, can totally ruin the listen-ability of a track or album. Don't think that louder is always better, monitor your songs at different volumes (via your amplifier volume control) before deciding on your final settings.

Ok, so now that that's out of the way, I can introduce the wonderful things dynamics processing can do for you. The most common, is to increase the presence of dynamic midtones.

I once heard an explanation of a compressor as a man sitting at a volume knob, auto adjusting the signal's gain, based on how loud the incoming signal is. This is a neat little visual that helps beginners understand some of the settings.

Compression is the most commonly used form of dynamics processing. In the LADSPA set, there are a number of compression plugins: SC4 (as well as the other SC numbers), SE4, TAP Dynamics, Dyson Compressor, C* Compress, and Simple Compressor. There's also the compressors inside JAMin that have specific frequency bands, along with many other mastering tools. For now, we'll look at SC4, by Steve Harris, for the example as JAMin's tools deserve a full post on their own. Here's a look at SC4 hosted in Ardour:

Compressors track the amplitude (either sample level or RMS level) of the incoming signal and adjust the output volume according to it's settings. Quite often the compressor's settings are pictured as a dynamics graph. Unfortunately, no LADSPA plugin has done this as it is quite helpful for beginners to understand things, and for novices to see the settings (I don't think it's even possible in the LADSPA language). However, JAMin does have some nice graphs for its multiband compressor (see below):

The graphs can be read with the incoming level on the x-axis, and the corresponding output level on the y-axis (the thick black horizontal line is 0db). The red graph shows no change to the sound, while the other two have similar characteristics (though the green has more makeup gain and a sharper knee).

The most important setting on a compressor is the threshold level. This sets the threshold db level for the compressor to begin lowering the gain. The red graph has a threshold of 0db and therefore is never triggered to begin turning the volume down (though other settings also need to be set properly for this to truly occur). The threshold can be most clearly seen on the green graph, though the same threshold setting was used on the blue one. It is essentially the joining point between the two vectors of gain settings.

The knee setting on compressors can be seen best in the blue graph. It softens the joining point between the two vectors. SC4 has theirs labeled as the knee radius in db, which can be visualized better if you imagine a full circle nestled into the threshold as tight as it can go. A softer knee (i.e. a larger knee radius) will effectively give you a decrease in volume (more compression) around the threshold area and an overall smoother curve to your compression (but less precision on the threshold point).

The ratio could also be argued as the most important setting on a compressor; it determines the ratio at which the signals above the threshold are compressed. A ratio of 1:1 would nullify the compressor - what comes in is what goes out (the red graph could be achieved with this, though I did it with a threshold of 0db). A ratio of 2:1 means that for every 2db increase (from the threshold) in the incoming signal the increase will be cut to 1db in the output. The ratio on the green slope is about a 4:1. Graphically, the ratio is the inverse slope (i.e. 2:1 has a run of 2 and a rise of 1 - and slope is rise over run 1/2).

So far all the compressor has done is turned down the volume during the loud bits, which makes the overall mix quieter. The makeup gain is there to boost the signal back to a healthy level. A good rule of thumb is to always have a similar volume level coming out as you had going in (though not exactly), this helps the ear understand what the compressor has actually done to the sound as music is perceived differently at different volumes.

Attack and release times are the speed at which the little man inside the compressor reacts to the incoming signal in his changing of the gain knob (attack being how fast he turns it down after an attack is sensed, release is the other way round). These settings allow for fine tuned control over the sound, such as allowing the attack transients through. Attack settings will limit the amount of makeup gain you can have without your attacks clipping, so watch out. Release settings should be used where the instrument has a slow release time itself.

The SC4 compressor has a nice feature of RMS/peak mix. This allows you to select the mix between RMS or peak envelope following. RMS is generally a more natural sounding compression as its values are closer to what the human ear perceives as loudness. Peak values are more useful if you're wanting to decrease sharp spikes in the sound source.

Lastly, but not least is the sidechain input that can be found on some compressors (such as SC2 and SC3). What this does is allows you to control the gain of a particular track (just as you would in any other compressor) but with a separate input source providing the gain reduction control (i.e. the little man is listening to an entirely different track - the sidechain input - adjusting the gain accordingly, but he's effecting the track he's not paying attention to). This effect is most commonly used in electronica where the kick drum needs to be very prominent. The bass line is compressed with the kick drum as the sidechain input, allowing the kick drum to stand out as the most prominent low-end instrument without having the bassline whimper away.

This covers the basics of what compressors do, but by no means gives you an explanation on how to effectively use them (I shudder to think of the over compressed songs that will now be created). Some of the only parting words I can offer is that less is more.... LESS IS MORE. Don't kill your dynamic range just to make things sound louder - your listener will just turn the track down and all you've done is squash the waveform to a pulp. Play around, and when you think you've got it right, reduce the settings a bit; less is more.

1 comment:

Compressors in Pakistan said...

It's a nice post and have much information...
Air Usage Audits