ParametersAll
compressors generally have several common parameters that can be set.
Threshold - this is the level over which the compression will kick in. The setting is in dB (decibel) which a unit of measurement for the volume of a sound. In our moutains example, it would be equivalent to the altitude. The higher the threshold value, the less
compression effect. The more threshold, the higher the
compression effect. Once the
compressor determines the audio is above the
threshold, it then uses the following parameters to continue it's work.
Ratio - This is the amount of
compression that will occur to the audio above your threshold. This is also set in dB but is represented in a ratio notation N:N. For example 5:1 would
compress every 5db over the
threshold to 1db (over the
threshold). So if you had a
threshold of -20db and the audio was at 0db (or +20 over
threshold), the
compressor would
compress the audio so that it resulted in -16db (or +4 over threshold). A general rule is that lower
ratios below 6:1 are called "gentle" and above 6:1 is called "hard"
ratios. Super high
ratios 20:1 and up are called "
limiting"
Attack - this is a time value represented in ms (milliseconds). this is the time it takes the
compressor to react to the audio. A lower value would make the audio more peaky since it is slower to react to the
dynamic changes in the audio.
Release - another time value in milliseconds, this represents how long the
compressor will let the
signal decay back to it's pre
threshold value. This only starts to take effect when the incoming audio signal dips below the
threshold.
Gain/Output - because the net effect of
compression is to
reduce the overall volume, there is usually a parameter to put some volume back to the overall signal. This is called
gain or output and is represented in dB.
Notes
- A compressor can do something called
hard limiting by setting a fast attack, fast or medium release and a high ratio.
- A fast attack can sometimes be used to make a track more punchy.
- You should be careful not to over do the
compression as it can make the sound worse.
- Some forms of extreme
compression can be used to intentionally make the sound unnatural for a specific effect or purpose.
Some more info courtesy of SAE Institute:
Dynamic Range
The Dynamic Range of a sound is the range between the quietest section and it's loudest section or in the case of a recorder the range between the noise floor and the point of distortion. You know how loud a Symphony Orchestra can get yet you also know how quiet it can get. An Orchestra has a wide Dynamic Range.

The meters above show a dynamic range of 72db. On a home cassette recorder the quiet section in this track would be below the noise of the tape recorder and all you would hear through the quiet passage would be tape hiss. The distance from the loudest section to the point of distortion is called the Headroom. If distortion is reached at +6db then we currently have a 4db headroom. To reduce the dynamic range you could ride the whole track with a fader and turn it up when it's too low and pull it back when too high or your can use a compressor.
Compressors
A Compressor can change the input signal to output signal ratio.

In the diagram above unity gain means that what you put in you get out. In the 2:1 ratio example When the signal is above the threshold the signal output is reduced in a ratio of 2db in will give 1db out when the compression ratio is set at 2:1, so you have saved 1 db off the top of your dynamic range and you can turn it all up by 1 db without effecting the headroom. In a more severe case like the 20:1, which is more commonly called limiting, for a 20 db rise in signal only 1 db comes out. The compressor and limiter can be used together in one unit where the compressor works in the 2 - 15:1 range whilst the limiter stops the extreme transient peaks in the signal in the 15 - 20:1 ratios which is why it is often called a Peak Limiter.

In the above graph the threshold of the limiter has been raised so that the main program material will be compressed above the threshold of compression at 2:1 and above the limiting threshold it will be 20:1. A compressor is a gain reduction device, therefore all compressors have a make up gain control so that if you are using 3db of gain reduction you can turn the output by that amount and still retain the same headroom.

In the diagram above the transition from unity gain to compression at the threshold of compression/limiting is gradual instead of a straight line. This is called a Soft Knee threshold and is much smoother.
The Meter on a compressor can usually be switched to read either the input level, output level or the amount of gain reduction. It is advisable to check that the input level is correct before you start adjusting the threshold and setting the compression ratio etc.
The attack time determines how quickly the the compressor reacts to signals above the threshold. Signals have short sharp peaks called Transients that can easily trigger a compressor to act. The attack time determines how long the peak should be above the threshold before compression takes place. These short transients are important in the clarity of a sound but don't effect the loudness of the sound. The aim of compression is to make the instrument sound louder, to squeeze the dynamic range, therefore you may wish to lengthen the attack time and let the transients through (to be dealt with by a limiter if necessary) and the compressor will then be working on sustained levels above the threshold.
The release time determines how quickly the compressor lets go, or restores normal gain. If the release is too fast for the amount of gain reduction applied then the return to normal gain over and over as the signal moves above and below the threshold can cause what is known as pumping because the gain structure is changing rapidly. It is advisable to ask the player to play sustained notes and set the release so the change of gain is smooth. Instruments that have long sustaining notes like bass guitars should tend to use a slower release times than sharp percussive instruments like percussion. Most of the new generation compressors now have an Auto button that leaves it to the compressor to work it out, and they usually do it fine.
Take a look at a typical compressor and its controls:

The left section is the Noise Gate section. It has controls for the threshold at which the gate opens, the release time variable and a switchable fast/slow attack control. The centre section is the compression section with the standard controls over threshold, ratio, attack and release. The Peak/RMS switch determines how the compressor will track the signal i.e. its peak content or its RMS content. The Auto button is often an option where the compressor works out the attack and release times itself by analysing the program material. The hard/soft switch determines the Knee setting. The meter can read input or output levels plus it can read the amount of gain reduction. Finally there i s the makeup gain control (Often just labelled output level) The link button is there if there are two compressors in the unit . Stereo Compressors have a link facility that makes one of the two compressors a master. (Usually the left compressor). All the controls on the master effect the slave compressor, so they both operate together. If the compressors weren't linked, any strong signal on the right would be gain reduced and the stereo image would move because centre panned instruments would vary in their left to right balance so when compressing a stereo signal make sure the compressors are linked.
Similarly take a look at this image of a plugin Compressor by Waves. All the controls are there.

The Electro and Warm options are computer additions not found in a stand alone analogue version. As you can see the threshold is below the peak signal so gain reduction is taking place as indicated in the attenuation meter. The ratio is set at 2.90:1 and there has been no make up gain applied.
The attack time is set to 3.66ms and the release is at 214ms and the control on them is manual (not auto).
Expanders
The expander is a compressor in reverse. There are two types of expander. In some, signals above the threshold remain at unity gain whereas signals below the threshold are reduced in gain, whereas in others the signal above the threshold also has the gain increased. Therefore you can use an expander as a noise reduction unit. Set the threshold to be just below the level of the player when playing. When the player stops the signal will fall below this threshold and the signal is reduced in gain thus reducing the noise or spill.

The drawing above shows the different actions of compressors and expanders. The expander in the drawing is increasing gain above the threshold and reducing gain below the threshold.
Most recording in popular music today has had heavy compression. Recording are loud and in your face! As well as most of the components of a track being individually compressed the whole mix overall has been compressed and limited before going to CD. I don't think that's a bad thing.
Limiters
A limiter is just a severe compressor where the compression ratios are high. On some units like the DBX 160 and the Aleisis compressors an additional Peak limiter control with a LED that flashes is supplied, but units like the Aphex Dominator are pure limiters and are very sophisticated in how they attack and control peaks and you can get some pretty hot "brick wall" mixes through them.
De-Esser
A De-esser is a frequency selective compressor/limiter that compresses only at a predetermined frequency. If set to the frequencies around the sibilance area of a vocal (4kHz - 8Khz, it varies between men and women,) the vocal will be compressed only at those frequencies which will reduce the sibilance. Sibilance is the peaks of high frequencies created by 'S', 'T', 'C's etc.
The new generation
The new generation compressors, expanders gates etc. In the new computer programs are worth a mention here. These compressors have one outstanding advantage over the stand alone compressor. They can read the signal ahead of time by extracting the signal from the hard disk ahead of time, analysing it and then outputting it in real-time. They know what is going to happen next which gives them a distinct advantage in maintaining smooth control over the signal.
Noise Gates
Noise gates are units that let a signal pass if it's above a certain level and shut it down if it's below that threshold.

The diagram above shows how a gate works on level. When the signal falls below the threshold the gate reduces the level to the specified reduction level. The attack time here determines how quickly the gate will open and the release time determines how fast it will close. Some gates have a Hold function that allows you to tell a gate to hold open for a set time once it is open and then the release time can take over and close the gate. This facility can stop the gate opening and closing quickly due to peaks. It can also be used as an effect, especially if it is put over the return from a reverb unit. If you have some reverb on say a snare, and you put a gate over the reverb return signal, you can get the hold function to hold the reverb open for a period set by the hold function and then to quickly close it by using a fast release. This effect is called Gated Reverb and is now a standard program in most reverb units.
A gate can also be set to be triggered by something else via a side chain. For example, if you put a gate over a room ambience mike you could use the snare mike to trigger it to open when the snare was hit and to close when the snare stopped. This is called Gated Ambience. Another effect is to put a hihat feel into the side chain and modulate the gate to open and close on a synth sound.
Gates can also bo linked so that one controls the other and when one opens the other opens as well. (Like the compressor) This is used in stereo gate situations like over stereo toms.