DSP Toolbox · Dynamics

Dynamics — Connect the Wire

Last page we built the detector: MEASURE → ENVELOPE → COMPARE → CONTROL. The control wire was left dangling. Now connect it to something we already know.

┌──────────── AUDIO ───────────── × ───── OUTPUT │ ↑ INPUT ── SPLIT ──┤ │ └→ MEASURE → ENVELOPE → COMPARE ─┘ CONTROL → GAIN
The reveal: a dynamics processor uses one version of the signal to calculate a number that multiplies another version of the signal.

1. Start brutally simple — a gate

Use the envelope from the previous page to make a binary decision.

envelope ≥ threshold → OPEN → × 1 envelope < threshold → CLOSED → × 0

That works — but an instantaneous switch can sound ugly. So instead of memorising controls, solve the problems one at a time:

ProblemControl we add
The gate opens too abruptly.Attack — glide towards open.
It closes between nearby hits.Hold — wait before closing.
It shuts unnaturally.Release — glide towards closed.
Silence is too extreme.Range — closed can mean −10, −20, −40 dB instead of −∞.
Gate = detector + decision + gain control. Nothing new has appeared in the audio path: it still ends in multiplication.

2. One machine — change the gain rule

A gate makes a near on/off decision. An expander changes gain progressively below threshold. A compressor changes gain progressively above threshold. A limiter takes that idea towards an extreme.

GATE ← EXPANDER ←──── 1:1 ────→ COMPRESSOR → LIMITER
Same architecture. Different rule. That is the important part.

3. Hear it and watch the transfer curve

Choose a processor and source. The moving dot shows the detector level travelling through the current input→output rule.

−6 dB
−18 dBFS
4:1
20 ms
250 ms
0 dB · HARD
0 dB

Detector → Threshold → Gain Change over time

The blue line is the same envelope from our earlier page. The dashed line is the threshold. The red trace shows the gain change generated from it.

GR
0.0 dB

Horizontal = detector/input level. Vertical = target level before make-up gain. Dashed diagonal = 1:1.

Detector−∞ dBFS
Threshold−18.0 dBFS
Relation—
Target−∞ dBFS
Gain Change0.0 dB
Make-Up+0.0 dB
PLAY AUDIO TO WATCH THE ARITHMETIC
Input−∞
Gain Change0.0 dB
Pre Make-Up−∞
Final Output−∞
READY · manual make-up gain · no normalization

4. Compressor — watch the arithmetic

With a hard knee and a 4:1 ratio, suppose the detector is 10 dB above threshold. The output is allowed to rise only 2.5 dB above threshold.

amount above threshold = 10 dB 10 ÷ 4 = 2.5 dB above threshold at target gain reduction = 2.5 − 10 = −7.5 dB

1:1 changes nothing. Increase the ratio and the slope above threshold becomes flatter. At very high ratios we approach limiting.

Ratio describes a level relationship, not “how much compression sounds good”. The detector, threshold, timing and programme material all affect what actually happens.

5. Knee — what happens around the threshold?

A hard knee changes rule at the threshold. A soft knee blends gradually between the 1:1 region and the compressed region around it.

HARD KNEE → abrupt change of slope SOFT KNEE → gradual transition around threshold

Move Knee while watching the graph. The curve tells you what the control means before you need to remember the terminology.

6. Make-up gain — bring the level back up

Compression often reduces signal level. Make-up gain is simply another gain stage after the gain reduction.

INPUT → × compression gain → × MAKE-UP GAIN → OUTPUT
Another old friend: make-up gain is multiplication too. It does not undo the dynamic change — it raises the already-compressed signal.
Listening trap: louder often sounds more impressive. When judging compression, compare at similar perceived levels rather than assuming the louder version is better.

7. External sidechain — the final trick

Nothing says the detector must listen to the signal being processed.

BASS ─────────────────────────────── × ── OUTPUT ↑ KICK ──→ MEASURE → ENVELOPE → COMPARE ─────┘

The kick can therefore control the gain of the bass. Or a close snare mic can key a gate on a room mic. The detector has become a general-purpose control source.

Use the signal to control the signal — or use one signal to control another.
Final Reveal · Same Detector, Different Routing

8. The envelope can control anything

So far we routed the detector envelope back to gain. But the envelope itself is just a moving control signal. Keep the same detector and route that control somewhere else.

LFO → internally generated movement → PARAMETER ENVELOPE FOLLOWER → movement extracted from AUDIO → PARAMETER
Think of the envelope follower as an audio-driven modulation source. Unlike an LFO, its movement comes from the performance itself.
AUDIO → ENVELOPE → MAP / SCALE / INVERT → ANY PARAMETER
20 ms
250 ms
80%
NORMAL

Blue = detector envelope. Purple = mapped destination control. Same trace idea — different routing.

CONTROL
0%

Envelope → Filter Cutoff

GUITAR / DRUMS → ENVELOPE → MAP → FILTER CUTOFF

As the input gets louder, the filter opens. This is the basic idea behind an envelope-controlled filter / auto-wah.

Envelope0%
Mapped Control0%
Destination200 Hz
SAME ENVELOPE → DIFFERENT DESTINATION
The compressor was only one possible patch. Once audio has become control information, that control can animate almost anything.
What did we learn?

Dynamics processors are arrangements of familiar primitives

SPLIT → MEASURE → COMPARE → CALCULATE GAIN → × AUDIO
ProcessorGain rule
GateBelow threshold → move towards the closed/range gain.
ExpanderBelow threshold → progressively reduce level.
CompressorAbove threshold → progressively reduce gain.
LimiterVery high-ratio compression above threshold.

Once the detector produces a useful envelope, it could just as easily control filter cutoff, distortion, delay, reverb, pan, width or another synthesiser. Compression is one application of a much bigger idea.