Compressor
Compressor operator properties for Script Engine. Smooths out the dynamic range of an audio signal — loud parts are reduced so quiet parts don't get drowned out. Built on FFmpeg's compander filter, with the standard broadcast controls (input gain, threshold, ratio, attack/release, knee, makeup, mix) plus advanced detector mode, channel link, and detection type. Includes a clip indicator and a one-click reset. The dedicated Compressor V2 offers richer real-time metering and look-ahead.
| Property | Type | Access | Description |
|---|---|---|---|
InputGainDb |
float |
get/set |
Pre-compression gain, in decibels. [min=-24, max=24, default=0]. 0 leaves the signal unchanged. Negative values reduce the input level; positive values boost it before the compressor processes it. |
ThresholdDb |
float |
get/set |
Level above which the compressor starts working, in decibels relative to full scale. [min=-48, max=0, default=-9]. Audio louder than this gets reduced by Ratio; audio quieter than this is left unchanged. Lower (more negative) values catch more of the signal. |
Ratio |
float |
get/set |
How strongly audio above the threshold is reduced. [min=1, max=20, default=4]. Expressed as N:1. 1:1 is no compression; 4:1 is a typical broadcast setting; 10:1 or higher behaves like a limiter. |
Attack |
float |
get/set |
How quickly the compressor reacts when the signal exceeds the threshold, in milliseconds. [min=1, max=200, default=5]. Short values catch fast transients but can sound "squashed". Longer values let initial peaks through before gain reduction kicks in. |
Release |
float |
get/set |
How quickly the compressor stops working after the signal drops below the threshold, in milliseconds. [min=5, max=5000, default=200]. Short values let the compressor recover quickly; long values keep the gain reduction smooth across phrases. |
Knee |
float |
get/set |
Soft-knee width around the threshold. [min=1, max=8, default=2.8]. Controls how gradually the compressor engages near the threshold. Low values give a hard, punchy onset; high values give a soft, gentle engagement. |
Mix |
float |
get/set |
Wet/dry mix between the compressed and original signals, as a percentage. [min=0, max=100, default=100]. 100 outputs only the compressed signal; 0 outputs only the original; values in between blend the two — known as parallel compression, useful for keeping the dynamics of the original while still tightening peaks. |
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. |
CompressorMode |
CompressorMode |
get/set |
CompressorMode — whether the compressor reduces volume above the threshold (Downward) or raises volume below the threshold (Upward). Downward is the standard mode — loud parts above the threshold get pulled down. Upward does the opposite, lifting quieter parts below the threshold up so soft details stand out. |
Link |
CompressorLink |
get/set |
How left and right channels are linked when the compressor decides how much to reduce. Pick a linking mode based on whether the channels should be processed together (preserving stereo image but reacting to the loudest of the two) or independently. |
CompressorDetection |
CompressorDetection |
get/set |
How the compressor measures the input level — peak vs. RMS. Peak detection reacts to instantaneous peaks (more aggressive on transients). RMS reacts to the smoothed loudness (more transparent on voices and music). |
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. |
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. |
ResetCommand |
Command |
get |
Reset all settings to their broadcast-style defaults. |
SamplesRendered |
int |
get |
Total number of audio samples processed by the compressor (read-only, debug). |
Inherits from: AbstractAudioOperator, AbstractOperator, AbstractAudioMetering.
See also: Compressor in Operators — user-facing introduction, screenshots, and section summaries.