Measure & Compare
So far we have mostly changed audio. Now we ask a different question: how can the computer know what the audio is doing?
1. Why can't we just use the waveform?
Audio is bipolar. A large negative sample is not “quiet”; it is simply the other half of the waveform.
If we want to describe magnitude, polarity gets in the way.
So one simple detector starts by making magnitude positive:
For RMS, squaring does the same job in a different way:
2. One signal — several measurements
Choose a source, play it, and watch Peak, RMS and Envelope respond to the same signal in different ways.
3. See the signal become control information
4. RMS — why do we need it?
For a perfect sine, there is a shortcut:
But real music does not have a fixed Peak→RMS multiplier. A transient-heavy signal can have a high peak and a much lower RMS. So for arbitrary audio we actually perform:
RMS asks: “how much signal energy was present across this window?”
5. Envelope follower — turn level into a moving control signal
Peak and RMS are measurements. An envelope follower makes a continuously changing control signal that can follow the audio more quickly or more slowly.
Attack controls how quickly the detector rises. Release controls how quickly it falls.
6. Compare it with a threshold
Now give the computer something to compare the measured envelope against. The blue line is a compressor-style envelope trace; the dashed line is the threshold.
This is the same source and detector as Section 2 — the transport is repeated here so you can work directly with the threshold.
7. Use the signal to control the signal
In digital audio, the detector copy can be effectively perfect and trivial to route. The original audio remains untouched until we deliberately use the control signal to change something.
The decision-making half of a dynamics processor
| Measurement / comparison | What it can become |
|---|---|
| Envelope above threshold? | Gate / expander decision |
| How far above threshold? | Compressor / limiter gain calculation |
| Fast change in envelope? | Transient detector |
| Slow level estimate? | Automatic gain control / levelling |
And there is our old friend again: multiplication.