Homebrew Audacity



TWiLightMenu supports custom sound files in themes. Place your sound files under the sound subdirectory in your theme folder, for example for the white theme, you would place the files at themes/white/sound/sfx.bin and themes/sound/bgm.pcm.raw respectively. Both files are optional, if one is missing the default music will be used. You should then also set the music option in settings to “Theme”.

These instructions assume you have devkitPro installed with mmutil. You can get devkitPro at the devkitPro website.

Sound Effect Bank #

Audacity is free of charge. No registration or hardware purchase required. 64-Bit Audacity on Windows is only available as a 32-bit application that may be used on 32-bit or 64-bit systems. Homebrew complements macOS (or your Linux system). Install your RubyGems with gem and their dependencies with brew. “To install, drag this icon” no more. Homebrew Cask installs macOS apps, fonts and plugins and other non-open source software. $ brew install-cask firefox.

The sound effect bank contains sound effects such as the icon select sound, etc.

Homebrew Audacity Free

FileDescription
startup.wavPlayed on startup. See the section on Startup sound for more details
back.wavBack
launch.wavPlayed when launching a game
select.wavPlayed when moving the select cursor
wrong.wavPlayed when reaching the end of the page
switch.wavPlayed when switching pages
stop.wavPlayed on the DSi Theme when the select cursor stops moving
bgm.pcm.rawNot part of the soundbank. See the section on Menu BGM for more details

You can then run make to make the sound effect bank. All files listed above, except bgm.pcm.raw are required, but you can make them silent.

Your resulting sfx.binmust be under 512000B = 512 kB. Any larger will result in either crashes or some sounds not playing fully.

Startup sound #

While the other sound effects will work with any WAV file, the startup sound must be in a specific format in order to work properly, otherwise there will be a gap between when the startup sound stops and the background music begins.

The startup.wav file must be 16-bit 16 kHz. You can use Audacity for example to convert to this format. Once the file is loaded in Audacity, change the Project Rate (Hz) to 16000, then press Shift+M, and change the Format to 16-bit PCM.

If your file is in Stereo, you should also go to Tracks > Mix > Mix Stereo down to Mono.

Homebrew audacity ffmpeg

You must set PlayStartupJingle=1 in your theme.ini for the startup jingle to play.

Homebrew

Menu BGM #

Menu BGM needs to be a 16-bit 16 kHz Mono raw PCM file. Below are two methods for converting audio files into that format.

Unlike sfx.bin, bgm.pcm.raw can be arbitrarily large.

ffmpeg #

The simplest way to convert music for use in TWiLight Menu++ is to run this ffmpeg command in a terminal:

Replace [input file] with the name of the file you want to convert. You can usually do this by simply dragging the file onto the terminal window with the cursor in the correct location.

AudacityHomebrew Audacity

Audacity #

If you don’t want to use the command line you can also convert using Audacity.

To convert the audio:

  1. Load the file in Audacity
  2. If your file is in stereo, click on the song then select Tracks > Mix > Mix Stereo down to Mono
  3. Change the Project Rate (Hz) in the bottom left to 16000

To export in the correct format:

Homebrew Audacity

  1. Select File > Export > Export Audio...
  2. Set File Type to Other uncompressed files
  3. Set Header to RAW (header-less)
  4. Set Encoding to Signed 16-bit PCM
  5. Set the output name to bgm.pcm.raw and click Save
  6. Click OK to the metadata editing

Now you have a bgm.pcm.raw file that can be copied to the sound subfolder in your theme folder.

Homebrew Audacity Download

Need help? Join our Discord server: DS⁽ⁱ⁾ Mode Hacking! (English only)