Compression part 2 – Attack and Release

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.

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

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.

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

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.

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.

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.

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

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.

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 :)

Share this post

Search This Site

Recent Posts

Other Posts You Might Like

48 Responses

  1. I can’t leave this site without writing a comment here… This has been BY FAR the BEST tutorial I’ve ever seen and the only one which has helped me to understand clearly the different parameters a compressor has. You explained it technically but so clear and without mistake. Thanks a lot for it, you did an excellent work!

    Too bad I couldn’t hear the samples (maybe because it’s from 2010 and the server took them down), but with the text it’s been perfect already. :)

  2. That’s what I call a perfect explanation! :) I read a bunch of descriptions about compressors and saw some tutorial videos but not even one of them mentioned that the compressor will work BELOW the threshold level. Now I understand why compressors so important and how to use them in EDM. Before I read your article I though that it’s all about the overall volume (the so-called “loudness war”). So: THANK YOU!! :D

      1. I would have a further question: do software comressors work in the same way or is it just how analogue compressors behave? I mean, do they work below the threshold level?

    1. Nothing. The point of a compressor is to compress only the signal that falls above the threshold. Once the signal falls below the threshold the compressor will disengage and release back to no compression.

  3. Absolutely incredible. I have been using compressors for a while – especially in live reinforcement. My experience and ‘ear” training have taught me to use them in the various contexts your have explained and I have figured out which settings work best in each circumstance – but now I have a better understanding of WHY and that will help me greatly!

    Thanks so much!

  4. Perfect explanation of compression.Audio examples really helped to easily understand what you explained.Thank you very much for the excellent and very helpful work well done!.

  5. Very good, just one question. It looks like during the 10ms release time the compressed output is lower than the original signal?

    1. Of course. Because the signal is then below the threshold, so it normally wouldn’t be compressed, but because it’s still releasing the signal is still being compressed a little, gradually coming back to it’s original level.

  6. Good Tutorial . A couple of questions :
    1. When the signal goes above the threshold , the compressor acts and the compressed signal is still above the threshold . Am I correct ?
    2. When the first signal is above the threshold and the second signal is below the threshold . Release time is the time taken for the compressor to disengage when going from the first signal to the 2nd signal ?

    1. 1) yes. its is a compressor, not a limiter. Limiters will create a ‘roof-ing’ effect where no sound can go above the threshold, whereas a compresser will reduce the amount that the sound goes OVER the threshold

      2) yes again! it creates a flowing effect, so the sounds don’t sound boxy

    1. That is a little bit of a confusing question vVgnesh!

      There are 4 solid black horizontal lines, and 1 dotted red line:

      – the dotted red line represents the threshold (a given dB measurement)
      – the 4 black lines all represent 4 differing levels of signals from the input, which can be instruments or vocals or anything you are working with (also dB measurements)
      i.e. :
      – 1st signal = quiet
      – 2nd signal = loud
      – 3rd signal = moderate
      – 4th signal = quiet

      The vertical lines between each horizontal line are merely the change in signal volume.

      The top graph represents no compression.
      The bottom graph represents compression with 0 attack and 0 release.

      There are no dB measurements in the graph to reduce confusion.

  7. Had to stop by and say this is one of the best (if not the best) explanations and graphical representations of attack and release times. Thanks so much and congrats to a great article!

  8. Hi. Great explanation! Can you clarify something for me though please?

    If the attack is set to trigger with a longer response time than the actual length of the peak which is above the threshold, will the compressor simply miss that part out because by the time it is set to trigger the signal has already passed back to below the threshold and therefore it has nothing to compress? Thanks!

    1. Yes that is correct. This is often used to let through (part of) the initial kick or bass impact before compressing the rest of the sound. The compressor will only kick in slowly and if your attack time is slow, it will take a moment before it reaches maximum volume reduction.

  9. Thanks a lot! I’ve just realized why I need to spend money for a good compressor that lets me adjust all the parameters.

    1. You’re welcome! Most compressor plugins should give you access to these settings as they are pretty essential to using a compressor effectively

  10. I’ve read lots of compressor tutorials but only after this one can I say I now understand understand what a compressor does and how. Good job Tobias

  11. I loved reading this! Best compressor explanation on the web. Great tips & tricks too. Please post a Part 3 to emphasize on the tips & tricks???

    1. Hi, thank you for the comment :) Not sure if when (or if) I’ll create a part 3 as this is a very old post. Most of my interest has since shifted into film making and VFX :)

  12. Could you send me the audio files that illustrate the examples? I’ve tried everything to get flash player to work with no success. This is the best tutorial I have come across that explains compression

  13. OMG this is the tutorial i was looking for!! Very concise and straight to the point.

    Thank you so so much for this <3

  14. This is an excellent tutorial – finally read something that I could relate to the real physical activity of making music. So often I’ve read articles that say things like “the attack controls how quickly the compression is applied” without giving a clue about how it does it or what musical difference that makes. Thanks for this I feel like a veil has been lifted…

  15. Hi there! I’ve been trawling the forums trying to find an answer to a particular compression problem I’m having – so far without success. I have a jazz-fusion track with a legato alto saxophone part, with an electric piano (Rhodes, low eighth-note arpeggios) and bass guitar (bright percussive stabs) behind it. There are no drums/cymbals on the track. The sax phrases last several bars each – some single notes are 12 seconds long. Perfectly flat, smooth, clean and even. But the bass and Rhodes ‘hit’ midway through the sax phrases, and cause the sax to quaver and wobble (only slightly but unacceptably) like a bleating lamb. I’ve tried all sorts of compression settings, sidechaining, and so on, but I CANNOT get the sax to stay ‘unmolested’. I need the shock value and dynamics of the bass and Rhodes, but all I get is pumping, breathing, wobbling, fluctuating… Whatever it is, it’s intolerable. Most help articles seem to want the opposite of what I’m after (i.e. they explain how to break up the sax line, or interrupt a sustained guitar chord which is exactly what I’m trying to avoid). Is there a simple solution, or am I looking for the impossible? Should I abandon compression altogether? It’s incredibly frustrating!
    Any ideas?

  16. Sir! First time posting a comment on sites. Just wanted to say thank you for clearing my mind about compression. Respect from Slovenia!

  17. This is seriously great man thanks so much. I know it’s 2018 so I might be quite a few years late to the party but was wondering if you could just clarify one thing for me. So from my understanding let’s say the threshold is 0db and the ratio is 2:1. The signal reaches 2 db and therefore only 1db signal gets released. Ok fine. But now let’s say the release time is long and the signal dips below the threshold. By the visual representation it appeared the signal went almost silent before raising back up to the uncompressed signal. This all makes sense EXCEPT how is the compressor working at this point? Its very easy to see ok 2:1 ratio = 1 db above ratio there ya go done but how much compression is happening to the signal below the threshold after the dip? How is this measured? Let’s say the signal dropped to -5db with the long release does that mean the 2:1 ratio is then applied to that signal even though it’s below threshold?

  18. Great article. Congrats and thank you very much, it is not easy to find something so clear and logical on this topic.

Leave a Reply

Your email address will not be published. Required fields are marked *