Audio node
Audio Compressor
Dynamics processing tuned for program material: threshold, a soft-knee headroom control, attack, release, and make-up gain. The compressor evens out loudness — taming peaks, lifting sustain, and gluing a chain together — and its parameters are ports, so dynamics can be automated like everything else in Grafit.
Inputs
| Port | Type | Default |
|---|---|---|
| AudioThe signal to compress. Cable it from Audio Player, another effect or a synth; microphone input that is not on the engine graph passes through untouched. | structure | — |
| EnableOff bypasses the compressor — the audio still flows through, just uncompressed. | bool | true |
| ThresholdThe level in dB above which the sound starts being held back. Clamped to -40…20; lower means more of the material is compressed. | float | -20 |
| HeadroomHow far above the threshold the signal may still climb before it is fully squashed — the soft knee. Clamped to 0.1…40 dB, small values act like a hard limiter. | float | 5 |
| AttackHow quickly the compressor clamps down after a transient, in seconds. Clamped to 0.0001…0.2; short keeps peaks flat, longer lets the punch of a drum through. | float | 0.001 |
| ReleaseHow long it takes to let go again, in seconds. Clamped to 0.01…3; short breathes and pumps, long stays smooth. | float | 0.05 |
| MakeupOutput gain in dB to bring the compressed signal back up. Clamped to -40…40. | float | 0 |
Outputs
| Port | Type |
|---|---|
| AudioThe signal to compress. Cable it from Audio Player, another effect or a synth; microphone input that is not on the engine graph passes through untouched. | structure |
| Level | float |
How It Works
Audio Compressor sits anywhere in an audio chain: source → filters → Audio Output, and is a natural last-in-chain node before the output. Connecting the Audio input splices it into the shared AVAudioEngine graph — the cables are the engine wiring, one clock drives everything, and it can be added to a running chain without a glitch.
Internally the node hosts Apple's DynamicsProcessor Audio Unit, configured as a compressor only. The stock DynamicsProcessor is secretly a compressor plus an expander, and the expander's default settings pull quiet audio down toward silence — the classic "the compressor ate my sound" trap. This node neutralizes the expander outright (ratio 1:1, threshold at −120 dB), so quiet passages pass untouched and only the compressor section acts.
Threshold sets the level (dB) above which gain reduction begins. Headroom shapes the soft knee — the transition zone above the threshold over which compression progressively takes hold: small values give a harder, more audible knee; large values compress so gradually the effect becomes invisible. Attack is how fast the compressor clamps down once the signal crosses the threshold (short = catches transients, long = lets the initial hit through). Release is how fast gain returns to unity afterward (short = punchy but can pump; long = smooth but can duck the material). Makeup adds fixed output gain to restore the loudness that compression removed.
The Audio output re-emits the processed signal as a new engine-backed snapshot, so more filters can follow and an Audio FFT can tap the chain after the compressor — analysis then sees the leveled signal. The Level output is a peak-decay RMS of the compressed signal; comparing it against an Audio Gain's Level before the compressor visualizes the gain reduction. Enable = false engages the audio unit's clean bypass: audio keeps flowing, unprocessed.
Parameters in Depth
| Port | Type | Default | Description |
|---|---|---|---|
| Audio | Structure | — | Engine audio signal to process. |
| Enable | Bool | true | When false, the compressor is cleanly bypassed — audio passes through unchanged. |
| Threshold | Float | -20 | Level in dB (−40…+20) above which compression starts. Lower = more of the signal is compressed. |
| Headroom | Float | 5 | Soft-knee width in dB (0.1…40). Small = hard-knee, assertive compression; large = gentle, gradual onset. |
| Attack | Float | 0.001 | Attack time in seconds (0.0001…0.2). 0.001 s (1 ms) clamps almost instantly; 0.02–0.05 s lets drum transients punch through before compression grabs. |
| Release | Float | 0.05 | Release time in seconds (0.01…3). 0.05 s (50 ms) is fast and punchy; 0.2–0.5 s is smooth for full mixes; very short releases on bass-heavy material cause audible pumping. |
| Makeup | Float | 0 | Output gain in dB (−40…+40) applied after compression to restore loudness. |
Outputs: Audio (the processed signal, chainable) and Level (peak-decay RMS of the compressed signal).
Musical starting points: gentle mix glue = Threshold −15, Headroom 15, Attack 0.01, Release 0.3; drum punch = Threshold −20, Headroom 3, Attack 0.03, Release 0.08; broadcast voice = Threshold −25, Headroom 8, Attack 0.002, Release 0.15, Makeup +6.
Use Cases
- Mix-bus glue before output: Audio Player → Audio Equalizer → Audio Compressor (Threshold −15, Headroom 15, Release 0.3) → Audio Output — a couple of dB of invisible leveling on the whole chain.
- Steady live-mic voice: Audio Input (mic) → Audio Compressor (Threshold −25, Attack 0.002, Makeup +6) → Audio Reverb → Audio Output — consistent speech level regardless of mic distance, on live input via the engine's realtime source bridge.
- Delay/reverb tail safety net: Audio Player → Audio Delay (high Feedback) → Audio Compressor → Audio Output — the compressor catches runaway feedback build-up before it hits the speakers.
- Stable analysis signal: Audio Player → Audio Compressor → Audio Output, with an Audio FFT tapped after the compressor — leveled dynamics keep spectrum visuals consistently energetic through quiet and loud sections alike.
- Punch shaper for drums: Audio Player (drums) → Audio Compressor (Attack 0.03, Release 0.08, Headroom 3) → Audio Output — the slow attack lets each hit's transient snap through, then squeezes the body.
- Level-matched distortion taming: Audio Player → Audio Distortion → Audio Compressor (Threshold −10, Makeup −3) → Audio Output — reins in the loudness jump a hot preset creates.
Tips
- Tune to the program material: percussive sources want slower attacks (0.02–0.05 s) so transients survive; voices want fast attacks (1–3 ms); full mixes want wide Headroom (10–20 dB) and slower releases so the compression disappears.
- If the sound audibly "pumps", lengthen Release; if it feels lifeless and flattened, raise Threshold, widen Headroom, or slow Attack — over-compression is the most common mistake.
- Always level-match when judging: add Makeup until bypassed (Enable = false) and engaged sound equally loud — louder always sounds "better", which fools the ear.
- The hidden expander that makes Apple's DynamicsProcessor swallow quiet audio is neutralized in this node — quiet passages pass at unity, so what you set is what you get.
- Compressor placement: after distortion tames its loudness spike; after delay/reverb rides the tails; before a reverb keeps the space's input steady. Last-in-chain before Audio Output is the safe default.
- Watch gain reduction visually: tap Level before (via an Audio Gain node) and after the compressor and plot both — when the two traces diverge, that gap is your compression in action.
Open Audio Compressor in the interactive catalog →
Audio Compressor is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.