Posts Tagged ‘compression’

mixing

Compression part 2 – Attack and Release

The uses of attack and release during compression

December 29th, 2010

It’s been a busy Christmas period, but as promised, here is the second half of my compression tutorial!

If you are not yet familiar with what a compressor is and what it is used for, I suggest you have a look at the first part of this tutorial, ‘compression – controlling dynamics’. If you already know all the basics, read on :)

In the first part we have covered the volume threshold, compression ratio, and make-up gain parameters of the compressor. Today we will be looking at the attack and release parameters.

Attack & Release

When a sound overshoots the volume threshold, the compressor does not instantly apply the full compression to the overshooting signal. Instead, the compression ratio increaeses gradually from 1:1 to the maximum within a certain amount of time. This time is called the attack time.
When the sound drops back below the threshold, the compressor does not instantly stop compressing the sound. Instead, it gradually reduces the compression ratio until it reaches 1:1 again. This time is called the release time.

Let’s look at some examples. Assume our signal looks as follows:

Note that I deliberately left out any dB indications on the threshold. For the theory presented here, the actual loudness of the signal is irrelevant.
If we now compressed this signal with the specified threshold and a compression ratio of 1:4 while leaving both the attack and release times set to 0ms, the output would (theoretically) look like this:

Applying compression with extremely short attack time will cause the signal to be almost instantly compressed with maximum ratio when the level overshoots the threshold. Applying compression with extremely short release time will cause the signal to be almost instantly released to no compression when the signal falls below the threshold. Since sudden jumps in volume can cause an instrument to sound unnatural or distorted, we generally want to avoid extremely short attack and release times.
Here is what our compressed signal would look like if we used a little bit of attack and release time.

Notice how the compression gradually increases and gradually releases when the signal level crosses the threshold. This compression would sound alot more natural than using 0ms for attack release times, but whether it is appropriate will depend alot on the style of music and the instrument you are compressing.

Emphasizing attack

Assume you have a bass track, but the bass itself sounds flat and is lacking in attack.
If we compress the signal with a little bit of attack time (~ 10-20ms) and a release time to match the speed of the bass (long enough to fully release before the next note is struck), we can increase the punchiness of the bass.

This works by letting the initial spike of the signal, the attack, through and compressing the rest of the signal. We can then raise the entire signal and thus increase the relative loudness of the attack.

The signal will have a natural peak when the bass is being struck. We set the thresold so that this attack crosses the threshold and thus triggers our compressor. Because we do not want to compress/reduce this initial peak, we set the attack time to the duration of this peak, if not a little bit longer. The release time is set to be long enough for the trailing part of the signal to be compressed, but not so long that the compressor is still active when the next note on the bass is struck.

Note that only the part of the signal after the initial attack is being compressed. We then raise the entire signal by using the appropriate make-up gain and therefore end up with a signal with an increased attack :) Be careful not to clip your signal when applying the make-up gain.

Let’s have a listen to an actual example!

Here is the bass drum track we will be working with. To be honest, I do not find the bass drum to be too terribly flat, but let’s assume we want to increase the attack a little bit anyways.

[audio:examples/19_12_2010_Compression_Part2/bass_drum_no_compression_solo.mp3|titles=Bass drum before compression (solo)]

In the context of the full drum track, this is what our uncompressed bass drum sounds like:

[audio:examples/19_12_2010_Compression_Part2/bass_drum_no_compression_full.mp3|titles=Bass drum before compression (in context)]

Here is the compressed bass drum track. I used a compressor with 10ms attack time and 400ms release time and a ratio of 1:2. Notice that there seems to be a little bit more ‘smack’ sound to the bass drum now.

[audio:examples/19_12_2010_Compression_Part2/bass_drum_10msattack_400msrelease_compression_solo.mp3|titles=Bass drum with increased attack (solo)]

In the context of the full drum track, the bass drum now sounds clearer and stands out a little more.

[audio:examples/19_12_2010_Compression_Part2/bass_drum_10msattack_400msrelease_compression_full.mp3|titles=Bass drum with increased attack (in context)]

Notice that the compression effect is fairly subtle (at least to my ears) which is due to a low compression ratio and a threshold that only affects the signal directly below the peaks of the signal. This way the bass drum maintains its natural feel.

This very same technique can also be applied to cut the reverb of an instrument. Simply don’t apply the make-up gain and the compression will reduce the part of the signal after the initial attack.

Increasing Sustain

Compression is also often used to give an instrument more sustain, like a lead or bass guitar. It works on the exact same principles as increasing the attack of a signal, but is somewhat the inverse effect.

In order to increase sustain, we want to raise the part of the signal after the initial attack. We can do this by compressing only the attack and raising the entire signal, thus increasing the relative loudness of the signal after the initial spike.

Notice that in the uncompressed signal, the level falls off quickly after the initial attack. What we want to do is de-emphasize the initial spike so we can raise the entire signal and the loudness of the signal does not fade away as fast any more. To do this, we need to set the attack time to 0ms (or as short as possible on your compressor) so the compressor clamps down immediately and we need to set the release time to 0ms (or as short as possible) so the compressor releases as soon as possible and does not decrease the signal after the attack.

In the diagram above, the initial attack is being compressed, but the signal below the threshold is unaffected. Now we can apply the make-up gain to raise the entire signal until the attack is at the same level as before. The relative volume of the trailing sound has been increased, adding more sustain to the instrument :)

Again, let’s listen to a concrete example!

I prepared where the bass guitar notes are fading away too fast. Sorry for the ugly fluctuation at the end of the track, I cut the sustain manually and was a bit sloppy at the end of the track.

[audio:examples/19_12_2010_Compression_Part2/bass_guitar_no_sustain_solo.mp3|titles=Bass guitar lacking sustain (solo)]

When played together with the drum track from the earlier example you can feel a gap coming up everytime the bass fades away too quickly, leaving only the drums playing.

[audio:examples/19_12_2010_Compression_Part2/bass_guitar_no_sustain_full.mp3|titles=Bass guitar lacking sustain (in context)]

In order to add sustain to the bass I used a compressor with 2ms attack time (shortest possible), 10ms release time (shortest possible) and a ratio of 1:2. Again I wanted this effect to be rather subtle, but you can clearly hear alot more sustain in the bass even though my settings are fairly conservative.

[audio:examples/19_12_2010_Compression_Part2/bass_guitar_added_sustain_solo.mp3|titles=Bass guitar with added sustain (solo)]

The track with the drums now sounds fuller and does not contain the obvious ‘holes’ it had before.

[audio:examples/19_12_2010_Compression_Part2/bass_guitar_added_sustain_full.mp3|titles=Bass guitar with added sustain (in context)]

Pumping & Breathing

Compression is a great tool for many things, but there are a few things to be aware of. Besides potentially making your instruments sound rather unnatural due to too much compression, another artefact that can sneak into your tracks is pumping or breathing.

Pumping occurs when the compressor’s release time is so long that, when the next note is played, the compressor is still active and thus the new note is not compressed in the same way as the one before. This causes the overall loudness of your track to fade in and out, creating a pumping effect.

I have prepared a drum track with pumping. The compressor is activated by the bass drum kick, but the release time is so long that the compressor is still active when the hi hat notes are played, creating the feeling that the hi-hats are fading in. This is pumping.

[audio:examples/19_12_2010_Compression_Part2/drums_pumping_and_breathing.mp3|titles=Drum track pumping]

Breathing is essentially the same thing as pumping except that the volume fluctuations occur in high frequency noise that may be part of your mix. It will sound like someone is breathing in the background of your tracks, which is where the term comes from :)

Pumping is not always unwanted though. Especially in dance/techno music it is frequently used to give the bass or drums a more vivid beat.

Tips & Tricks

I feel like I could talk (drone) on about this topic for another few pages, but this has been the longest and hardest post to write for me so far, so I’m going to leave you with just a few tips and tricks instead.

  • It is better to compressor more frequently in a subtle way than to compress once heavily. Your results will sound more natural
  • Before setting up your compressor, have a look at your track. Take note of the maximum dB as well as the time of your signal attack and the time between notes. This will make it alot easier for you to choose appropriate compressor parameters
  • For percussive instruments, use a little bit of attack time. This will avoid making the instruments sound ‘blunt’
  • How much and what type of compression is appropriate will depend on the instrument, the type of music and the effect you’re after
  • Some compressors have a hold parameter. This parameter specifies the time before the compressor is allowed to release again. It ‘holds’ the compression for a certain amount of time
  • Side-chain compression is supported by some compressors. It allows you to use a separate input signal to determine when the compressor will activate and release
  • Ducking is a type of side-chain compression and is often used in radio shows where the music will be ‘ducked’ under the disc jockey’s voice when he starts talking
  • De-essing is a type of compression where only certain mid/high frequencies are compressed to suppress overemphasized ‘s’ sounds in a vocal performance

I might cover some of these in more depth later on, but for now I hope this compression tutorial was helpful to you and feel free to let me know if anything is still unclear :)

tutorial

Compression Part 1 – Controlling Dynamics

The basics of compression

November 27th, 2010

Compression is used extensively in most modern musical styles and is a great tool to have in your skill set. Compression is a complex tool and while it is (fairly) easy to get your head around it, it takes a lot of time and practice to master. Even I still have a long way to go, but I want to share what I have learnt so far anyways :)

What is compression and why should you care?
Rather than just talking about it, let us use a concrete example instead. Listen to the following bass line!

[audio:examples/27_11_2010_Compression/bassline_original.mp3|titles=Bass Line - Original]

I hope that does sound awful to your ears – because it is! The dynamics of the bass are all over the place, there are really soft and really loud notes played erratically and it’s hard to get a good feel for the rhythm. If you look at the waveform of the bass line, you can clearly see the abrupt changes in volume.

Now if you ever record a track like that, I’d urge you to “flush and re-record”. Working with a horrible recording makes mixing difficult and your final sound quality will suffer if you end up processing the signal too much! However, for the sake of this example, let’s assume you have no chance to re-record and are stuck with this inconsistent bass line. Good news is that we can apply compression to even out the dynamics of the track :)

Essentially, compression takes all sound waves above a certain volume threshold and reduces their excess volume by a specified (compression) ratio. It is important to remember that only the overshoot will be compressed, not the entire signal. This allows us to push down the peaks of a signal and reduce the volume fluctuations of the instrument track.

For our bass line example, I will start off with a threshold of -24dB and a compression ratio of 1:4. This will cause any sound louder than -24dB to have its excess volume reduced to 1/4th of its original output volume.

The red lines mark the -24dB line that we will be using as our compression threshold.

Notice that after compression all levels that exceeded the -24dB threshold have been reduced.

Listen to the compressed version.

[audio:examples/27_11_2010_Compression/bassline_compressed_24_4_8.3.mp3|titles=Bass line - Compressed]

You should be able to hear that the overall volume fluctuations of the bass line have been reduced and the bass line sounds more consistent. Notice that the overall volume of the signal has diminished. However, by compressing the peaks of the signal, we have freed up some headroom so we can increase the gain of the entire signal by a certain amount, called the make-up gain, to compensate for this loss in volume. I will use a make-up gain of 8.3dB to bring the level back up to where it was before compression. Be careful to avoid clipping when using make-up gain.

The following image shows the waveform of the compressed bass line after the make-up gain has been applied.

Again, here is the audio example. Compare it to the original bass line.

[audio:examples/27_11_2010_Compression/bassline_compressed_gain_24_4_8.3.mp3|titles=Bass line - Compressed & gain adjusted]

It’s not perfect, but can you hear how much more even the sound of the bass line has become? Compression is a great way to control the dynamics of an instrument and even them out. The loudness of the overall bass line has also increased because we pushed down the peaks and raised the level of the entire signal up to compensate.

One thing you have to be wary of is overcompression. Too much compression can lead to a very flat and dead sound and, because you typically apply make-up gain to make the quieter parts more prominent, you also increase the volume of any noise in the signal and decrease the signal-to-noise ratio (which is not a good thing). Here is an example of the above bass line overcompressed with a threshold of -40dB, a compression ratio of 1:8 and a make-up gain of 23.5dB.

Notice how our threshold is so low that almost the entire signal will be compressed and not just the peaks.

The waveform of the overcompressed bass line looks almost like a square – all dynamics have been squeezed out of it.

Have a listen to this overcompressed bass.

[audio:examples/27_11_2010_Compression/bassline_compressed_gain_40_8_23.5.mp3|titles=Bass line - Overcompressed]

In this example, the life as well as the natural sound of the bass has been squeezed out of the bass line and a lot of low noise that was present in the signal has been increased in volume by using too much make-up gain.

While compression has a distinct sound that experienced sound engineers can pick up on very easily, most people (including me to some extend) will hardly notice even strong compression. I do hope you notice the ugly compression sound in the overcompressed example tho ;)
Compressed instruments usually sound thicker, more compact and punchier, which makes compressors popular to use for kick, snare or bass tracks. It is also used for vocal tracks, but simply to even out the dynamics a little like we did in this example.

In order to preserve the natural sound of your instrument track, it is usually better to compress a signal more frequently by a little bit than to compress it a lot once.
I like to start off with a fairly high threshold (so little of my signal is affected) and a small compression ratio (approximately 1:4 is fairly common) and then adjust your parameters based on what it is I am mixing. Compression is best learnt through experimentation and feel free to download the above bass line and play around with it :)

Wait!
Stop!
You didn’t mention the attack and release parameters!

Yeah I know, but I’m feeling like this post is already getting way too long and those compressor parameters are important enough to warrant a separate post to cover them properly. I will write about them soon – promise :)