Envelope Follower
Envelopes & ModenvfollowerLight CPU
Turns an audio signal into a control signal that tracks its level.
What it does
Audio in, control out — a signal that tracks how loud the input is.
Two steps, no DaisySP class of its own. First the input is rectified with fabsf, folding the negative half of the waveform upward so the signal is always positive. That alone is a jagged, audio-rate mess, so it is then passed through a daisysp::OnePole lowpass whose corner frequency is the Rate control: the filter averages the rectified signal, and what comes out is its envelope. This is the same construction AutoWah and Balance each build privately and never expose — the reason this tile exists rather than wrapping a class.
Parameters
-
Smoothing (Hz)
rateHow fast the follower is allowed to move, as the corner frequency of its smoothing filter. Low values (1–5 Hz) give a slow, steady level that ignores individual notes — the setting for ducking or a VU-style LED. High values (50 Hz and up) let it chase each transient, which is what you want for triggering. Too high and the follower starts reproducing the waveform itself rather than its envelope, so the output ripples at the audio frequency. This is the value used when the Rate port is unwired.
Rectifies the input, then smooths it — the output is a control signal that rises and falls with the input's loudness. Wire it into any Mod input: a filter cutoff for auto-wah, a Mixer gain for ducking, an LED for a level meter, or Math's A > B for a gate-from-audio.
Ports
In
-
Audio In
input -
Rate
rate
Out
-
Env Out
output
Audio Control
Inputs
- Audio In
- The signal to measure. Anything audio-rate: an oscillator, a drum, the Audio In jack.
- Rate
- Smoothing corner in Hz — low tracks the overall level, high chases transients. Unwired, the Inspector value is used.
Outputs
- Env Out
- A control signal following the input's level. Roughly 0 at silence, rising with loudness. ⚠ It is not normalised to 0–1 — see the rules.
Rules and gotchas
- ⚠ The output is NOT 0–1. It is an average of the rectified input, so a full-scale sine settles near 0.64 rather than 1.0, and a quiet source produces a correspondingly small number. Put a Scale / Offset after it to map the range you actually get onto the range the destination wants — that step is almost always needed.
- Average-rectified, not RMS or peak. Two sounds at the same perceived loudness but different waveforms will read differently; a square reads higher than a sine at the same peak. For level MATCHING between two signals, Balance does the right thing directly and needs no follower.
- Rate is a trade, not a quality setting. Below about 5 Hz the output is smooth but lags the sound noticeably; above about 50 Hz it responds instantly but ripples, and at audio rate it stops being an envelope at all. Start at 10 Hz and move toward whichever problem you have.
- A wired Rate is floored at 0.01 Hz at emit — a modulator swinging negative parks at the slowest setting instead of running the filter backwards. The upper end is clipped by the filter itself at just under half the sample rate.
- Gate-from-audio is this tile plus Math: wire Env Out into Math's A, a knob into B, pick A > B, and the output is a gate that opens when the sound crosses the threshold — a noise gate's detector, or a trigger fired by a drum.