Sound
This node plays audio files.
The Sound node manages audio playback for sound effects and music.
The Sound node loads and plays an audio file. It supports one-shot playback (sound effects) or looping (music). It provides controls for volume and playback state.
Content
| Data | Description |
|---|
| Source | URL of the audio file (mp3, wav, etc.). |
Playback
| Data | Description |
|---|
| Volume | 0 to 1. |
| Loop | Boolean. If true, repeats when finished. |
| Autoplay | Boolean. Start playing on load. |
Actions
| Signal | Description |
|---|
| Play | Starts playback. |
| Stop | Stops playback and rewinds. |
| Pause | Pauses playback. |
Outputs
Events
| Signal | Description |
|---|
| Ended | Triggered when playback finishes (if not looping). |
Usage
- Set Source to "click.mp3".
- Connect Button Click signal to Sound Play signal.
Background Music
- Set Source to "music.mp3".
- Enable Loop and Autoplay.
- Set Volume to 0.5.
Detailed Behavior
- Overlapping: By default, triggering Play while already playing might restart the sound or play a second instance depending on implementation (usually restarts/overlaps for SFX).
Troubleshooting
- No Sound: Browsers block autoplay audio until the user interacts with the page. Ensure the first sound is triggered by a user action (click/tap).