In music production, an audio compressor is a sound effect (i.e., either an analog hardware unit or a digital audio software plugin) designed to reduce the dynamic range (DR) of the source material or entire mix as a means to either smoothly or aggressively control volume fluctuations.

Sometimes it's used for sound design purposes e.g., sidechain compression often heard in Electronic Dance Music (EDM) and the rest of the other sub-genres that fall under it. There are also audio compressors often referred to as Levelers and in a nutshell, leveling can be achieved simply by making use of slow or long attack and release times

Downward compression​

Most compressors (including brickwall mastering limiters) work by taming transients or clamping down on audio peaks after the user-defined threshold level is exceeded by an input signal, but this doesn't do anything to quiet sounds since only loud parts are squashed gently or into smithereens depending on the amount of gain reduction (GR).

With that said, this type of dynamic range compression is known as downward compression which is frequently used or perhaps abused in both fields of sound mixing and audio mastering.

Upward compression​

Alternatively, there is another form of audio compression which is known as upward compression and this is when a compressor leaves the loud parts of an input signal alone but brings up the quiet sounds which are below the user-defined threshold level.

N.B., parallel compression otherwise referred to by some sound engineers as New York compression kinda creates similar effects to upward compression.

Multiband compression​

Other professional audio compressors have multiple bands of the input signal's frequency spectrum split apart whilst at the same time, each band thereof has its own distinct dynamic range compression settings (i.e., threshold, ratio, knee, attack, release or recovery, etc.).

In essence, the aforementioned is what differentiates multiband compressors from widely used broadband compressors, which do not divide or split the program material into multiple frequency bands either employing minimum-phase IIR (infinite impulse response) or linear-phase FIR (finite impulse response) filters, for example:

Band-splitCrossover frequency range
Band 10 – 50 Hz
Band 250 – 150 Hz
Band 3150 – 500 Hz
Band 42 kHz – 8 kHz
Band 58 kHz – 20 kHz

Common controls found on a compressor​

Listed below are common parameters found on generic analog compressors or modern digital audio software plug-ins. In addition, the definitions below are only guidelines since compressors are designed differently.

This is due to notable designs varying from Optical (opto), FET (field effect transistor), VCAs (voltage controlled amplifier) Vari-mu (tube), Diode Bridge compressors including other different modes e.g., FF/FB (feedforward or feedback topology) can make pro audio dynamic processors exhibit a wide range of unique attack, release and gain reduction characteristics.

Its nameIts purpose
Attack (att)This is reaction time—how quickly you want a compressor to reach maximum GR (depending on how it's designed) when the leading edge of your sound (transient) and the rest of its body (sustain) exceeds the threshold level.

N.B., some compressors have a fixed or a variable program-dependent attack time.
Release or Recovery (rel)This is how fast or slow you want a compressor to go from full-on GR to 0 dB GR when the volume hovers around or completely drops below the threshold level.
RatioThis defines how ruthless or compassionate you want a compressor to behave when unruly impudent peaks are nagging you, m'kay.

High ratios e.g. 8:1, 10:1, 20:1, and upwards trigger more aggressive behavior, and vice versa low Ratios e.g. 1.2:1, 1.5:1, and 2:1.

In audio mastering low ratios are often used for their gentleness although, for the most part, you don't really need to use one.

N.B., some compressors have a fixed ratio whilst some have a ratio that's adaptive to the amount of gain reduction going on.
Threshold (thres)This is the dBFS or RMS (average level) that triggers everything to start working. If nothing goes past whatever level you've chosen there won't be any action except boxtone (i.e., the base sound of a compressor when all dials are flat).

N.B., some compressors have a fixed threshold.
Dual Mono, Channel, Stereo Linking (or Independence)This is how you tell a compressor what to do when there's a volume difference between the left or the right channel if the input signal is in stereo.

If you set this to dual mono or completely unlinked, GR will occur discretely to both L/R channels resulting in a wider sound whereas fully stereo-linked compression (or brickwall limiting) can make things sound more mono. You ought to avoid it like a plague and devote yourself to a brave new true religion of "Dual Monotheistic" compression.

N.B., many compressors don't have this option and that's... well, never mind.
Hysteresis (hyst)With hysteresis, you're telling a compressor to set a dedicated higher Threshold for GR to kick in and a dedicated lower Threshold for it to recover (i.e. to back off) relative to whatever "normal" Threshold you set—this is a simple arithmetic problem of adding and subtracting.

If your "normal" threshold is -18 dBFS whilst your hysteresis is 3 dB. What happens is your compressor does nothing if your music is below -15 dBFS (because -18 + 3 = -15) but if it exceeds -15 dBFS, dynamic range compression will occur at the speed defined by the Attack time.

On the other hand, if your music drops below -18 dBFS your compressor does nothing until the level falls below -21 dBFS (because -18 - 3 = -21) for the Recovery (or Release stage) to start doing its thing.

Finally, if your hysteresis is 0 dB. This is self-explanatory, isn't it? Look here mate, it's simple and straightforward -18 + 0 = -18 thusly, your compressor behaves as usual.

N.B., you will rarely come across compressors that have this option.
HoldThis is how you make a compressor edge or surf—to chill a little bit, and "hodl" it right there in a state of climactic gain reduction. Once the time you have specified (i.e., usually in milliseconds) has elapsed your compressor will Recover and ease off gradually or abruptly depending on your Release time.

As a rule of thumb, bear in mind, you don't want a compressor to engage in quick rounds of edging and surfing (i.e. using short Hold times) whilst you have told it to steadfastly meditate upon the sound (i.e. long Lookahead times).

In other words, it isn't a good idea to let it start Recovering when a transient hasn't completely passed through. What you ought to do is to always make sure that either your:
Code:
Hodl time is (equal) == Lookahead time

Hodl time is (greater than or equal to) >= Lookahead time
RangeThis lets you specify in decibels (dB) the maximum amount of GR that should occur regardless of how loud or soft the incoming sounds are. Any further GR will not be applied.
LookaheadThis is how you give a compressor prophetic powers—extrasensory perception by adding a small amount of delay (latency in milliseconds) so that it can see the future (or meditate upon the sound) and begin reacting to the incoming signal before the whole shebang becomes audible to your ears.

N.B., long Lookahead times e.g., roughly starting from 1 ms can soften the leading-edge (transients) of the input signal but can be paired with slow Attack times, fast Release times, and seasoned to taste with the amount of GR you want.
KneeThis is often defined in decibels (dB), it's another way to control a compressor's attitude and temperament.

If you want an aggressive choleric temperament, as it were, particularly for drums and percussive sounds you simply use hard knee compression i.e., 0 dB.

If you want to gently squeeze the sound with sheer tenderness you will never go wrong with Soft Knee compression set to 30 dB, that should do.

N.B., some compressors only give you two options usually by either turning on soft knee compression with the click of a button or switching to hard knee compression.

What is a leveler?​

A leveler is nothing but an audio compressor often (but not always) designed with an RMS detection circuit. The common objective of using a leveler is to keep the volume fluctuations smooth and constant, especially when working with long program material.

In essence, leveling can be accomplished by using slow or long attack and release times with preddy much any modern VST/AU/AXX digital audio compressor. For example, anything above 100 ms attack time and 1 second or 1000 ms release time.

Summary​

The function of an audio compressor is simple; it's automatic volume control. You just have to decide when to turn down the volume (threshold), how fast to turn it down (attack time), how much to turn it down (ratio), and for how long before leaving the signal alone again (release time).
Top