Audio Ducking
App: apps/audio_ducking_demo/
A continuous music drone that automatically ducks (drops in level) while a “voice” cue plays (engine PLM-148 / ADR 0047) — the classic music-under-dialogue effect. Hold Space to talk; the music dips, then swells back when you stop.
Run from root
Section titled “Run from root”% ./plume3d audio_ducking_demoHold Space: the second tone (the “voice”) sounds and the music drone ducks about 14 dB; release it and the music rises back over ~400 ms. A bar shows the music’s live duck level.
What it does
Section titled “What it does”- Creates a Music drone and a Voice tone, each an ordinary streaming
Sourcerouted to aMixer.group(Music/Voice). - Configures the sidechain once:
music.duckUnder(voice, -14, 0.05, 0.4)— duck 14 dB, 50 ms attack, 400 ms release. - Feeds the Music tone every frame (always playing) but only feeds the Voice tone while Space is held. The engine sees a playing source on the Voice bus and ducks the Music bus automatically — no per-frame ducking code in the game.
- Draws the Music group’s
duckGainas aGui.progressbar.
Key pattern
Section titled “Key pattern”import "engine" for Mixer
var music = Mixer.group("Music")var voice = Mixer.group("Voice")
// Configure once — the engine applies it every frame.music.duckUnder(voice, -14, 0.05, 0.4) // amountDb, attack s, release s
// ...later, drive the trigger by playing sound on the Voice bus.