What you will need:
1. Latest release of nxdumptool
2. A copy of Mario Kart 8 Deluxe (Physical or Digital)
3. A microsd card (duh)
7. AboodXD's BFSTM-BCFWAV-Converter
9. A hex editor such as HxD
10. The latest release of Python
11. A song of your choosing
FOR MULTI CHANNEL BFSTMS:
Multi BRSTM Converter GUI
I have tried other ways of injecting bfstp headers into BGM.bars, could not produce successful results, so right now hex editing is the only way.
1. Obtaining your BGM.bars and your bfstp headers.
If you have a physical version of Mario Kart 8 Deluxe, insert that into your Switch right now.
First of all, launch the hbmenu by overriding a game by launching a game while holding down the R button. Next open up nxdumptool and select dump gamecard content or dump sd card / emmc (nanduser) content. After selecting Mario Kart 8 Deluxe, go down to RomFS options and select that
Next have fat32 support and "save data to CFW directory" enabled, then choose browse RomFS section.
Now go into Audio\Static, where you will find BGM.bars. Hover over that and select A to dump the file. It will be located in SD:\atmosphere\contents\[titleid]\romfs\Audio\Static.
Afterwards either turn off your switch, remove your micro sd card and place it in your computer or use and ftp client such as FIleZilla to transfer the file over to your computer.
Finally, open BARSviewer and open your BGM.bars. Then click extract to extract all of your bfstp files.
2. Converting the musicIn Audacity, open up the song of your choosing. You may alter the song as much as you like. Once ready, go to file -> export -> export to wav, and name the song to the exact same name of the song you are going to replace in-game. A full list of songs can be found here. *Note: The N at the end of the name is for laps 1 & 2, and the F is for lap 3.
Next, open up BrawlBox and select new -> audio -> BRSTM audio stream, and choose your N song. If you want your audio to loop, find the loop samples and enter them into the loop start and end boxes. Make sure your audio is encoded in PCM16 by hitting the drop down box that says ADPCM, and change it to PCM16. Hit okay and let it convert. Once it is done go to file -> Save as... -> and make sure to save it as a BRSTM. Do the same thing for your F song.
Next go to NinAudio and open your N or F BRSTM (doesn't matter) by clicking the ... and opening your file. Make sure the loop points are correct, then check the box next to little endian and click save, then save your file as a BFSTM.
Next, download the latest version of Python, and when installing it, you will see a box saying "Add python to PATH". Click on this box and make sure it has a check mark inside of it. After Python has installed, download AboodXD's BFSTM-BCFWAV-Converter, extract it, and move the bfstm of your song to the folder. Click on the address bar in file explorer and type in cmd, then hit enter. In the command prompt, type in this command:
main.py-format FSTP -bom 1 "name of your bfstm.bfstm"
Replace "name of your bfstm" with the actual name of your song. If done correctly you should have a .bfstp of your song.
FOR MULTI CHANNEL BFSTMS:
Some songs use 6+ channels, which will require the exact same amount of channels in your bfstm. This includes Water Park, Super Bell Subway, Electrodrome, Mt. Wario, Cloudtop Cruise, and Dolphin Shoals. For this we will copy the song about 2 more times in audacity, and split all the channels to mono, giving us 6 channels. Go to the 2 channels below the top 2 channels and silence them. Next go to file -> export -> export multiple, and make sure they are .wav files. Download and extract the multi brstm gui builder and export all of the channels (as individual songs) to the wav folder inside of the Multi BRSTM Builder GUI folder. Rename each channel to these EXACT numbers from top to bottom: 1, 2, 3, 4, 5, 6.
Go back to the main folder and startup the Multi BRSTM Gui application. Select the exact amount of channels your song has and then open up brawlbox. Go to file->new->new brstm audio stream, and open any of the wav files in the wav folder. In Multi BRSTM Gui tick the "Loop" box and in brawlbox copy your loop samples (just have 0 in the start box and the sample at the point where the song ends if you don't care) and paste them in the end box in Multi BRSTM Gui. Then in the box for naming, name the file to the song you will replace and click "Build batch file". Then run build.batch in the Multi BRSTM Gui Builder folder. *This will take a while, please be patient!
Do the same thing as stated above in NinAudio, then convert to a bfstp as stated above.
3. Replacing the header in BGM.barsBGM.bars is the file used to make sure our music is played properly in-game so there will be no issues. *It is recommended you keep a backup of this file in case if anything goes wrong! Now download and install HxD, and open up your BGM.bars, the bfstp of your custom bfstm, and the original bfstp header inside of the BGM folder. (Make sure it is named to the song you are about to replace!) Rename your custom bfstp to something like "pBGM_WU_TECHNO_N(mod).bfstp". This part is VERY confusing for some people, so here is a video tutorial on how to do this: http://www.mediafire.com/file/5p72v0svuco4yol/YouCut_20200419_223109347.mp4/file
3. Installing the mods.Remove your microsd card from your switch (make sure it is powered off first!) and insert it into your pc, or use an ftp client to transfer files. In the folder of your custom firmware, go to contents (titles on AMS 0.9.4 and below) and go back to contents\[titleid]\romfs\Audio. Move your BGM.bars to the Static folder, and make a new folder called Resource, then make a new folder called Stream. Place your bfstm(s) in here. Eject your microsd card from your computer, boot into the cfw of your choosing, start Mario Kart 8 DX, and test out the song, hopefully it works!
F.A.QQ: I have speed issues (too slow or too fast)!
A: BGM.bars isn't present. Make sure it is in your cfw folder\contents\mario kart 8 dx titleid\RomFS\Audio\Static.
Q: I have static when my music starts!
A: You converted your song to a normal bfstm. Make sure it is a PCM16 bfstm and try again.
Q: My game crashed/My switch froze!
A: You did something wrong when replacing the bfstp header. Read the instructions over again carefully and try again.
Q: My song is muted!
A: You probably converted to a wii u BFSTM. Make sure it is the correct BFSTM.
Q: My switch is banned!
A: Your fault.
Q: Can I share/download someone else's BGM.bars?
A: NO! That is piracy, which is against the law.
Q: it doesnt work!!!!!1
A: First of all, before commenting your actual issue, read the rest of the FAQ and see if it has been already answered. Then comment your actual issue, and be descriptive please, or it will take longer.
For any other questions, contact any of the other helpers or me on Discord:
My discord username: Hellacia#7378
Mario Kart 8 Deluxe Modding: https://discord.gg/hKS9CBQ
Audacity Team (Audacity)