Envelope follower

Track the level of an audio bundle as one control lane per channel, with attack and release.

  • Control
  • Since 0.2.0
  • envelope
  • follower
  • level
  • audio to control

Open in TuneToys

Envelope follower as the Patch draws it, at default values: inlets on the left, outlets on the right.

Envelope follower tracks the level of an audio bundle and outputs it as one control lane per channel.

What it does#

Audio comes in and a slowly moving level comes out. Detector chooses RMS (a smoothed average of the signal's energy) or Peak (the largest swing). Attack sets how fast the level rises and Release how fast it falls, in milliseconds. Gain boosts the audio before it is measured so quiet sources can reach 1; the audio itself passes on unchanged elsewhere because the follower only produces a control output. Stereo audio gives a two-lane output.

When to use it#

Use it to make something react to loudness: scale the follower's output and cable it to a control. For per-frequency reaction use Band energies.

Ports#

PortDirectionSignalLanes
audioInputAudioInferred from the cable
controlOutputControlInferred from the cable

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
attack_msAttack0 to 200010mslinearHow fast the follower rises.
release_msRelease0 to 5000200mslinearHow fast the follower falls.
modeDetector0 to 10linearMeasure RMS or peak level. Choices: 0 RMS, 1 Peak.
gain_dbGain-24 to 480dBlinearBoost applied before the follower so quiet sources reach 1.

Attack (attack_ms)#

How fast the follower rises, 0 to 2000 ms.

Release (release_ms)#

How fast the follower falls, 0 to 5000 ms.

Detector (mode)#

RMS or Peak. RMS follows perceived level; Peak reacts to short transients. A discrete choice.

Gain (gain_db)#

Boost, from -24 to 48 dB, applied before the follower so quiet sources reach 1.

Tips#

  • Use a fast Attack and a slower Release for a natural-looking level.
  • If the output barely moves, raise Gain.

See also#

Band energies, Smooth, Scale, Cables.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Follow the level of a tone

beginner Teaches: attack_ms, release_ms, mode, gain_db

An envelope follower measures a tone and exposes its timing and gain.

Patch: Oscillator audio output connected to Patch outputs audio input. Oscillator audio output connected to Envelope follower audio input.
Connections as text
  • Oscillator audio output connected to Patch outputs audio input
  • Oscillator audio output connected to Envelope follower audio input
  • The tone goes to the output and to the follower; the follower makes a control lane from its level.
  • Gain lifts quiet sources so they reach 1. Attack and Release set how fast the lane moves.
Frame preview: Follow the level of a toneFrame “Follow the level of a tone” with 5 elements: knob Attack, knob Gain, text heading, segmented Detector, knob Release.10 msAttack0 dBGainFOLLOW THE LEVEL OF A TONERMSPeakDetector200 msRelease
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Band energies Split audio into log-spaced bands and follow each one's energy as a control lane: the audio-to-visual bridge.
  • Smooth Slow a control lane down with separate rise and fall times so jumpy sensors and buttons stop clicking.
  • Scale Map a control range onto another with a curve, clamp and inversion. Depth and offset for any modulation.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close