Skip to content

Dynamics Controls

Dynamics controls decide how much movement the master keeps. In the demo they drive the compressor stage and the Quick Master Dynamics macro.

This is one topic, not five separate decisions. Threshold, ratio, attack, release, and knee only make sense together.

Tune the five together, with your ears

Changing one control shifts what the others do, so judge the result, not each knob in isolation. Always check it against a loudness-matched A/B Comparison: compression that only sounds "better" because it got louder is not actually better.

Threshold, Ratio, Attack, Release, Knee

Threshold decides where compression starts. Ratio decides how strongly levels above that point are reduced. Attack decides how quickly gain reduction arrives. Release decides how quickly it lets go. Knee decides whether compression begins abruptly or gradually near the threshold.

ControlListen for
ThresholdHow much of the song is being compressed.
RatioHow dense or pinned the loud sections feel.
AttackWhether drums and consonants keep their front edge.
ReleaseWhether the master breathes naturally or pumps.
KneeWhether compression grabs suddenly or eases in.
DYNAMICS · COMPRESSORIDLE
Compression — threshold, ratio, knee, attack, release

The left panel is the transfer curve — input level in, output level out — with the threshold and the soft knee marked; raise the ratio and it bends harder past the threshold. The right panel runs a fixed program (a steady bed with transient hits) through the compressor: the shaded gap is the gain reduction, and attack and release decide how fast it clamps down and lets go. Press play to hear the same program — the pumping you see is the pumping you hear.

Threshold
-18 dB
Ratio
4 :1
Knee
6 dB
Attack
15 ms
Release
160 ms

Practical Workflow

  1. Start with moderate ratio and a soft knee.
  2. Lower threshold until loud sections show controlled reduction.
  3. Adjust attack so transients — the short level spikes at the front of drum hits and consonants — are controlled but not flattened.
  4. Adjust release so the gain returns with the groove.
  5. Use loudness-matched A/B before deciding the compression is better.

Parallel compression

Compression does not have to be all-or-nothing. Parallel (or "New York") compression blends a heavily compressed copy of the signal under the untouched dry signal. The dry copy keeps the transients and punch; the squashed copy adds body and lifts the quiet detail. A blend control sets how much of the compressed copy is mixed in — at 100% you hear only the compressor, and as you lower it the dry dynamics return.

DYNAMICS · COMPRESSORIDLE
Parallel compression — squash a copy, keep the punch

Compression need not be all-or-nothing. Parallel ("New York") compression mixes a heavily compressed copy under the untouched dry signal: the dry copy keeps the transients and punch while the squashed copy lifts the quiet body. Set a low threshold and a high ratio to crush the copy, then drag Blend — at 100% you hear only the compressor (the transfer curve fully bent), and as you lower it the dry dynamics return and the curve straightens back toward 1:1. The envelope panel shows the transients surviving that a full compressor would have flattened.

Threshold
-28 dB
Ratio
8 :1
Blend
50 %

Multiband compression

The compressor described above acts on the whole signal at once. libsonare's mastering chain also supports a multiband compressor that splits the signal into frequency bands and compresses each one independently — useful when only one register is misbehaving (a boomy low end, a harsh top) and squashing the whole mix would cost more than it fixes.

Not reachable from the browser demo

The demo's masteringChain() config exposes only a fixed three-band shorthand (dynamics.multibandComp.lowThresholdDb, midRatio, highAttackMs, and so on — low/mid/high, never more). An arbitrary band count (validated to between 1 and 64 bands) is a JSON-document-level feature: it requires the mastering CLI's --config <file> pointing at a chain config schema version 2, where dynamics.multibandComp becomes a structured object — a crossover plus a bands array of independent compressor configs — instead of the flat low/mid/high keys. Schema version 1, and the browser's TypeScript config object, cannot express more than three bands.

In libsonare

Studio exposes threshold, ratio, attack, and release directly. Knee is part of the underlying compressor model and preset design, but it is not a first-line control in the browser UI.

Implementation notes

libsonare evaluates a detector level in dB and compares it with the threshold. Stereo detection is linked: one detector level is derived from all channels and the same gain is applied to every channel, so the stereo image does not pull sideways. How that linked level is formed depends on the detector — peak takes the loudest channel at that sample, while the RMS detectors take the mean power across channels, so anti-correlated content does not collapse the detected level.

The hard-knee static curve is conceptually:

text
over_db = input_db - threshold_db
gain_reduction_db = over_db * (1 - 1 / ratio)

Soft knee replaces the abrupt corner around threshold with a quadratic transition. Attack and release then smooth the target reduction into a continuous gain envelope. The detector can measure the incoming level in different ways: peak (the instantaneous maximum, reacts fastest), RMS (a short running average over 10 ms, closer to perceived loudness), or log-RMS (the same linear RMS average taken over a longer 50 ms window, so it estimates the sustained level and ignores brief transients). RMS is the default. The choice changes how twitchy the compressor is. That detector smoothing is separate from attack/release envelope timing.

Auto-makeup is an open-loop estimate, not a measurement: it is computed once per block from threshold and ratio alone, as half of the makeup that would exactly restore a signal sitting at the threshold. The half factor is deliberate, because real program material averages well below threshold and the full figure overshoots. Auto-makeup and manual makeup are mutually exclusive — any non-zero makeupGainDb overrides the automatic value rather than adding to it. Final loudness landing is still the responsibility of the loudness optimizer that sits after the compressor in the chain.

Related: Dynamic Range, Crest Factor, A/B Comparison