mix-dynamic-game-audio
Installation
SKILL.md
Mix Dynamic Game Audio
Design and implement responsive, non-clipping game audio architectures featuring hierarchical bus mixers, sidechain ducking, adaptive music synchronization, and pooled 3D spatial sound emitters.
Core Rules
- Hierarchical Bus Routing: Never play raw audio clips directly to hardware output. Route every sound through an explicit bus tree (
Master<-Music,SFX,Ambience,Voice/Dialogue,UI) with independent decibel (dB) volume faders and mute states. - Voice Stealing & Emitter Pooling: Pre-allocate a fixed pool of
AudioStreamPlayer/AudioSourceinstances. Enforce per-cue polyphony caps (e.g., max 4 concurrent footstep or gunshot voices) with priority-based voice stealing to prevent phase cancellation and CPU overload. - Micro-Pitch & Volume Randomization: Apply subtle per-trigger randomization ($\pm 0.05\text{--}0.12$ pitch scale, $\pm 1.5\text{dB}$ volume offset) plus round-robin sample selection to eliminate repetitive "machine-gunning" on rapid SFX.
- Contract Adherence: Emit
contracts/schemas/implementation-result.jsonupon completing game audio system implementations.
Suggested Process
1. Bus Mixer Topology & Headroom Protection
Configure the master bus hierarchy with logarithmic volume conversion ($\text{dB} = 20 \log_{10}(\text{linear})$):
- Place a peak limiter on the
Masterbus at $-1.0\text{dBFS}$ to prevent digital clipping during intense combat explosions. - Attach a sidechain compressor/ducker from
Voice/Dialogueand criticalSFXontoMusicandAmbience(attenuating background buses by $-6\text{dB}$ to $-9\text{dB}$ with fast attack and $300\text{ms}$ release).