Compressor

Peak/RMS compression with a sidechain key input, detector filtering, hold, adaptive release and channel linking.

  • Dynamics
  • Since 0.2.0
  • dynamics
  • level
  • squeeze
  • sidechain

Open in TuneToys

Compressor as the Patch draws it, at default values: inlets on the left, outlets on the right.

A compressor turns loud parts of a signal down, making the level more even.

What it does#

A detector measures the signal level, either by peak or by smoothed RMS. When the level goes above Threshold, the compressor reduces the gain according to Ratio, with a soft Knee around the threshold. Attack and Release set how quickly the gain reduction arrives and recovers, and Hold keeps the reduction in place for a moment before recovery. Makeup raises the output afterwards. The detector can be high-passed so low frequencies do not trigger compression, and the detectors of a multichannel bundle can be linked so every channel gets the same reduction.

The key input is a sidechain. While something is connected to it, the detector measures the key instead of the main input, and the gain it computes is applied to the main input: a kick on the key pushes a pad down on every hit (ducking), and a high-passed copy of a voice on the key turns the voice down only when it hisses (de-essing). The key carries one channel, which then drives every channel of the main input, or exactly as many channels as the main input. Left unconnected, the main input drives the detector exactly as before. A key from a node with processing latency is delayed with the rest of the graph, so it stays aligned with the audio it controls.

When to use it#

Use it to even out dynamics, add punch or control a peaky source, or with a key to duck one sound under another and to de-ess. For a hard ceiling that nothing passes, use the Limiter; to silence a signal below a level, use the Gate; to compress bands separately, use the Multiband compressor.

Ports#

PortDirectionSignalLanes
audioInputAudioInferred from the cable
keyInputAudioInferred from the cable
audioOutputAudioInferred from the cable

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
thresholdThreshold-60 to 0-18dBFSlinearCompression starts above this detector level.
ratioRatio1 to 204:1linearInput/output slope above threshold.
attackAttack0.1 to 10010mslogGain-reduction attack time constant.
releaseRelease10 to 2000120mslogGain-reduction recovery time constant.
kneeKnee0 to 246dBlinearWidth of the quadratic soft knee.
makeupMakeup0 to 240dBlinearGain after compression.
linkChannel link0 to 11linearBlends independent detectors with the strongest detector across the entire bundle.
detectorDetector0 to 10linearPeak amplitude or smoothed mean-square detection. Choices: 0 Peak, 1 RMS.
detector_hpDetector high-pass0 to 10000HzlinearHigh-pass only in the detector (on the key when it is connected); zero bypasses it.
holdHold0 to 2500mslinearHolds attenuation before recovery.
auto_releaseAdaptive release0 to 10linearBlends the chosen release with a slower recovery after sustained reduction.
listenListen0 to 10linearOutputs the filtered detector signal instead of the compressed audio, to tune the key and its high-pass. Choices: 0 Off, 1 On.

Threshold (threshold)#

The level, from -60 to 0 dBFS, above which compression starts.

Ratio (ratio)#

The input-to-output slope above the threshold, from 1:1 (no compression) to 20:1 (near limiting).

Attack (attack)#

How quickly gain reduction arrives, from 0.1 to 100 ms. Longer attacks let more of the initial transient through.

Release (release)#

How quickly the gain recovers, from 10 to 2000 ms.

Knee (knee)#

The width, from 0 to 24 dB, of a smooth transition around the threshold.

Makeup (makeup)#

Gain applied after compression, from 0 to 24 dB.

From independent detectors (0) to a single detector that follows the strongest channel across the whole bundle (1).

Detector (detector)#

Peak reacts to the highest sample; RMS follows a smoothed mean-square level and responds more like loudness.

Detector high-pass (detector_hp)#

A high-pass, 0 to 1000 Hz, applied only to the detector. Zero bypasses it.

Hold (hold)#

Keeps the gain reduction for up to 250 ms before recovery starts.

Adaptive release (auto_release)#

Blends the chosen Release with a slower recovery after sustained reduction.

Listen (listen)#

On replaces the output with the signal the detector measures: the key when it is connected, otherwise the main input, after the detector high-pass. Use it to hear what triggers compression while you set a key filter or Detector high-pass; the gain reduction keeps running underneath, so switching back is seamless.

Tips#

  • Set Threshold first, then Ratio, then adjust Attack and Release by ear.
  • Use Makeup to match loudness before and after, so you judge the sound and not the volume.
  • A detector high-pass keeps heavy bass from pumping the whole mix.
  • For ducking, use a short Attack, a Release that ends before the next hit, and a high Ratio.
  • For de-essing, feed the key through a Filter set to high-pass, turn Listen on, and raise the cutoff until only the hiss remains.

See also#

Limiter, Gate, Multiband compressor, Envelope, Gain.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Tame a loud peak

beginner Teaches: threshold, ratio, attack, release, makeup

A repeating loud ping squeezed by a compressor.

Patch: Oscillator audio output connected to Envelope audio input. Envelope audio output connected to Compressor audio input. Compressor audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Envelope audio input
  • Envelope audio output connected to Compressor audio input
  • Compressor audio output connected to Patch outputs audio input
  • Only signal above Threshold is turned down. Ratio sets how strongly.
  • Makeup restores the level after compression.
Frame preview: Tame a loud peakFrame “Tame a loud peak” with 6 elements: knob Attack, text heading, knob Makeup, knob Ratio, knob Release, knob Threshold.10 msAttackTAME A LOUD PEAK6 dBMakeup6 :1Ratio120 msRelease-24 dBFSThreshold
Frame preview (static). Controls show their default values.

Open in TuneToys

2. Detector, knee and linking

advanced Teaches: detector, link, detector_hp, hold, knee, auto_release

Fine detector and recovery controls.

Patch: Oscillator audio output connected to Envelope audio input. Envelope audio output connected to Compressor audio input. Compressor audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Envelope audio input
  • Envelope audio output connected to Compressor audio input
  • Compressor audio output connected to Patch outputs audio input
  • RMS reacts to average level; Peak reacts to the highest sample.
  • Detector high-pass keeps low frequencies from triggering compression.
Frame preview: Detector, knee and linkingFrame “Detector, knee and linking” with 7 elements: knob Adaptive release, segmented Detector, knob Detector high-pass, text heading, knob Hold, knob Knee, knob Channel link.0Adaptive releasePeakRMSDetector0 HzDetector high-p…DETECTOR, KNEE AND LINKING0 msHold6 dBKnee1Channel link
Frame preview (static). Controls show their default values.

Open in TuneToys

3. Duck a pad under the kick

advanced Teaches: threshold, ratio, attack, release

A kick on the compressor's key input pushes a sustained pad down on every hit.

Patch: Oscillator “kick” audio output connected to Envelope audio input. Oscillator “pad” audio output connected to Filter audio input. Filter audio output connected to Compressor audio input. Envelope audio output connected to Compressor key input. Compressor audio output connected to Mixer duck.in input. Envelope audio output connected to Mixer thump.in input. Mixer audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator “kick” audio output connected to Envelope audio input
  • Oscillator “pad” audio output connected to Filter audio input
  • Filter audio output connected to Compressor audio input
  • Envelope audio output connected to Compressor key input
  • Compressor audio output connected to Mixer duck.in input
  • Envelope audio output connected to Mixer thump.in input
  • Mixer audio output connected to Patch outputs audio input
  • The kick reaches the compressor's key input, so the kick's level, not the pad's, sets the gain reduction.
  • Threshold and Ratio set how far the pad dips on each hit; Release sets how fast it swells back.
Frame preview: Duck a pad under the kickFrame “Duck a pad under the kick” with 5 elements: knob Attack, text heading, knob Ratio, knob Release, knob Threshold.1 msAttackDUCK A PAD UNDER THE KICK8 :1Ratio220 msRelease-30 dBFSThreshold
Frame preview (static). Controls show their default values.

Open in TuneToys

4. De-ess with a filtered key

advanced Teaches: listen, threshold, ratio

A high-passed copy of a synthetic voice keys its compressor, so only the hissing esses are turned down.

Patch: Oscillator audio output connected to Filter “formant” audio input. Noise audio output connected to Filter “ess” audio input. Filter “ess” audio output connected to Envelope audio input. Filter “formant” audio output connected to Mixer formant.in input. Envelope audio output connected to Mixer bursts.in input. Mixer audio output connected to Filter “sibilance” audio input. Mixer audio output connected to Compressor audio input. Filter “sibilance” audio output connected to Compressor key input. Compressor audio output connected to Patch outputs audio input.
Connections as text
  • Oscillator audio output connected to Filter “formant” audio input
  • Noise audio output connected to Filter “ess” audio input
  • Filter “ess” audio output connected to Envelope audio input
  • Filter “formant” audio output connected to Mixer formant.in input
  • Envelope audio output connected to Mixer bursts.in input
  • Mixer audio output connected to Filter “sibilance” audio input
  • Mixer audio output connected to Compressor audio input
  • Filter “sibilance” audio output connected to Compressor key input
  • Compressor audio output connected to Patch outputs audio input
  • Only the high-passed copy reaches the key, so the compressor reacts to esses and leaves the vowel alone.
  • Turn Listen on to hear exactly what the detector hears, then set the key high-pass so only the hiss remains.
  • The Multiband compressor's high band is the other way to de-ess: see its help patches.
Frame preview: De-ess with a filtered keyFrame “De-ess with a filtered key” with 5 elements: text heading, knob Key high-pass, segmented Listen, knob Ratio, knob Threshold.DE-ESS WITH A FILTERED KEY5000 HzKey high-passOffOnListen8 :1Ratio-36 dBFSThreshold
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Limiter Linked or independent sample-peak limiting with hold and adaptive release.
  • Gate Noise gate and downward expander with a sidechain key input, range, hold, lookahead, detector filtering and channel linking.
  • Multiband compressor Three-band compressor on a flat-summing crossover: per-band threshold, ratio, attack, release, makeup and solo, then an output trim.
  • Envelope Curved AD, AR and ADSR gain envelopes with looping and explicit retrigger behavior.
  • Gain A clean stereo gain stage.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close