From 964f8eb985d1a894a195797b86282c2f01043d7f Mon Sep 17 00:00:00 2001 From: Just Allie Date: Wed, 4 May 2022 20:40:44 -0400 Subject: [PATCH] Update custom sfx page to make instructions clearer (#64) * Update custom sfx page Also aded makefile required for building the sfx bank * Add clarification, ig * Clarification, pt 2 --- assets/files/Makefile | 33 +++++++++++++++++++ .../_en-US/twilightmenu/custom-dsi-3ds-sfx.md | 17 ++++++---- 2 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 assets/files/Makefile diff --git a/assets/files/Makefile b/assets/files/Makefile new file mode 100644 index 00000000..d427cf5c --- /dev/null +++ b/assets/files/Makefile @@ -0,0 +1,33 @@ +#--------------------------------------------------------------------------------- +.SUFFIXES: +#--------------------------------------------------------------------------------- + +ifeq ($(strip $(DEVKITARM)),) +$(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") +endif + +include $(DEVKITARM)/ds_rules + +# define SFX_WRONG 0 +# define SFX_LAUNCH 1 +# define SFX_STOP 2 +# define SFX_SWITCH 3 +# define SFX_STARTUP 4 +# define SFX_SELECT 5 +# define SFX_BACK 6 + +NAMES := startup.wav wrong.wav launch.wav stop.wav switch.wav select.wav back.wav + +TARGETS := sfx.bin + + +.PHONY: clean all + +all: $(TARGETS) + +sfx.bin : $(NAMES) + @mmutil $^ -d -v -osfx.bin + +clean: + @echo Clean ... + @rm sfx.bin \ No newline at end of file diff --git a/pages/_en-US/twilightmenu/custom-dsi-3ds-sfx.md b/pages/_en-US/twilightmenu/custom-dsi-3ds-sfx.md index 6e8dd246..5780c662 100644 --- a/pages/_en-US/twilightmenu/custom-dsi-3ds-sfx.md +++ b/pages/_en-US/twilightmenu/custom-dsi-3ds-sfx.md @@ -7,30 +7,31 @@ title: DSi/3DS Skins - Custom SFX description: How to use custom background music and sound effects in DSi and 3DS skins for TWiLight Menu++ --- -TWiLight Menu++ 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/white/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". +TWiLight Menu++ 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/white/sound/bgm.pcm.raw` respectively. Both files are optional, if `bmg.pcm.raw` is missing, the default music will be used. The same thing would happen with the sound effects if `sfx.bin` is missing as well. These instructions assume you have devkitPro installed with mmutil. You can get devkitPro at the [devkitPro website](https://devkitpro.org/wiki/Getting_Started). ## Sound Effect Bank -The sound effect bank contains sound effects such as the icon select sound, etc. +The sound effect bank (sfx.bin) contains sound effects such as the icon select sound, etc. |File |Description| |----------|-----------| |startup.wav|Played on startup. See the section on [Startup sound](#startup-sound) for more details| |back.wav |Back | |launch.wav|Played when launching a game| -|select.wav|Played when moving the select cursor| +|select.wav|Played when moving the cursor in the per-game settings and select menu| |wrong.wav|Played when reaching the end of the page| |switch.wav|Played when switching pages| |stop.wav|Played on the DSi Theme when the select cursor stops moving| -|bgm.pcm.raw|Not part of the soundbank. See the section on [Menu BGM](#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. +All the files listed above are required to build a custom sound effect bank. If you want a sound to be mute, you can use a silent audio file. The `.wav` format is mandatory and the encoding *must* be PCM. -Your resulting *sfx.bin* **must be under 512000B = 512 kB**. Any larger will result in either crashes or some sounds not playing fully. +To build the sound effect bank you need to download [this file](/assets/files/Makefile) and put it next to all the `.wav` files that will be used. After all the files are on the same folder, open your terminal (or command line if you are using Windows), change the current directory (`cd`) to the folder where `Makefile` is, and then run the `make` command. + +You will get a resulting `sfx.bin` file that can be copied to the `sound` subfolder in your theme folder. **This file must be under 512000B = 512 kB**. Any file larger than that 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. +While the other sound effects will work with any WAV file with PCM encoding, 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](https://www.audacityteam.org/download/) 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**. @@ -70,3 +71,5 @@ To export in the correct format: 1. 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. + + You should then set the `DSi/3DS Theme Music` option in TWiLight Menu++ settings to "Theme" for your custom BGM to play on the menu. \ No newline at end of file