Play Sound
Plays a sound file of the scene's folder (loaded as the scene opens); Finished goes on when it ends.
ƒPlay Sound
Filesounds/chime.oggFinished
Volume1Voice
Pan0
Rate1
Loop
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
in | what happens next | – | – |
Filefile | text | "sounds/chime.…" | – |
Volumevolume | number | 1 | – |
Panpan | number | 0 | – |
Raterate | number | 1 | – |
Looploop | bool | false | – |
Outputs
| Pin | Type |
|---|---|
then | what happens next |
Finishedfinished | what happens next |
Voicevoice | any |
The code it becomes
The graph below written as a script would write it.
let s2_voice = undefined;let q2 = scene.loadSound("sounds/chime.ogg");// On Scene Start(function (v) { s2_voice = v; v.ended.then(function () { }); })(q2.play({ volume: 1, pan: 0, rate: 1, loop: !!(false) }));scene.log(s2_voice);In a graph
◆On Scene Start
ƒPlay Sound
Filesounds/chime.oggFinished
Volume1Voice
Pan0
Rate1
Loop
ƒPrint
In Text
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.