Compressor V2
Compressor V2 operator properties for Script Engine. Smooths out the dynamic range of an audio signal by automatically reducing the volume of loud parts so the quiet parts don't get drowned out. Useful for keeping voices consistent over a long recording, taming peaks before downstream processing, or giving an overall "tighter" feel to a mix. Provides full broadcast-style controls — threshold, ratio, attack/release, knee, makeup gain, look-ahead, and a choice of detector — plus live gain-reduction meters and a clip indicator.
| Property | Type | Access | Description |
|---|---|---|---|
Threshold |
float |
get/set |
Level above which the compressor starts working, in decibels relative to full scale. [min=-48, max=0, default=-18]. Audio louder than this gets reduced by Ratio; audio quieter than this is left unchanged. Lower (more negative) values catch more of the signal; values close to 0 only catch the loudest peaks. |
Ratio |
float |
get/set |
How strongly audio above the threshold is reduced. [min=1, max=20, default=3.5]. Expressed as N:1. 1:1 is no compression; 2:1 means every 2 dB above threshold becomes 1 dB at the output (gentle); 4:1 is a typical broadcast setting; 10:1 or higher acts like a limiter. |
MakeupGainDb |
float |
get/set |
Extra gain applied after compression to compensate for the level reduction. [min=0, max=24, default=0]. Compression always lowers the overall level; makeup gain brings the perceived loudness back up. Set so the compressor's bypassed and engaged levels sound roughly equal. |
AttackTimeMs |
float |
get/set |
How quickly the compressor reacts when the signal exceeds the threshold, in milliseconds. [min=0, max=200, default=8]. Short values catch fast transients (drums, hard consonants) but can sound "squashed". Longer values let initial peaks through before the gain reduction kicks in, preserving punch. |
ReleaseTimeMs |
float |
get/set |
How quickly the compressor stops working after the signal drops below the threshold, in milliseconds. [min=0, max=500, default=150]. Short values let the compressor recover quickly (more transparent on speech); long values keep the gain reduction smooth across phrases. |
KneeWidthDb |
float |
get/set |
Soft-knee width around the threshold, in decibels. [min=1, max=8, default=2.8]. Controls how gradually the compressor engages near the threshold. Low values give a hard, punchy onset (good for limiting); high values give a soft, gentle engagement (good for vocals and music). |
CompressorDetectorMode |
AudioCompressorDetectorMode |
get/set |
AudioCompressorDetectorMode — how the compressor measures the input level. [default=Rms]. Peak reacts to instantaneous peaks (more aggressive on transients). Rms reacts to the smoothed loudness over time (more transparent on voices and music). |
LookAheadMs |
float |
get/set |
How far ahead the compressor "looks" before applying gain reduction, in milliseconds. [min=1, max=8, default=4]. Lets the compressor anticipate transients so the gain reduction engages right when they arrive instead of slightly after. Adds a small constant amount of latency equal to this value. |
SignalOverLoad |
bool |
get |
True when the compressor's output signal has clipped (read-only). Lights up when the combined effect of compression and MakeupGainDb pushes the signal above full scale. Auto-resets after 2 seconds. Reduce MakeupGainDb if this trips often. |
PeakValueDbString |
string |
get |
Highest level reached during the most recent overload, in decibels (read-only). Updated whenever SignalOverLoad trips, and auto-resets after 2 seconds. |
GainReductionMeterL |
float |
get |
How much the left channel is being attenuated right now, in decibels (read-only). Smoothed over 300 ms for a stable readout. 0 means no compression is happening; more negative values mean the compressor is working harder. |
GainReductionMeterR |
float |
get |
How much the right channel is being attenuated right now, in decibels (read-only). See GainReductionMeterL. |
ResetCommand |
Command |
get |
Reset all settings to their broadcast-style defaults. Restores threshold, ratio, attack/release, knee, makeup gain, look-ahead, and detector mode to a sensible starting point for general-purpose compression. |
SamplesRendered |
int |
get |
Total number of audio samples processed by the compressor (read-only, debug). |
Inherits from: AbstractAudioOperator, AbstractOperator, AbstractAudioMetering.
See also: Compressor V2 in Operators — user-facing introduction, screenshots, and section summaries.