Playing an Audio File - MetaSound Tutorials for Unreal Engine 5

Michael Gary Dean
10 Oct 202104:39

Summary

TLDRThis tutorial for Unreal Engine 5 guides users on how to play back audio samples using the Wave Player node in MetaSound. It covers setting up a mixer, connecting left and right outputs, and creating a gain control for volume adjustment. The video demonstrates triggering the playback with the 'On Play' input node and selecting a looping sound asset. The process concludes with adjusting the stereo output settings in MetaSound for a complete audio setup.

Takeaways

  • ๐ŸŽฎ This tutorial is for Unreal Engine 5 and focuses on how to use the wave player node in MetaSound.
  • ๐Ÿ”Œ The wave player node offers more options for input and output pins compared to the sign generator.
  • ๐Ÿ”Š The 'Play' input and 'Out Left' and 'Out Right' outputs are the primary concerns for setting up the wave player.
  • ๐Ÿ”„ A mixer is used to connect the wave player outputs to the stereo mixer for proper audio routing.
  • ๐Ÿ“Š A gain control node, 'Wave Level', is introduced to adjust the volume of the sound while playing.
  • ๐Ÿ”ง Initially, the volume is set to zero to prevent unexpected loud outputs.
  • ๐Ÿ”€ The tutorial demonstrates changing MetaSound settings from mono to stereo for proper audio output.
  • โฏ The 'On Play' input node is crucial for triggering the playback of the sound asset.
  • ๐Ÿ” The wave player can be set to loop the sound asset for continuous playback.
  • ๐Ÿ“€ The tutorial includes selecting a sound asset, such as 'fire', to be played back.
  • ๐ŸŽš The volume is controlled using a gain control node, allowing for dynamic adjustments during playback.

Q & A

  • What is the main focus of this tutorial in the Unreal Engine 5 MetaSound environment?

    -The main focus of this tutorial is to demonstrate how to playback samples using the Wave Player node in the MetaSound environment of Unreal Engine 5.

  • How do you start adding a new node in the MetaSound graph?

    -You start by right-clicking in the graph and selecting the Wave Player from the list of options to add a new node.

  • What are the primary inputs and outputs to focus on when setting up the Wave Player node?

    -The primary inputs and outputs to focus on are the 'Play' input and the 'Out Left' and 'Out Right' outputs.

  • Why is a stereo mixer used instead of a mono mixer in this tutorial?

    -A stereo mixer is used because the Wave Player node has both left and right outputs, requiring a mixer that can handle stereo signals.

  • How do you connect the left and right outputs of the Wave Player to a mixer?

    -You connect the left and right outputs by clicking and dragging the output pins to the corresponding inputs of the stereo mixer.

  • What node is used to control the volume of the sound while it's playing?

    -The 'Promote to Graph Input' node is used to control the volume of the sound with a gain control while it's playing.

  • Why is it necessary to change the output format from mono to stereo in MetaSound settings?

    -Changing the output format to stereo is necessary to accommodate the left and right outputs from the Wave Player for a true stereo output.

  • How is the 'Play' input of the Wave Player triggered in this tutorial?

    -The 'Play' input of the Wave Player is triggered by using the 'On Play' input node, which sends a trigger or impulse when the MetaSound is played back.

  • What additional setting is applied to the chosen sound asset in the Wave Player node?

    -The additional setting applied is to make the chosen sound asset loop continuously.

  • How can you select a specific sound asset to play back in the Wave Player node?

    -You can manually select a sound asset in the Wave Player node by using the 'Select Asset' menu and choosing the desired sound, such as the 'fire' asset in this tutorial.

  • How does the tutorial demonstrate controlling the volume of the playback?

    -The tutorial demonstrates controlling the volume by using the 'Wave Level' control, which is a gain control connected to the green float input of the Wave Player.

Outlines

00:00

๐ŸŽ™๏ธ Setting Up Wave Player in MetaSound Tutorial

This tutorial focuses on integrating the wave player node into a MetaSound setup within Unreal Engine 5. The instructor guides the user through the process of adding a wave player node to the graph, connecting it to a stereo mixer for left and right audio outputs, and setting up a gain control for volume adjustment. The tutorial also covers the importance of the 'play' input for triggering sound playback and the need to change MetaSound settings from mono to stereo for proper output. The session concludes with the selection of a sound asset, in this case, 'fire,' and setting it to loop for continuous playback.

Mindmap

Keywords

๐Ÿ’กMetaSound

MetaSound is a term used within the context of Unreal Engine 5 to refer to a new audio system that allows for more dynamic and interactive audio design. In the video, MetaSound is the central theme as the tutorial focuses on how to work with this system to create and control audio elements. The script mentions adjusting settings within MetaSound to change output formats, indicating its role in shaping the audio output of the project.

๐Ÿ’กWave Player Node

The Wave Player Node is a specific component within the MetaSound system used to playback audio samples. The video script provides a step-by-step guide on how to integrate this node into an audio graph, highlighting its importance in the process of audio playback. It is used to trigger and control the playback of audio assets, such as the 'fire' sound asset mentioned in the script.

๐Ÿ’กMixer

A Mixer in audio production is a device that combines multiple audio signals into one or more channels. In the context of the video, a stereo mixer is used to manage the left and right audio outputs from the Wave Player Node. The script describes connecting the outputs of the Wave Player Node to a stereo mixer to handle stereo audio, which is essential for creating a realistic audio environment.

๐Ÿ’กOutput Pins

Output Pins are connectors in an audio graph that allow for the transmission of audio signals from one node to another. The script discusses the importance of these pins in setting up the connections between the Wave Player Node and the mixer, as well as to the final output. They are the pathways through which the audio signals flow within the MetaSound environment.

๐Ÿ’กGain Control

Gain Control refers to the adjustment of the volume or amplitude of an audio signal. In the video, a gain control node is used to adjust the volume of the sound while it is playing. The script mentions creating a 'wavelevel' gain control to manage the volume, demonstrating the use of this concept in real-time audio manipulation.

๐Ÿ’กGraph Input

A Graph Input in the context of the video is a method of controlling parameters within the audio graph, such as volume, from external inputs. The script describes using a 'Promote to Graph Input' node to allow for the control of the wave player's volume, showcasing how external factors can influence the audio experience.

๐Ÿ’กMono and Stereo Output

Mono refers to a single audio channel, while Stereo refers to two audio channels, typically left and right, providing a more immersive audio experience. The script explains the process of changing the output format from mono to stereo in MetaSound settings, which is crucial for setting up the correct audio output for the Wave Player Node.

๐Ÿ’กPlay Input

The Play Input is a trigger that initiates the playback of a sound or audio sample. In the video script, the play input is connected to the 'On Play' node to start the audio sample playback when the MetaSound is triggered. This is a fundamental concept in audio programming, allowing for the timing and control of sound playback.

๐Ÿ’กAsset

An Asset in the context of game development and audio production refers to a resource or file used in the project, such as a sound file. The script mentions selecting an 'asset' from a menu to specify which sound will be played by the Wave Player Node, in this case, the 'fire' sound, demonstrating the process of asset selection and usage.

๐Ÿ’กLoop

Looping in audio terms means to repeat a sound or audio sample continuously. The video script describes setting the selected sound asset to loop, so it plays back repeatedly. This is an important feature for creating background sounds or continuous audio effects in a game or interactive environment.

Highlights

Introduction to a metasound tutorial for Unreal Engine 5 focusing on playback of samples using the wave player node.

Explanation of how to add a wave player node to the graph and the various input and output options it provides.

Creating a mixer structure to connect the wave player's output pins to the left and right audio channels.

Using a stereo mixer instead of a mono mixer for handling left and right audio outputs.

Adding a gain control node to adjust the volume of the sound while it is playing.

Renaming the gain control node for clarity and setting the initial volume to zero to avoid surprises.

Connecting the wave player's output to the metasound's output by changing the output format from mono to stereo in the settings.

Triggering the wave player to play back the sample using the 'on play' input node from the metasound.

Selecting a sound asset to play back from the wave player's asset menu.

Setting the selected sound asset to loop continuously.

Demonstrating the playback of the selected sound asset with the wave level control to fade in the sound.

Controlling the volume using the gain control node connected to the float input.

Outputting the volume to the now stereo output of the metasound environment.

Overview of the completed graph setup for a simple wave player in the metasound environment of Unreal Engine 5.

Differences between the wave player and the sign generator, particularly the play input trigger.

Using the impulse from the 'on play' pin to trigger the wave player to playback the sample.

Finalizing the setup by selecting a sound asset and adjusting the volume using the wave level control.

Transcripts

play00:01

hey and welcome back to another

play00:03

metasound tutorial for unreal engine 5.

play00:06

in the last tutorial we created a simple

play00:08

sign generator and we were able to

play00:10

control the volume with the mixer here

play00:14

in this tutorial we'll we will show how

play00:16

to playback samples using the wave

play00:18

player node

play00:20

so to get started let's right click in

play00:22

the graph here and we'll get a list of

play00:25

options of new nodes to add

play00:27

we're looking for the wave player

play00:32

so if we add this to our graph you'll

play00:34

see there are quite a bit more options

play00:36

for our input and output pins here

play00:39

the ones that we are most worried about

play00:41

is the play

play00:43

as well as our out left and right

play00:47

so i will create a similar structure

play00:49

with a mixer going to an output so let's

play00:52

repeat that

play00:53

if i click and drag the output pin of

play00:56

our audio purple colored out left pin

play00:59

you'll see the options that are

play01:00

available to hook into this pin i would

play01:02

like to connect a stereo mixer

play01:04

now that we have left and right outputs

play01:07

we'll need to use the stereo mixer for

play01:09

both of those those inputs rather than

play01:11

the mono mixer where we just had one

play01:14

so let's hook up the left and right

play01:17

and finally we'll create another gain

play01:19

control

play01:20

in the in the float input here the green

play01:23

colored inputs by clicking and dragging

play01:26

i can get another list of available

play01:28

nodes the one i'm interested in is the

play01:30

promote to graph input so that we can

play01:33

control the volume of our sound while

play01:35

the meta sound is playing

play01:37

so just so that we don't get any nasty

play01:40

surprises let's turn the volume down to

play01:42

zero

play01:43

and i'll just rename this for clarity

play01:45

wave player volume or level let's call

play01:48

it the

play01:50

looks like from up up

play01:52

a

play01:53

uh example that name is in use so let's

play01:56

just call it wavelevel

play01:58

and finally if i want to hook up the the

play02:00

outputs here you'll notice that i now

play02:02

have left and right outputs but in

play02:04

metasound i only have a single mono

play02:07

output

play02:08

so to get stereo output from our meta

play02:11

sound we'll have to go to the meta sound

play02:14

settings

play02:16

and change the output format from mono

play02:18

to stereo

play02:20

you'll notice now the output node has

play02:22

changed we have two inputs here so let's

play02:25

click and drag each of these pins to our

play02:28

outputs

play02:30

and finally we've completed the the

play02:32

graph for a simple wave player setup

play02:35

except for one little detail

play02:38

the thing about the wave player that

play02:40

differs a lot from the sign generator is

play02:42

this little play

play02:43

input here if we don't trigger the sound

play02:46

it will never play back

play02:48

so when we when we opened up a new meta

play02:50

sound we had this little input node here

play02:53

that says on play so basically when we

play02:56

play back our meta sound

play02:58

we will get a trigger or an impulse from

play03:01

this this pin here

play03:02

so we want to use that in input that

play03:06

impulse to trigger our our wave player

play03:09

to play back our sample so i just

play03:11

clicked and dragged again from the on

play03:13

play pin to the play pin

play03:16

and this will play back the asset once

play03:18

we press that play button

play03:20

now

play03:21

one more thing we haven't considered we

play03:23

we haven't even chosen a sound to play

play03:25

back

play03:27

so we can manually select one in the

play03:29

wave asset here we have a menu select

play03:31

asset

play03:32

let's just choose the fire asset

play03:35

and finally i would like that asset to

play03:37

just loop it's just going to play back

play03:39

over and over and over

play03:41

and let's give this a shot

play03:43

so let's press the play button up here

play03:45

and i will slowly fade in the sound with

play03:47

the the wave level control of the gain

play04:04

so as as you can see we triggered the

play04:06

sound using this input node

play04:10

uh the sound comes out the left and

play04:12

right outputs here that are colored

play04:14

purple that correspond to all audio

play04:15

signals

play04:17

we control the volume using this input

play04:19

here the green corresponding to float

play04:22

values or decimal numbers and finally

play04:25

the volume was output to our now stereo

play04:28

output which we changed in the metasound

play04:31

options here

play04:32

so that's it for this tutorial on how to

play04:34

playback samples in the new metasound

play04:36

environment in unreal engine 5.

Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
Unreal EngineMetasound TutorialWave PlayerSample PlaybackAudio MixingGame DevelopmentSound DesignVolume ControlStereo OutputInteractive Audio