Dynamic range compression


Dynamic range compression or simply compression is an audio signal processing operation that reduces the volume of loud sounds or amplifies quiet sounds, thus reducing or compressing an audio signal's dynamic range. Compression is commonly used in sound recording and reproduction, broadcasting, live sound reinforcement and some instrument amplifiers.
A dedicated electronic hardware unit or audio software that applies compression is called a compressor. In the 2000s, compressors became available as software plugins that run in digital audio workstation software. In recorded and live music, compression parameters may be adjusted to change the way they affect sounds. Compression and limiting are identical in process but different in degree and perceived effect. A limiter is a compressor with a high [|ratio] and, generally, a short [|attack time].
Compression is used to improve performance and clarity in public address systems, as an effect and to improve consistency in mixing and mastering. It is used on voice to reduce sibilance and in broadcasting and advertising to make an audio program stand out. It is an integral technology in some noise reduction systems.

Types

There are two types of compression: downward and upward. Both types of compression reduce the dynamic range of an audio signal.
Downward compression reduces the volume of loud sounds above a certain threshold. The quiet sounds [|below] the threshold remain unaffected. This is the most common type of compressor. A limiter can be thought of as an extreme form of downward compression as it compresses the sounds over the threshold especially hard.
Upward compression increases the volume of quiet sounds below a certain threshold. The louder sounds above the threshold remain unaffected.
Some compressors also have the ability to do the opposite of compression, namely expansion. Expansion increases the dynamic range of the audio signal. Like compression, expansion comes in two types, downward and upward.
Downward expansion makes the quiet sounds below the threshold even quieter. A noise gate can be thought of as an extreme form of downward expansion as the noise gate make the quiet sounds quieter or even silent, depending on the floor setting.
Upward expansion makes the louder sounds above the threshold even louder.

Design

The signal entering a compressor is split; one copy is sent to a variable-gain amplifier and the other to a side-chain where the signal level is measured and a circuit controlled by the measured signal level applies the required gain to the amplifier. This design, known as a feed-forward type, is used today in most compressors. Earlier designs were based on a feedback layout where the signal level was measured after the amplifier.
There are a number of technologies used for variable-gain amplification, each having different advantages and disadvantages. Vacuum tubes are used in a configuration called variable-mu where the grid-to-cathode voltage changes to alter the gain. Optical compressors use a photoresistor stimulated by a small lamp to create changes in signal gain. Other technologies used include field effect transistors and a diode bridge.
When working with digital audio, digital signal processing techniques are commonly used to implement compression as audio plug-ins, in mixing consoles, and in digital audio workstations. Often the algorithms are used to emulate the above analog technologies.

Controls and features

A number of user-adjustable control parameters and features are used to adjust dynamic range compression signal processing algorithms and components.

Threshold

A compressor reduces the level of an audio signal if its amplitude exceeds a certain threshold. Threshold is commonly set in decibels, where a lower threshold means a larger portion of the signal is treated. When the signal level is below the threshold, no processing is performed and the input signal is passed, unmodified, to the output. Thus a higher threshold of, e.g.,−5 dB, results in less processing, less compression.
Threshold timing behavior is subject to attack and release settings. When the signal level goes above threshold, compressor operation is delayed by the attack setting. For an amount of time determined by the release after the input signal has fallen below the threshold, the compressor continues to apply dynamic range compression.

Ratio

The amount of gain reduction is determined by ratio: a ratio of 4:1 means that if input level is 4 dB over the threshold, the output signal level is reduced to 1 dB over the threshold. The gain and output level has been reduced by 3 dB. Another way of stating this is that any input signal level over the threshold will, in this case, be output at a level which is only 25% as much over the threshold as its input level was.
The highest ratio of :1 is often known as limiting, and effectively denotes that any signal above the threshold is brought down to the threshold level once the attack time has expired.

Attack and release

A compressor may provide a degree of control over how quickly it acts. The attack is the period when the compressor is decreasing gain in response to the increased level at the input to reach the gain determined by the ratio. The release is the period when the compressor is increasing gain in response to reduced level at the input to reach the output gain determined by the ratio, or, to unity, once the input level has fallen below the threshold. Because the loudness pattern of the source material is modified by the time-varying operation of compressor, it may change the character of the signal in subtle to quite noticeable ways depending on the attack and release settings used.
The length of each period is determined by the rate of change and the required change in gain. For more intuitive operation, a compressor's attack and release controls are labeled as a unit of time. This is the amount of time it takes for the gain to change a set amount of dB or a set percentage towards the target gain. There is no industry standard for the exact meaning of these time parameters.
In many compressors, the attack and release times are adjustable by the user. Some compressors, however, have the attack and release times determined by the circuit design and cannot be adjusted. Sometimes the attack and release times are automatic or program dependent, meaning that the behavior may change depending on the input signal.

Knee

Another control a compressor might offer is knee selection. This controls whether the bend in the response curve between below threshold and above threshold is abrupt or gradual. A soft knee slowly increases the compression ratio as the level increases and eventually reaches the compression ratio set by the user. A soft knee reduces the potentially audible transition from uncompressed to compressed, and is especially applicable for higher ratio settings where the changeover at the threshold would be more noticeable.

Peak vs RMS sensing

A peak-sensing compressor responds to the peak level of the input signal. While providing tighter peak level control, peak level sensing does not necessarily relate to human perception of loudness. Some compressors apply a power measurement function on the input signal before comparing its level to the threshold. This produces a more relaxed compression that more closely relates to human perception of loudness.

Stereo linking

A compressor in stereo linking mode applies the same amount of gain reduction to both the left and right channels. This is done to prevent image shifting that can occur if each channel is compressed individually.

Make-up gain

Because a downward compressor only reduces the level of the signal, the ability to add a fixed amount of make-up gain at the output is usually provided so that an optimum output level is produced.

Look-ahead

The look-ahead function is designed to overcome the problem of being forced to compromise between slow attack rates that produce smooth-sounding gain changes, and fast attack rates capable of catching transients. Look-ahead is implemented by splitting the input signal and delaying one side by the look-ahead time. The non-delayed side is used to drive the compression of the delayed signal, which then appears at the output. This way a smooth-sounding slower attack rate can be used to catch transients. The cost of this solution is added audio latency through the processor.

Uses

Public spaces

Compression is often applied in audio systems for restaurants, retail, and similar public environments that play background music at a relatively low volume and need it compressed, not just to keep the volume fairly constant, but also to make quiet parts of the music audible over ambient noise.
Compression can increase average output gain of a power amplifier by 50 to 100% with a reduced dynamic range. For paging and evacuation systems, this adds clarity under noisy circumstances and saves on the number of amplifiers required.

Music production

Compression is often used in music production to make instruments more consistent in dynamic range, so that they "sit" more nicely in the mix with the other instruments. Vocal performances in rock music or pop music are compressed for the same reason.
Compression can also be used on instrument sounds to create effects not primarily focused on stabilizing the volume. For instance, drum and cymbal sounds tend to decay quickly, but a compressor can make the sound appear to have a more sustained tail. Guitar sounds are often compressed to produce a fuller, more sustained sound.
Most devices capable of compressing audio dynamics can also be used to reduce the volume of one audio source when another audio source reaches a certain level; this is called side-chaining. In electronic dance music, side-chaining is often used on basslines, controlled by the kick drum or a similar percussive trigger, to prevent the two from conflicting, and provide a pulsating, rhythmic dynamic to the sound.