Ambient/Environmental Noise Demo | Unreal Engine
Channel: NVNT Games
Date: 2024-03-28

Usage:
Can be used to add environment noises to your horror game. Fully configurable and easy to use when importing various sounds and wanting to play them at random!

Steps:
1) Create file "AmbientAudioCue" [Sound Cue]
 - Use "Int Switch" to determine playlist.
 - Apply desired effects for variety (modulator).
 - Delay output preventing high freq. of plays (random number in range).
 ** Do Not use Loop (need audio finished event for attenuation) **

2) Create files "Direction [Enum]" + "AmbientPlaylist [Enum]" 
 - Populate with directions (ex. Backward, Left, Up).
 - Populate with playlists (can correspond order with "Int Switch" var).
 ** Always use "None" for 0 Index **

3) Create file "AmbientLevelType" [Class] + Attach "AmbientAudioCue" [Cue]
 - [Sound Cue] Configure attenuation settings & disable auto activate.
 - [Class] Add variables for range, attachment, direction, and playlist.

4) Add function "SetAmbientPlaylist" [Script] to "AmbientLevelType" [Class]
 - Add playlist enum "SetPlaylist" to assign a specific playlist.
 - Add bool "LoopPlaylist" to support looping after finished playing.
 - Add bool "Disable" to stop playing (not needed with level stream).
 - Add direction enum array "AttenuationDirection" to force direction.

5) Translate "Playlist" enum in "SetAmbientPlaylist" [Script]
 - Get "Playlist" enum order & assign to the int for "AmbientAudioCue".
 - Configure offset for "AmbientAudioCue" to move to.
 ** Combinations using Array (Ex. back,left,right,up = quarter sphere) **

6) Add looping behavior to "BeginPlay" [script] in "AmbientLevelType" [Class]
 - Bind audio finished and call "SetAmbientPlaylist" with loop checked.
 - Call "SetAmbientPlaylist" with the configuration variables passed.
 - Once the sound has finished it will select another sound.
 ** Manual loop keeps the attenuation moving after sound is finished **

Chapters
0:00 Demo and Overview
0:43 Project Usage
1:57 Closing thoughts