Skip to content

Troubleshooting

An audio error is in the form file: message, so the file name tells you where to look. Messages about a table entry start with the kind of entry and its name, such as Instrument 'Preset00': ....

File names

MessageCause and fix
...: this file must be named presets.xmlAudio files use snake case names. Rename Presets.xml to presets.xml. The same message appears for drums.xml and bank/NAME/sound_bank.xml, each with the new name.
the file name must start with a lowercase letter and contain only lowercase letters, digits, and underscoresSound effects, envelopes, songs, and ambient sounds get their names from their files. Rename the file, such as Shop-Bell.xml to shop_bell.xml or Meadow-Theme.bgm to meadow_theme.bgm.
Instrument 'NAME': this file replaces the game's whole file, so leave the entry out instead of deleting itaudio/presets.xml and audio/drums.xml replace the game's files whole, so delete="true" has nothing to remove. Leave the entry out of your copy. The message starts with Drum for audio/drums.xml.

Presets and drums

MessageCause and fix
the name must start with a letter and contain only letters, digits, and underscoresRename the entry. A hyphen or space isn't allowed.
Instrument 'NAME' is listed more than onceThe file has two entries with one name. Keep one. The message starts with Drum for audio/drums.xml.
Drum 'NAME': ID 2 is already used by 'OTHER'Two entries use the same id. Remove the id attribute from your entry to give it a free one.

Sound effects

MessageCause and fix
OneShot: no always-loaded bank has an instrument named NAMEThe wav name doesn't match an instrument in an always-loaded bank. Check the spelling, and check that no song loads the sample's bank. SetInstrument in a sequence or in an ambient sequence gives the same message with its own name in front. Samples in a song bank aren't available to sound effects.
SoundEffect: SoundEffect must have exactly one of OneShot or Tracks, or nothing for a silent soundGive the sound either a OneShot element or a Tracks element.
SoundEffect: a sequence needs a Routing elementA sound with Tracks needs a Routing element.
there are no free routed sound slotsThe game has no room for more sounds of this kind. Delete a sound you don't use.

Banks and samples

MessageCause and fix
Bank 'NAME': there is no bank/NAME/sample.wav file in any layerThe wav attribute of an Instrument names a file that isn't in the bank's folder. Add the WAV file.
Bank 'NAME': there is no bank/NAME/sound_bank.xml file in any layerA bank folder needs a sound_bank.xml file.
the WAV file has 2 channels; only mono is supportedExport the sample as mono.
the WAV file has 24-bit samples; only 16-bit is supportedExport the sample as 16-bit PCM. The floating-point WAV files are not supported; use 16-bit PCM and the WAV file is not uncompressed PCM; use 16-bit PCM messages have the same fix.
Instrument is missing required attribute: keyBaseAdd keyBase="4800" to the instrument.
a bank has at most 16 instruments, but there are 17Move instruments to another bank.
the sample name NAME is also used by bank OTHERRename one of the WAV files and its wav attributes.
a bank name must be 4 characters or fewer: NAMERename the bank's folder.
80 banks are always loaded, but the engine loads at most 79; ...Delete a bank you don't need, or load it from a song instead.
the layer has both this directory and NAME.bk; use only oneThere's both a bank/NAME/ folder and a bank/NAME.bk file. Delete one.
Song 'NAME': bank NAME is used as an auxiliary bank, but its header is ...A bank that a song loads has too many instruments or envelopes. Split it into two banks.
the archive is ...Your audio is too large for the game to load. Use shorter samples or lower sample rates.

Songs and ambient sounds

MessageCause and fix
Song 'NAME': there is no bank/NAME directory or bank/NAME.bk file in any layerThe song loads a bank that doesn't exist. Open the song in the Song Editor and choose its instruments from banks that exist.
the Mamar metadata at ... can't be read: ...The end of the .bgm file is damaged. Open the song in the Song Editor and save it again.
there are more than 256 songsDelete a song you don't use.
mseq: the radio needs all of radio_0 to radio_3, but some are missingThe radio has four stations, and the game's code uses the radio, so it can't be removed. Restore the missing stations.
the radio's stations must all play samples from one bank, but they play samples from ...Change the SetInstrument commands in audio/mseq/radio_0.xml to radio_3.xml to use samples from one bank.
the radio's stations must be XML files, so the build can find the bank they playReplace each radio station's .mseq file with an .xml file.
radio is the name of the radio; rename the fileaudio/mseq/radio.xml would give a second AMBIENT_RADIO. Rename the file.
command 12, EndLoop: loop 0 repeats forever without a DelayAdd a Delay inside the loop in the MSEQ file.

Compiler errors after a deletion

If you delete an entry that C code or an EVT script still uses, the compiler reports that the constant is undeclared:

error: 'SONG_TOAD_TOWN' undeclared (first use in this function)

Search your code for the constant that the error names, and remove or change each use.