# Dynamic range compression **Dynamic range compression** is an [[Audio_signal_processing|audio signal processing]] operation that narrows the gap between the loudest and quietest parts of a signal, most often by automatically turning down whatever rises above a chosen level while leaving quieter passages alone, and so reducing the signal's [[Dynamic_range|dynamic range]]. A dedicated hardware unit or software plugin that applies it is called a compressor, and the same operation, pushed to an extreme ratio, becomes a limiter: the two share one design and differ mainly in degree. Compression sits in sound-reinforcement systems, recording and mixing chains, broadcast transmission and many instrument amplifiers, wherever a signal's dynamic range must be narrowed to fit a system's limits or a listener's environment. The microsim on this page implements a real, sample-by-sample compressor: a peak detector tracks the input level, a soft-knee gain computer converts that level into a target gain reduction, and a one-pole attack-and-release smoother shapes how quickly the gain actually moves. Dragging the threshold, ratio, knee, attack, release and make-up gain controls hinges the static transfer curve and changes how the gain-reduction trace recovers between bursts of a test signal, making visible on screen the difference between a fast, clamped attack and a slow release that pumps. ## Types Despite the shared word, dynamic range compression has nothing to do with [[Data_compression|data compression]], which shrinks a file's size rather than a signal's level range; the two operations can be applied to the same audio one after the other without conflict. Compression itself is usually downward: the compressor turns down whatever rises above a threshold, leaving quieter material untouched, the arrangement in every design described throughout this article. The opposite, upward compression, instead raises whatever falls below a threshold without touching the loudest passages, and appears less often on its own than embedded inside multiband or mastering processors as a way of adding perceived loudness without pushing the ceiling any higher. A further distinction, of implementation rather than effect, separates a dedicated hardware unit (a rack-mounted analog or digital box wired into a signal chain) from a software plugin running inside a digital audio workstation; since the 2000s, software compressors implementing the same transfer curves and detector designs as their hardware ancestors have become the more common tool in music production, since one processor license can be copied onto every mix instead of bought once per hardware channel. ## Design A dedicated hardware compressor built its gain computer, working on the [[Analog_signal|analog]] signal directly, around whichever variable-gain element the design era favored: a vacuum tube run at a bias point where its gain depended on level, a light-dependent resistor driven by a small lamp whose brightness followed the input (an optical, or "opto", design, with the gentle, program-dependent time constants that come from a lamp's own decay), or a purpose-built voltage-controlled amplifier chip taking a control [[Voltage|voltage]] computed from the input level. A field-effect [[Transistor|transistor]] run in its linear region as a voltage-controlled resistor gave a cheaper, faster-reacting alternative to the VCA chip. Digital and software compressors dispense with a physical gain element entirely and compute the same gain-reduction curve as [[Digital_signal_processing|digital signal processing]], arithmetic run on a stream of samples, which is why a software compressor can implement a given transfer curve exactly and without drift, where a hardware design could only approximate it with the physics of whichever component did the work. ## Controls and features ### Threshold The threshold is the level, usually given in [[Decibel|decibels]], above which the compressor begins to act; input below it passes unchanged. In the microsim, the threshold ranges from −50 to 0 dB and defaults to −24 dB. ### Ratio The ratio sets how much of each decibel above threshold survives at the output: a ratio of 4:1, the microsim's default, turns 4 dB of overshoot into 1 dB of gain increase. In the microsim, ratio runs from 1:1, where compression has no effect, up to 20:1, high enough that the device already behaves close to a limiter. ### Attack and release The attack and release times set how quickly gain reduction reacts to the input crossing the threshold. A short attack clamps a transient's onset almost immediately; a longer attack lets the transient through before the compressor catches up, a common way to preserve the punch of a drum hit while still controlling the sustained level that follows it. Release works in the other direction, setting how quickly gain reduction relaxes once the input drops back below threshold; a release set too long holds the gain down into the next quiet passage and produces an audible pumping as the level breathes back up between loud events. In the microsim, attack spans 0.1 to 150 milliseconds and release spans 10 to 800 milliseconds, independently of threshold and ratio. ### Knee A hard knee applies the ratio abruptly at the threshold; a soft knee, given a width also in decibels, blends the two slopes together over a range straddling the threshold so the onset of compression is less abrupt to hear. In the microsim, knee width runs from 0 dB, a hard knee, up to 24 dB, and defaults to 6 dB. ### Peak vs RMS sensing A detector that follows the instantaneous peak of the waveform reacts to every transient, which suits limiting, where nothing may ever cross a fixed ceiling. A detector that instead follows a running root-mean-square average reacts to a passage's perceived loudness, riding through brief peaks a peak detector would catch, which tends to give smoother, more programme-dependent gain changes on complex material. The microsim's detector follows peaks; RMS sensing, or a blend of the two, is common in commercial designs aimed at music rather than at protecting a fixed ceiling. ### Stereo linking A stereo compressor processes left and right channels against a single, shared gain-reduction signal derived from both channels together, so a loud event on one side does not pull that channel down alone and shift the stereo image toward the other. Unlinked, independent per-channel compression can move a mix's apparent stereo position as each channel's gain moves on its own. ### Make-up gain Because compression only ever turns level down, the quieter result is typically restored afterward with a fixed make-up gain, chosen to bring the loudest passages back to roughly their pre-compression level while everything below threshold ends up raised relative to where it started. In the microsim, make-up gain runs from 0 to 24 dB and defaults to 6 dB, matching the gain reduction the default 4:1 ratio produces at a moderate overshoot. ### Look-ahead A look-ahead compressor delays the audio path by a few milliseconds while feeding the gain computer an unfiltered copy of the same signal taken before that delay, so gain reduction can begin fractionally before the loud transient it responds to actually reaches the output — catching fast peaks no attack time alone could react to quickly enough. ## Uses ### Public spaces Public-address systems in airports, stadiums and retail spaces use compression to keep announcements intelligible across a wide range of ambient noise without ever driving the [[Loudspeaker|loudspeakers]] into distortion, trading a flat, narrow dynamic range for consistent audibility. ### Music production In recording and mixing, compression evens out a performance's natural variation (a vocal drifting from a whisper to a shout, a bass note whose notes decay at different rates) so the part sits consistently in a mix, alongside effects such as [[Reverberation|reverberation]] and equalization, without constant manual level changes. Used more aggressively, the same control becomes an audible effect in its own right, prized for the way a fast attack can flatten a drum hit's transient and a slow release can let its sustain bloom back up afterward. ### Voice On a single voice, compression reduces sibilance and holds a speaker's level consistent for a listener who cannot ride a fader in real time, which is why it sits in nearly every broadcast voice chain and podcast mix. ### Broadcasting Radio and television broadcasters compress and limit audio heavily before transmission, both to protect the transmitter from over-modulation and to keep a station's perceived loudness consistent across programmes, advertisements and the handoff from one to the next, a wider concern of broadcast [[Telecommunications|telecommunications]] engineering. Two widely referenced recommendations, the European Broadcasting Union's EBU R128 and the International Telecommunication Union's BS.1770, standardize how that perceived loudness is measured so different broadcasters and programmes can be leveled to the same target.[^ebur128][^itubs1770] ### Marketing Advertisements are often mixed to sound louder, on average, than the programming around them, by leaning on heavier compression and limiting to raise average level without raising peak level — a practice the broadcast loudness recommendations above were written specifically to constrain. ### Over-usage Pushed far enough, heavy compression and limiting together can remove most of a recording's dynamic range, a mastering practice widely criticized as the "loudness war": a track's average loudness rises while the sense of dynamic contrast the compression was meant to control in moderation falls.[^loudnesswar] ### Other uses Compression also appears in instrument amplifiers, where it evens out a player's picking or plucking dynamics, and in noise reduction systems, where a compressor and a matching expander bracket a noisy transmission path: the compressor raises a quiet signal above the [[Noise_(electronics)|noise]] introduced along the path for transmission, improving the [[Signal-to-noise_ratio|signal-to-noise ratio]], and the expander restores the original dynamics at the far end, an arrangement generally known as [[Companding|companding]]. ## Limiting A limiter is, formally, a compressor whose ratio has been pushed high enough (often taken as 10:1 or greater) that output level essentially stops rising no matter how far the input rises above threshold. It is usually paired with a fast attack so it can also serve as a last safeguard against a fixed ceiling that must never be crossed, such as a broadcast transmitter's modulation limit or a digital system's zero-decibels-full-scale wall, holding the signal just short of audible [[Distortion|distortion]] or a hard overload. Where a compressor is meant to be heard shaping a performance, a limiter is usually meant not to be heard at all until it is needed. ## Side-chaining A side-chained compressor derives its gain reduction not from the signal it is compressing but from a second, separate input: a technique used to duck a music bed automatically under a voice-over each time an announcer speaks, or, run fast enough to act at audio rate rather than as a slow duck, to lock a bass part's level to a kick drum's transient for the pumping effect common in electronic dance music — audio-rate side-chaining is, in effect, a form of amplitude [[Signal_modulation|modulation]] driven by a second signal instead of by a fixed carrier. ## Parallel compression Parallel compression blends a heavily compressed copy of a signal back in underneath the uncompressed original, rather than replacing it, so the quiet detail is lifted by the compressed copy's raised floor while the original's transients and peaks pass through unflattened. The result adds much of the perceived loudness and density of heavy compression without the audibly squashed dynamics heavy compression produces when it is the only thing a listener hears. ## Multiband compression A multiband compressor first splits the signal into separate frequency bands with a [[Filter_bank|filter bank]] of crossover filters, then compresses each band independently before summing them back together, so a loud event confined to one part of the spectrum (a boomy bass note, a harsh cymbal crash) triggers gain reduction only in that band instead of pulling down the whole signal's level the way a single wideband compressor would. ## Serial compression Serial compression chains two or more compressors, each doing a smaller, gentler amount of gain reduction, in place of one compressor doing all the work at a high ratio. The cumulative reduction can equal what a single aggressive stage would produce, while each individual stage's artifacts (pumping, an audibly moving gain, distortion at extreme settings) stay small enough to pass unnoticed. ## Software audio players Some media players and streaming services measure a track's loudness in advance and apply a corrective gain on playback, so recordings mastered to different average levels play back at a broadly similar perceived loudness without a listener reaching for the volume control between tracks. This is a form of level correction rather than compression proper, since it adjusts a track's overall level once rather than altering the dynamic range within it.[^streamingnorm] ## Objective influence on the signal ### Limiters A limiter's objective effect is a hard ceiling on peak level: everything below the threshold is untouched, and everything that would exceed it is pulled down to sit at or just under it, a difference that can be measured directly by comparing a recording's unprocessed and limited peak levels. ### Compressors A compressor's objective effect is better described statistically than by any single number: it raises the average level relative to the peak level, one common description of a reduced crest factor, and it reshapes a signal's level histogram, pulling its upper tail in toward the threshold while leaving levels below threshold as they were. ## Microsims The primary microsim, *Dynamic range compression*, runs a real compressor sample by sample against a fixed test signal (a tone shaped by a burst envelope) and draws three views at once: the static transfer curve hinging at the threshold, the input and compressed output waveforms, and the gain-reduction trace showing how far the gain has been pulled down at each instant. The threshold, ratio and knee controls reshape the transfer curve directly; attack and release reshape only the gain-reduction trace, since they describe how the gain moves over time rather than what it settles to. Make-up gain shifts the output waveform's level without changing its shape. Watching the gain-reduction trace, in [[Decibel|decibels]], recover after each burst is the clearest way to see attack and release working: a short release snaps back to zero between bursts, while a long one is still recovering when the next burst arrives. *Try:* Set release to its longest value and raise the ratio toward 20:1, then watch the gain-reduction trace fail to recover between bursts — an audible pumping made visible. A three.js companion sketch renders the transfer curve itself in more depth, following threshold, ratio, knee and make-up gain together with the input and output waveforms. ## Wikipedia : Wikitube **Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression) : [Wikitube](https://en.wikitube.io/wiki/Dynamic_range_compression) Skeleton mirrored at revision 1374327804. Prose, emphasis and the microsims are Wikitube's own. ## See also - [[Audio_signal_processing]] - [[Decibel]] - [[Dynamic_range]] - [[Companding]] - [[Data_compression]] - [[Loudspeaker]] - [[Signal-to-noise_ratio]] ## References The static compressor transfer curve and the linear temperature-independent gain algebra used above are standard signal-processing material and are not separately footnoted, per the Wikitube style guide §6.1. The attack-and-release ballistics in the microsim are illustrative: they use a single one-pole exponential smoother for both directions, while commercial designs commonly use more elaborate, program-dependent detector and smoothing topologies that this simplified model does not attempt to reproduce. [^ebur128]: European Broadcasting Union. *EBU R128: Loudness Normalisation and Permitted Maximum Level of Audio Signals*. Geneva, 2010 (subsequently revised). [^itubs1770]: International Telecommunication Union. *Recommendation ITU-R BS.1770: Algorithms to Measure Audio Programme Loudness and True-Peak Audio Level*. Geneva, 2006 (subsequently revised). [^loudnesswar]: Citation needed: a dated, representative account of the "loudness war" in popular-music mastering practice. [^streamingnorm]: Citation needed: the loudness-normalization algorithm and target level currently used by specific streaming platforms, which are revised from time to time. ## External links - Live sketch: https://editor.p5js.org/sciencenibber/full/6EUfdB8Xf - Editor source: https://editor.p5js.org/sciencenibber/sketches/6EUfdB8Xf <!-- Hubs: Signal_processing. Portals: PORTAL_Signal_Processing. Signal Processing portal wave 1 · 2026-09-17 · drafted. -->