Each sound effect, song, and ambient sound is a file in audio/, with a constant, such as SOUND_SHOP_BELL, that your code plays it with.
What is in the audio folder
| Path | What it holds |
|---|---|
audio/sfx/ | The sound effects, a file each, named after their sounds |
audio/sfx/envelopes/ | The press envelopes that sequenced sound effects share, a file each |
audio/songs/ | The songs, as .bgm files that open in the Song Editor, each named after its song |
audio/mseq/ | The ambient sounds, as MSEQ files named after their sounds, and the radio's four stations |
audio/bank/NAME/ | A sound bank: a sound_bank.xml file and a WAV file for each sample, which you edit in the Sound editor. The bank is always loaded unless a song or the radio loads it. |
audio/presets.xml, audio/drums.xml | Instruments and drums that songs select by ID |
Names and constants
Sounds, songs, and ambient sounds are named after their files. A constant is the file name in uppercase, with a prefix:
| Folder | Prefix | Example |
|---|---|---|
audio/sfx/ | SOUND_ | coin_pickup.xml becomes SOUND_COIN_PICKUP |
audio/songs/ | SONG_ | toad_town.bgm becomes SONG_TOAD_TOWN |
audio/mseq/ | AMBIENT_ | lava_1.xml becomes AMBIENT_LAVA_1 |
File names must start with a lowercase letter and contain only lowercase letters, digits, and underscores.
If you delete one of the game's sounds, songs, or ambient sounds, its constant no longer exists, so change the code that uses it first.