# Compression part 2 - Attack and Release

Back to
December 29, 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]

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

[/audio]

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]

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

[/audio]

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]

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]

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]

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

[/audio]

### 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]

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

Zerpudo
8 Years Ago
August 31, 2012 @ 10:50 pm
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.
Tor
7 Years Ago
November 13, 2012 @ 4:28 am
I agree, this was very logical and precicly explained. thanks so much.
István Bocsor
7 Years Ago
March 6, 2013 @ 8:38 am
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!!
Surfaced Studio@ István Bocsor
7 Years Ago
March 9, 2013 @ 9:42 pm
Thank you very much Always really happy to hear that my tutorials are helpful to other musicians out there!
István Bocsor@ Surfaced Studio
7 Years Ago
March 12, 2013 @ 7:27 am
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?
6 Years Ago
September 28, 2013 @ 5:46 am
If the compressor compresses anything above the threshold, what is it compressing when the input signal falls below the threshold?
6 Years Ago
September 28, 2013 @ 9:29 am
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.
kent dawson
6 Years Ago
March 9, 2014 @ 4:57 am
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!
Chaminda
5 Years Ago
March 21, 2015 @ 5:00 am
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!.
Surfaced Studio@ Chaminda
5 Years Ago
March 21, 2015 @ 0:16 pm
Thank you very much Glad you enjoyed the post!
Jason Price
5 Years Ago
May 6, 2015 @ 0:23 am
Very good, just one question. It looks like during the 10ms release time the compressed output is lower than the original signal?
Ronald Landa@ Jason Price
2 Years Ago
June 30, 2018 @ 0:02 am
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.
4 Years Ago
March 10, 2016 @ 5:13 pm
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 ?
Ed@ Vignesh
4 Years Ago
July 6, 2016 @ 9:33 am
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
Vignesh
4 Years Ago
March 10, 2016 @ 5:50 pm
https://cdn.surfacedstudio.com/2010/12/compression_no_attack_no_release.gif

In the above Image , what does the line just below the threshold represent ?

And what does the lowest line represent ?
Ed@ Vignesh
4 Years Ago
July 6, 2016 @ 10:32 am
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.
Tyrant Moore
3 Years Ago
December 13, 2016 @ 1:24 pm
Absolutely amazing...); Dope explanation...simply genius
Barry
3 Years Ago
March 21, 2017 @ 10:00 am
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!
3 Years Ago
March 27, 2017 @ 10:31 pm
Thank you very much! It's a very old tutorial, glad to hear it's still useful
Sid
3 Years Ago
June 15, 2017 @ 0:47 pm
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!
3 Years Ago
June 18, 2017 @ 0:22 pm
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.
Lucio Crusca
3 Years Ago
July 16, 2017 @ 10:40 am
Thanks a lot! I've just realized why I need to spend money for a good compressor that lets me adjust all the parameters.
Surfaced Studio@ Lucio Crusca
3 Years Ago
July 16, 2017 @ 11:12 pm
You're welcome! Most compressor plugins should give you access to these settings as they are pretty essential to using a compressor effectively
Hoffenheimer
3 Years Ago
July 18, 2017 @ 7:23 am
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
Surfaced Studio@ Hoffenheimer
3 Years Ago
July 19, 2017 @ 9:10 pm
Thank you, glad you found the tutorial useful!
Benjamin Klein
2 Years Ago
October 14, 2017 @ 2:32 pm
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???
Surfaced Studio@ Benjamin Klein
2 Years Ago
October 22, 2017 @ 9:11 am
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
Dan
2 Years Ago
October 18, 2017 @ 7:26 am
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
Dan
2 Years Ago
October 18, 2017 @ 7:43 am
Is there any on EQ
2 Years Ago
October 22, 2017 @ 9:12 am
Don't have any tutorials on EQ on this site, but there's plenty online
Dan@ Surfaced Studio
2 Years Ago
October 29, 2017 @ 5:23 am
Okay, please send me the audio examples via my email. I would appreciate
Justin
2 Years Ago
January 5, 2018 @ 2:54 pm
OMG this is the tutorial i was looking for!! Very concise and straight to the point.
Thank you so so much for this <3
2 Years Ago
January 9, 2018 @ 0:07 am
Thank you for the comment. Great to hear you enjoyed the post!
SimonM
2 Years Ago
January 13, 2018 @ 8:34 pm
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...
2 Years Ago
January 16, 2018 @ 5:53 pm
Thank you so much for the great feedback. It's a really old post, but I'm glad to hear that it's still helping people out today!
2 Years Ago
April 4, 2018 @ 9:07 pm
Hey! Do you mind if I use some of your knowledge and graphs in an upcoming e-book on mixing? I would credit you or your website.
Thanks!
Surfaced Studio@ Wolf Audio Amsterdam
2 Years Ago
May 18, 2018 @ 0:56 pm
As long as you credit appropriately I have no issues with that whatsoever Thank you for asking by the way!
2 Years Ago
May 25, 2018 @ 11:41 pm
Best explanation of compression ever! Why didnt i stumble onto this page before? Good job!
Surfaced Studio@ Matt Avall
2 Years Ago
June 22, 2018 @ 2:44 pm
Thank you very much! Great to hear you found my explanation helpful!
Dan
2 Years Ago
June 18, 2018 @ 6:10 am
Thank you! So helpful to understand the varied use cases for attack and release. ❤️️
2 Years Ago
June 22, 2018 @ 2:46 pm
You are welcome! Great to hear you found the post useful!
Elli P.
2 Years Ago
July 3, 2018 @ 9:57 am
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?
Aljaž
2 Years Ago
July 14, 2018 @ 2:05 am
Sir! First time posting a comment on sites. Just wanted to say thank you for clearing my mind about compression. Respect from Slovenia!
2 Years Ago
July 14, 2018 @ 9:24 am
Thank you for the comment! Great to hear you found the tutorial helpful
zackm
2 Years Ago
August 23, 2018 @ 4:12 pm
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?
Lisa
1 Year Ago
June 29, 2019 @ 10:51 pm

Does this work the same if recording music/vocals?

6 Months Ago
February 24, 2020 @ 8:16 am

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

6 Months Ago
February 29, 2020 @ 8:56 am
Thank you, glad to hear you found the article useful!

|