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 Target engine: UE 5.8 . APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use". Covers sound assets, playback from C++, attenuation, concurrency, sound classes and mixes, submix/bus routing, MetaSounds, modulation, Quartz and analysis. Engine side code lives in Engine/Classes/Sound and Components/AudioComponent.h (module Engine ), the mixer in AudioMixer , and the parameter interface in AudioExtensions . Plugin modules: MetasoundEngine / MetasoundFrontend (MetaSounds), AudioModulation , AudioSynesthesia (Beta in 5.8), SubtitlesAndClosedCaptions (Beta in 5.8). Context Read .agents/ue project context.md if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing. Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code. Request is about… Go to Which asset type to author (wave, cue, MetaSound), streaming [Sound Assets]( sound assets) Firing a sound from gameplay code [Playing Sounds]( playing sounds) Fades, pause, volume/pitch, finish callbacks, per instance sends [UAudioComponent Control]( uaudiocomponent control) Falloff, 3D panning, HRTF, occlusion, reverb send, focus [Attenuation and Spatialization]( attenuation and spatialization) Too many voices, footsteps/gunshots stacking, voice stealing [Concurrency]( concurrency) Volume sliders by category, ducking, context mixes [Sound Classes and Sound Mixes]( sound classes and sound mixes) Routing groups, master volume, audio buses, sidechain sources [Submixes, Buses and Sends]( submixes buses and sends) Reverb, EQ, compression on a group of sounds [Submix Effects]( submix effects) Procedural/adaptive audio, runtime parameters, graph building [MetaSounds]( metasounds) Continuous parameter control from gameplay curves/LFOs [Modulation]( modulation) Beat synced stingers, tempo, musical quantization [Quartz Music Sync]( quartz music sync) Reacting to audio (FFT, envelope, offline beat maps) [Analysis]( analysis) Captions, dialogue text [Subtitles]( subtitles) Mobile voice budgets, dedicated servers, backgrounding, VR [Platform Notes]( platform notes) Full worked systems (music manager, ambience, weapon audio) [audio setup patterns](references/audio setup patterns.md) Sound Assets Key USoundBase fields set on every asset: SoundClassObject , AttenuationSettings , ConcurrencySet (or ConcurrencyOverrides with bOverrideConcurrency ), Priority (higher survives voice culling), SoundSubmixObject , SoundSubmixSends , BusSends / PreEffectBusSends / PostAttenuationBusSends , VirtualizationMode . USoundCue nodes: USoundNodeRandom , USoundNodeModulator , USoundNodeMixer , USoundNodeAttenuation , USoundNodeLooping , USoundNodeDelay , USoundNodeDistanceCrossFade , USoundNodeConcatenator , USoundNodeSwitch , USoundNodeWavePlayer . USoundWave::LoadingBehavior ( ESoundWaveLoadingBehavior , Sound/SoundWaveLoadingBehavior.h ): Inherited , RetainOnLoad , PrimeOnLoad , LoadOnDemand , ForceInline . Use ForceInline for short SFX, LoadOnDemand for long music so minutes of audio never sit resident. Read it with GetLoadingBehavior(bCheckSoundClasses) ; override at runtime with OverrideLoadingBehavior(ESoundWaveLoadingBehavior::LoadOnDemand) . Criterion USoundCue UMetaSoundSource Runtime parameters Wave params only Typed inputs (float, bool, int32, string, object, trigger) Procedural DSP No Yes (oscillators, noise, filters) Built at runtime from C++ No Yes — UMetaSoundBuilderSubsystem Use for Randomized pre authored one shots Adaptive music, state driven and synthesized SFX Playing Sounds All functions are UGameplayStatics statics in Kismet/GameplayStatics.h . Never call them on a dedicated server. OwningActor is what per owner concurrency ( bLimitToOwner ) keys on — pass it whenever the sound belongs to an actor. SpawnSound2D has the same leading arguments as PlaySound2D but ends in bPersistAcrossLevelTransition, bAutoDestroy (no OwningActor / bIsUISound ) and returns a component; CreateSound2D takes the same arguments as SpawnSound2D but returns a component that is not playing — call Play() yourself. Choose: fire and forget for one shots, a spawned handle for anything you must fade, stop or re parameterise, and a CreateDefaultSubobject<UAudioComponent member for a permanent per actor loop. UAudioComponent Control UAudioComponent ( Components/AudioComponent.h ) derives USceneComponent and implements ISoundParameterControllerInterface . Per instance routing and filtering, without touching the asset: SetSubmixSend(USoundSubmixBase , float) , SetSourceBusSendPreEffect / PostEffect / PostAttenuation , SetAudioBusSendPostEffect , SetLowPassFilterEnabled / SetLowPassFilterFrequency , the matching high pass pair, and SetOutputToBusOnly . For inline attenuation, set bOverrideAttenuation = true and fill AttenuationOverrides (an FSoundAttenuationSettings ). Each delegate comes in two forms ( Components/AudioComponent.h:441 481 ). The dynamic, Blueprint visible form binds a UFUNCTION with AddDynamic . The ...Native twin binds with AddUObject and also passes the UAudioComponent . The pairs are OnAudioFinished , OnAudioPlayStateChanged , OnAudioVirtualizationChanged , OnAudioPlaybackPercent , OnAudioSingleEnvelopeValue and OnAudioMultiEnvelopeValue . Unbind with RemoveAll(this) in EndPlay . The code for both lists is in [references/audio component reference.md](references/audio component reference.md). Attenuation and Spatialization USoundAttenuation assets wrap FSoundAttenuationSettings ( Sound/SoundAttenuation.h ), which derives FBaseAttenuationSettings ( Engine/Attenuation.h ). Shape ( EAttenuationShape::Type ): Sphere , Capsule , Box , Cone . Curve ( EAttenuationDistanceModel ): Linear , Logarithmic , Inverse , LogReverse , NaturalSound , Custom . NaturalSound matches perceived loudness best for gameplay sources. Listener focus ( bEnableListenerFocus , FocusAzimuth , NonFocusAzimuth , FocusDistanceScale , NonFocusDistanceScale , NonFocusVolumeAttenuation ) lets sounds the player is looking at cut through. bEnableSendToAudioLink controls external AudioLink routing — leave it off for background ambience. Concurrency USoundConcurrency ( Sound/SoundConcurrency.h ) wraps FSoundConcurrencySettings . Assign through USoundBase::ConcurrencySet , or set bOverrideConcurrency and fill ConcurrencyOverrides . One shared concurrency asset per sound family (footsteps, impacts, bullet whizzes). USoundBase::Priority decides who survives once MaxCount is reached. Sound Classes and Sound Mixes USoundClass gives every sound a category with its own Volume / Pitch in FSoundClassProperties , and a parent/child hierarchy. USoundMix holds TArray<FSoundClassAdjuster SoundClassEffects ( SoundClassObject , VolumeAdjuster , PitchAdjuster , bApplyToChildren ) plus FadeInTime . Sound classes are for gameplay driven ducking. For player volume sliders use submix output volume instead — it is a single linear gain with no stack to unwind. Submixes, Buses and Sends Set bMuteWhenBackgrounded = true on music/SFX submixes so they stop when the app loses focus. Sends. FSoundSubmixSendInfo ( Sound/SoundSubmixSend.h ) and FSoundSourceBusSendInfo ( Sound/SoundSourceBusSend.h ) share the same shape: a control method ( ESendLevelControlMethod / ESourceBusSendLevelControlMethod — Linear , CustomCurve , Manual ), SendLevel or MinSendLevel / MaxSendLevel + MinSendDistance / MaxSendDistance , CustomSendLevelCurve , and in 5.8 an explicit filter pair: Audio buses. UAudioBus ( Sound/AudioBus.h , AudioBusChannels of EAudioBusChannels ) is a runtime patch point: sounds send into it, a USoundSourceBus sonifies it back, and submixes can register it. Buses are how you feed a sidechain compressor or an analyser without an extra playback path. Submix Effects USoundSubmix::SubmixEffectChain is a TArray<TObjectPtr<USoundEffectSubmixPreset . Shipping presets in AudioMixer/Classes/SubmixEffects : USubmixEffectReverbPreset , USubmixEffectSubmixEQPreset , USubmixEffectDynamicsProcessorPreset . Swap whole chains for an environment with SetSubmixEffectChainOverride(WorldContext, Submix, Chain, FadeTimeSec) and ClearSubmixEffectChainOverride(WorldContext, Submix, FadeTimeSec) . AddMasterSubmixEffect / RemoveMasterSubmixEffect / ClearMasterSubmixEffects act on the master submix. Source side effects use USoundEffectSourcePreset inside a USoundEffectSourcePresetChain ( Sound/SoundEffectSource.h ). AAudioVolume applies FReverbSettings , FInteriorSettings and submix send/override settings by volume, ordered by Priority . MetaSounds UMetaSoundSource derives USoundWaveProcedural → USoundWave → USoundBase , so it plays through every function above. Drive its typed inputs through ISoundParameterControllerInterface , which UAudioComponent implements (base interface IAudioParameterControllerInterface in AudioExtensions/Public/AudioParameterControllerInterface.h ). Parameter names must match the MetaSound graph inputs exactly. Setting a parameter on a component whose sound is not a MetaSound is a no op, not an error. UMetasoundGeneratorHandle::CreateMetaSoundGeneratorHandle(AudioComponent) ( MetasoundGeneratorHandle.h ) gives access to the running generator: IsValid() , GetAudioComponentId() , ApplyParameterPack(UMetasoundParameterPack ) , GetGenerator() , plus OnGeneratorHandleAttached / OnGeneratorHandleDetached . Read graph outputs with UMetaSoundOutputSubsystem::WatchOutput . Build graphs from code with UMetaSoundBuilderSubsystem::Get() → CreateSourceBuilder / CreatePatchBuilder / CreateSourcePresetBuilder , then AddGraphInputNode , AddNodeByClassName , ConnectNodes , SetNodeInputDefault and Audition . Build(const FMetaSoundBuilderOptions&) is WITH EDITORONLY DATA ; at runtime use Audition or BuildNewMetaSound(FName) ( MetasoundBuilderBase.h:586 ). The underlying document API is FMetaSoundFrontendDocumentBuilder ( MetasoundFrontend/Public/MetasoundFrontendDocumentBuilder.h ). Worked example: [audio setup patterns](references/audio setup patterns.md). Modulation The AudioModulation plugin routes continuous control signals into volume, pitch and filter cutoffs. USoundControlBus carries a value, USoundModulationGenerator produces one (LFO, envelope follower), USoundControlBusMix sets bus targets, USoundModulationPatch maps between parameters. Bus, generator and patch derive USoundModulatorBase ; USoundControlBusMix is a plain UObject ( SoundControlBusMix.h:37 ). On assets, modulation lives in FSoundModulationDestinationSettings ( Sound/SoundModulationDestination.h ): a base Value plus a TSet<TObjectPtr<USoundModulatorBase Modulators . In native Audio::FModulationDestination code the setter is SetModulators . Quartz Music Sync UQuartzSubsystem is a UTickableWorldSubsystem ( AudioMixer/Public/Quartz/QuartzSubsystem.h ) that runs sample accurate musical clocks. Subscribe to the metronome with ClockHandle SubscribeToQuantizationEvent(this, EQuartzCommandQuantization::Beat, OnBeat, ClockHandle) (or SubscribeToAllQuantizationEvents ); the FOnQuartzMetronomeEventBP callback receives (FName ClockName, EQuartzCommandQuantization, int32 NumBars, int32 Beat, float BeatFraction) . Tempo changes go through SetBeatsPerMinute , which is itself quantized. Analysis Real time, on a USoundSubmix : Band based FFT callbacks go through AddSpectralAnalysisDelegate(WorldContext, BandSettings, Delegate, UpdateRate, De