Help:Sound modding: Difference between revisions

Added notes for Switch modders, as much of this guide was made for Wii U/CEMU modders. - Kiddles
imported>Leoetlino
(guide category)
imported>Kiddles
(Added notes for Switch modders, as much of this guide was made for Wii U/CEMU modders. - Kiddles)
Line 20: Line 20:




'''IMPORTANT:''' ''This game's sound files have a sample rate '''32000Hz'''. The music you get from Youtube and most MP3s are usually in '''44100Hz''' or above, so make sure to convert before you start working on your new files. All your music mods should be in '''32000Hz''' sample rate to avoid distortions and glitches.''
'''IMPORTANT:''' ''This game's sound files have a sample rate '''32000Hz''' for the Wii U version, and '''48000Hz''' for the Switch version. The music you get from Youtube and most MP3s are usually in '''44100Hz''' or above, so make sure to convert before you start working on your new files. All your music mods should be using the appropriate sample rate to avoid distortions and glitches.''




Line 51: Line 51:
[[File:Wavepad_Demo_2,_Selecting_Intro.png|thumb|A zoomed in image of the selection process in Wavepad to create a seamless loop from the outro back into the main song.]]
[[File:Wavepad_Demo_2,_Selecting_Intro.png|thumb|A zoomed in image of the selection process in Wavepad to create a seamless loop from the outro back into the main song.]]
Select a portion of the beginning of the song, find out precisely what ''sample'' you have selected it to (A sample is the most precise unit of song editing, as milliseconds are too imprecise here), and note it down. Then copy/paste your selection onto a new file and give it a fade in. After that, copy that file and paste mix it into the last part of the original song you are using so the intro fades in while the outro fades out.
Select a portion of the beginning of the song, find out precisely what ''sample'' you have selected it to (A sample is the most precise unit of song editing, as milliseconds are too imprecise here), and note it down. Then copy/paste your selection onto a new file and give it a fade in. After that, copy that file and paste mix it into the last part of the original song you are using so the intro fades in while the outro fades out.
Make a note of where your '''new endpoint''' for the song is (in samples, not milliseconds), and delete any excess space after that.
Make a note of where your '''new endpoint''' for the song is (in samples, not milliseconds), and delete any excess space after that. If for some reason the editor you're using doesn't show the ''sample'', get as accurate a time as possible (down to the one-thousanths of a second), and multiply that time, in seconds, by the sample rate of the file (e.g. 7.052 seconds * 48000Hz = 338,496 sample).


IMPORTANT: When you are creating a loop, you must ensure that the start point and end point of the loop are ideally when the wave form reaches 0 amplitude, and one wave is coming up while the other is going down, to ensure optimal flow. This is how you achieve seamless loops. Failure to adhere to these principles means skips, clicks, 'pops' or static will be heard when the song loops.
IMPORTANT: When you are creating a loop, you must ensure that the start point and end point of the loop are ideally when the wave form reaches 0 amplitude, and one wave is coming up while the other is going down, to ensure optimal flow. This is how you achieve seamless loops. Failure to adhere to these principles means skips, clicks, 'pops' or static will be heard when the song loops.
Line 70: Line 70:
Some tracks need to be loaded in by a one-second prefetch that contains compressed data of the BFSTM, and you can find these by analysing the list of .bars file to see if your track has one. All sound effects and battle themes have a bfstp stored inside a respective .bars file, e.g: ''GuardianBGM.bars'' contains the prefetches for the main Guardian theme and outro. Assuming you followed the same looping steps as mentioned above, you should have a Guardian_Main theme that loops, and a Guardian_Outro that does not loop (select 'Keep as non-looping' in Looping Audio Converter). Once the new BFSTMs have been made, you should follow the [https://gamebanana.com/tuts/12856 bfstp fixer] method, where you place bfstpfixer.py, BCFSTM-BCFWAV-Converter, your BFSTMs, and a .bat file with the following code:
Some tracks need to be loaded in by a one-second prefetch that contains compressed data of the BFSTM, and you can find these by analysing the list of .bars file to see if your track has one. All sound effects and battle themes have a bfstp stored inside a respective .bars file, e.g: ''GuardianBGM.bars'' contains the prefetches for the main Guardian theme and outro. Assuming you followed the same looping steps as mentioned above, you should have a Guardian_Main theme that loops, and a Guardian_Outro that does not loop (select 'Keep as non-looping' in Looping Audio Converter). Once the new BFSTMs have been made, you should follow the [https://gamebanana.com/tuts/12856 bfstp fixer] method, where you place bfstpfixer.py, BCFSTM-BCFWAV-Converter, your BFSTMs, and a .bat file with the following code:


<nowiki>for /r %%i in (*.bfstm) do python main.py -format FSTP -bom 0 "%%i"
'''For Wii U'''<br>
for /r %%i in (*.bfstp) do python bfstpfixer.py "%%i"</nowiki>
<nowiki>for /r %%i in (*.bfstm) do python main.py -format FSTP -bom 0 "%%i"</nowiki><br>
<nowiki>for /r %%i in (*.bfstp) do python bfstpfixer.py "%%i"</nowiki>
 
'''For Switch'''<br>
*'''Important:''' ''The first line is used to also convert your current BFSTM(s) to use a little endian, since Looping Audio Converter converts using a big endian. Be sure to copy the new BFSTMs into your working folder after they've been converted, otherwise your audio won't play ingame.''<br>
<nowiki>for /r %%i in (*.bfstm) do python main.py -format FSTM -bom 1 "%%i"</nowiki><br>
<nowiki>for /r %%i in (*.bfstm) do python main.py -format FSTP -bom 1 "%%i"</nowiki><br>
<nowiki>for /r %%i in (*.bfstp) do python bfstpfixer.py "%%i"</nowiki>


in the same directory and run the .bat file. This should output 2 new files for each BFSTM you had. Keep the .bfstps that have 'fixed' at the end of their name.
in the same directory and run the .bat file. This should output 2 new files for each BFSTM you had. Keep the .bfstps that have 'fixed' at the end of their name.
Anonymous user