ue-audio-system

Use this skill when working with audio, sound, music, UAudioComponent, PlaySoundAtLocation, SoundCue, MetaSound, attenuation, submix, concurrency, SFX, or spatial audio in Unreal Engine. See references/audio-setup-patterns.md for music system and ambient soundscape architectures. For VFX audio synch

By quodsoler · 796 installs

npx skills add quodsoler/unreal-engine-skills --skill ue-audio-system

Source repository · Upstream listing

UE Audio System You are an expert in Unreal Engine's audio systems, covering UAudioComponent, sound asset types, spatial attenuation, concurrency management, submix routing, MetaSounds, and runtime audio analysis. Context Check Before implementing audio, read .agents/ue project context.md for: Audio plugins enabled (Resonance Audio, Steam Audio, Wwise, FMOD, MetaSound plugin version) Target platforms — mobile has strict voice limits; consoles differ from PC Dedicated server flag — audio must be skipped server side or it will crash/log errors VR flag — VR projects require binaural spatialization settings Information Gathering Ask about: 1. One shot SFX, looping ambient, music, UI feedback, or dialogue? 2. Spatialized (follows actor) or global 2D? 3. Concurrency concern (gunshots, footsteps, explosions)? 4. Runtime control needed (fade, pause, parameter changes)? 5. MetaSound procedural or pre authored SoundCue/SoundWave? Sound Asset Hierarchy USoundWave — Import .wav/.ogg/.flac. Set SoundClassObject and AttenuationSettings on asset. USoundCue — Node graph combining multiple waves. Key nodes: USoundNodeRandom , USoundNodeModulator , USoundNodeMixer , USoundNodeAttenuation , USoundNodeLooping , USoundNodeDelay , USoundNodeDistanceCrossFade . UMetaSoundSource — Procedural audio graph. Declare typed inputs (float, bool, int32, trigger). Set parameters at runtime via UAudioComponent::SetFloatParameter , SetBoolParameter , SetIntParameter . Streaming Long Audio For music and ambient tracks exceeding ~30 seconds, set USoundWave::LoadingBehavior : ESoundWaveLoadingBehavior::ForceInline for short SFX, RetainOnLoad for music loaded at level start. Long files should use LoadOnDemand to avoid loading the full waveform into memory. In the editor: SoundWave asset → Details → Loading → Loading Behavior. Playing Sounds from C++ Fire and Forget Spawn with Handle UAudioComponent as Permanent Actor Component Playback Control Delegates (AudioComponent.h) Sound Attenuation (SoundAttenuation.h) Defined in USoundAttenuation assets (wrapping FSoundAttenuationSettings ). Assign via USoundBase::AttenuationSettings or pass as override to play functions. Attenuation shapes ( EAttenuationShape ): Sphere (default, omnidirectional), Capsule (elongated sources), Box (room shaped), Cone (directional like spotlights). Distance model ( EAttenuationDistanceModel ): Linear , Logarithmic (realistic), NaturalSound (perception matched, recommended), Inverse , LogReverse , Custom (curve driven). Audio LOD Distant sounds can skip processing. Use bAttenuateWithLPF = true with LPFRadiusMin / LPFRadiusMax to low pass filter far sounds before full attenuation drops them. Set bEnableSendToAudioLink = false for background ambience that does not need external routing. USoundBase::Priority (0.0–100.0, default 1.0, higher = more important) determines which voices survive when hitting the max channel count set in Audio Settings. Concurrency (SoundConcurrency.h) USoundConcurrency controls simultaneous voice count. Assign via USoundBase::ConcurrencySet ( TSet<USoundConcurrency ) or ConcurrencyOverrides (inline FSoundConcurrencySettings when bOverrideConcurrency = true ). Submixes and Sound Classes (SoundSubmix.h) Typical tree: Master {Music, SFX, Voice, Ambient}. Music submix uses bMuteWhenBackgrounded = true . USoundSubmix::SubmixEffectChain holds USoundEffectSubmixPreset assets (reverb USubmixEffectReverbPreset , EQ USubmixEffectEQPreset , dynamics). Submix Effect Chain Sound classes define volume/pitch hierarchy parallel to submixes. Assign via USoundBase::SoundClassObject . USoundMix assets define per USoundClass volume and pitch adjustments. Push/pop lets you layer context dependent audio profiles (combat, stealth, underwater) without manual volume bookkeeping. MetaSounds UMetaSoundSource derives from USoundBase — plays anywhere a USoundBase is accepted. Criterion SoundCue MetaSound Runtime parameters Limited (wave params) Typed inputs, full parameter system Procedural audio No Yes (oscillators, noise, DSP filters) Reactive to gameplay Via parameter nodes Native — bind any float/bool/trigger Use when Randomized pre authored sounds Adaptive music, procedural SFX, state driven audio Submix Spectrum Analysis and Envelope Following (SoundSubmix.h) Module Dependencies Audio Analysis Submix Spectrum and Envelope See the existing submix analysis section above for real time analysis via USoundSubmix . Non Real Time Analysis (NRT) UAudioAnalyzerNRT is the abstract base class for offline analyzers. ULoudnessNRT and UOnsetNRT derive from UAudioSynesthesiaNRT , which in turn derives from UAudioAnalyzerNRT . For offline audio analysis (e.g., beat detection for rhythmic gameplay), use the Audio Synesthesia plugin: Why NRT : Pre analyze tracks to generate beat maps, loudness curves, or onset markers. Use the data at runtime for music driven gameplay without per frame FFT overhead. Common Mistakes and Anti Patterns Spawning a new AudioComponent every fire event Playing 3D sounds without attenuation Ignoring concurrency on high frequency sounds Playing audio on a dedicated server Forgetting to unbind delegates before destruction Using PlaySound2D for in world sounds Platform and Edge Case Considerations Mobile — 16–32 voice limit. Use aggressive concurrency. Prefer resident loading for SFX. Disable HRTF unless the platform supports it. Dedicated servers — Guard all audio calls with GetNetMode() != NM DedicatedServer . Streaming audio — Set LoadingBehavior = LoadOnDemand on long music SoundWave assets. Never load minutes of music resident. App focus loss — Set bMuteWhenBackgrounded = true on music/SFX submixes. For custom handling: Focus Loss Handling VR — Enable bSpatialize = true and SpatializationAlgorithm = SPATIALIZATION HRTF on all 3D attenuation assets. Audio LOD — Use bEnablePriorityAttenuation to reduce priority of distant sounds before voice budget culling. Related Skills ue actor component architecture — UAudioComponent lifetime, attachment, and replication patterns ue niagara effects — synchronizing audio events with particle system callbacks ue cpp foundations — delegate binding patterns, UPROPERTY and UFUNCTION macros