Skip to content

Audio actions

11 actions in the Audio category. Each block mirrors how the action appears in the editor's sidebar.

Fade Sound

Start
Fade Sound Audio
Player not set | To Volume 0.0 | Duration 0.5 | → Finished

Fades an audio player toward a target volume over time. -80 is silence and 0 is full. Wire Finished and the flow moves on by itself when it ends, with no timer of your own. On enter it plays once; on update or physics it starts again as soon as the last one ended, so it keeps repeating while the state runs. Leaving the state before it ends jumps to the target volume, so it never stops at some level in between.

Input Type Default Description
Player Node - The audio player to fade.
To Volume float 0.0 Target volume in decibels, -80 for silence and 0 for full.
Duration float 0.5 How long the fade takes, in seconds.
Branch Goes to
Finished Where to go when the animation ends. Leaving the state first cancels it, so it never fires late.

Phases StartEvery FramePhysics

Is Sound Playing

Every Frame
Is Sound Playing Audio
not set | → True | → False

Answers whether an audio player is still playing, which is how a state waits for a sound to finish. It can branch on the answer or hand it to a field that takes a yes or no.

Input Type Default Description
Player Node - The AudioStreamPlayer to check.
Output Type Description
Yes bool Where to store whether the sound is still playing.
Branch Goes to
True Where to go while the sound is still playing.
False Where to go once the sound has stopped.

Phases StartEvery FramePhysics

Play Music

Start
Play Music Audio
Player not set | Sound not set | Fade 1.0 | → Finished

Swaps the track of a music player, fading the old one out and the new one back in. Wire Finished and the flow moves on by itself when it ends, with no timer of your own. On enter it plays once; on update or physics it starts again as soon as the last one ended, so it keeps repeating while the state runs. Leaving the state before it ends finishes the swap, so the new track never stays silent with the old one loaded.

Input Type Default Description
Player Node - The audio player that holds the music.
Sound AudioStream - The music file to play.
Fade float 1.0 How long the whole swap takes, in seconds, split between the fade out and the fade in.
Branch Goes to
Finished Where to go when the animation ends. Leaving the state first cancels it, so it never fires late.

Phases StartEvery FramePhysics

Play Random Sound

Start
Play Random Sound Audio
Player not set | Sounds not set

Picks a random sound from a list and plays it on an audio player. Use it to vary a footstep or a hit so it does not sound repetitive.

Input Type Default Description
Player Node - The audio player to play through.
Sounds Array - The list of sounds to pick from.

Phases StartEvery FramePhysicsEnd

Play Sound

Start
Play Sound Audio
not set

Plays a sound from an audio player. One player carries one sound at a time, so playing again cuts the first one short, and raising Max Polyphony on the player is what lets three coins picked up in a row all ring out together.

Input Type Default Description
Player Node - The AudioStreamPlayer to play.

Phases StartEvery FramePhysicsEnd

Play Sound At

Start
Play Sound At Audio
Sound not set | Position not set | Volume 0.0

Plays a sound from a temporary player added to the scene, so it still plays when this node is destroyed. The player frees itself once the sound ends.

Input Type Default Description
Sound AudioStream - The sound file to play.
Position Variant - Where the sound comes from. Leave it empty to play at the spot of this node.
Volume float 0.0 How loud the sound is in decibels, 0 for full and -80 for silence.

Phases StartEvery FramePhysicsEnd

Set Bus Volume

Start
Set Bus Volume Audio
Bus 'Master' | Volume 0.0

Sets the volume of an audio bus by name, such as Master or Music. -80 is silence and 0 is full. It affects every sound routed through that bus.

Input Type Default Description
Bus String 'Master' The name of the audio bus to change.
Volume float 0.0 The new volume in decibels, -80 for silence and 0 for full.

Phases StartEvery FramePhysicsEnd

Set Pitch

Start
Set Pitch Audio
Player not set | Pitch 1.0

Changes the playback speed of an audio player, which also shifts its pitch.

Input Type Default Description
Player Node - The AudioStreamPlayer to adjust.
Pitch float 1.0 Playback speed multiplier, where 1 is normal and 2 is twice as fast.

Phases StartEvery FramePhysicsEnd

Set Volume

Start
Set Volume Audio
Player not set | Volume dB 0.0

Sets how loud an audio player is, measured in decibels.

Input Type Default Description
Player Node - The AudioStreamPlayer to adjust.
Volume dB float 0.0 Loudness in decibels, where 0 is the original volume and -80 is silent.

Phases StartEvery FramePhysicsEnd

Stop All Sounds

Start
Stop All Sounds Audio
not set

Stops every audio player under a node, whatever kind it is. Use it to silence a level at once, such as on a pause or a game over.

Input Type Default Description
Root Node - The node to search under, usually the level or the scene root.

Phases StartEvery FramePhysicsEnd

Stop Sound

Start
Stop Sound Audio
not set

Stops a sound that an audio player is playing.

Input Type Default Description
Player Node - The AudioStreamPlayer to stop.

Phases StartEvery FramePhysicsEnd