Project Add Sound
project_add_soundAdds an MP3 or WAV sound file to a sprite in a Scratch project, copying it into the project's assets. Accepts only these formats to prevent project load errors.
Instructions
Add a sound to a sprite, copying the file into the project's assets/.
Scratch accepts only MP3 and WAV; other formats make the project refuse to load, with no warning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to an .mp3 or .wav file. | |
| name | No | Sound name in Scratch. Defaults to the filename without its extension. | |
| path | No | Project to modify. Defaults to the active project. | |
| sprite | Yes | Sprite name, i.e. its .gs filename without the extension. The Stage is "stage". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | Yes | ||
| path | Yes | ||
| exists | Yes |