Tutorial  Updated

How to put custom songs in XY (finally)

Hey guys !
So maybe you have seen me posting threads about this, wanting to know how to do it. Well today I will show you how to do it yourself !
Credits to recordreader and PlatinumMaster for achieving this in first and showing me how to do it myself, super appreciated :)
You will need
- An XY extracted game
-the sound folder
-HxD
-Audacity
- Brawlbox
- Internet connection

Firstly, download everything. Then, download a song from youtube or anywhere where you can get a song (get a song you want in the game). Open it in Audacity, and edit the song how you want. (For the battle songs, I recommend increasing the volume a bit because of the sound effects). Once you are done, export the audio as a WAV 16 bits.

Now open brawlbox and go to file, new, audio, brstm audio stream and open your wav.
Now you can play around to set a start loop point and a end loop point. When you have a good loop, don’t touch anything else and leave brawlbox there (or minimize it) as we will need the start and end values later.

Open HxD and load the xy_sound.bcsar( make a backup of it first) in it. You will also need this pastebin : https://pastebin.com/EJetua4J that was made by soneek. It contains all of the original loop points for every song. In HxD, go to search, Number, and type in the start loop value of the original song. Tick the direction : all then click OK. Now, open your web browser and search for a decimal to hexadecimal converter, and convert YOUR start loop point to hexadecimal. Now you want to REVERSE it. For example, if your start loop point is 233832 and the hexadecimal output is 39168, then the value you want is 68 91 03 00. To back to HxD, and edit the original start loop with your reversed one. Do all the steps again for the end loop point. Once it’s done, save everything and close HxD.

You might have noticed that XY is using .aac audio files. You will need to convert your .wav to .aac. Open your web browser and search for a wav to aac convertor, and convert your wav. Once you get you .aac, you will need to rename it to the oeiginal song file name. For example, if you want to replace the pokemon league music, you will need to name it the same way as the original one, so bgm_xy_pokemon_league.
Do all the steps for every song you want.

Okay you want to load your custom musics. We will be using LayeredFS. In your luma folder, create a titleid folder. In this one, create a folder named with the title id of your game
X: 000400000055D00
Y: 000400000055E00
Now create a romfs folder in this one, then a sound folder. In the sound folder put all your custom .aac AND your edited xy_sound.bcsar, otherwise your songs won’t loop correctly.
If everything was done correctly, it should look like this
/luma/titles/[titleID]/romfs/sound/your-custom-song.aac
xy_sound.bcsar

Put that folder on your SD card and check Enable Game Patching in the luma configuration folder.
And there you go ! If everything was done correctly, you should get custom songs in XY !
PlatinumMaster’s video showcasing this :
Thanks for reading ! (Share this tutorial if you liked it!)
If you plan on making a tutorial video, please credit PlatinumMaster and recordreader.
 
Last edited by XLuma,

XLuma

Pkmn Rom Hacker
OP
Member
Joined
Feb 12, 2017
Messages
490
Trophies
0
Age
23
Location
Quebec
XP
631
Country
Canada
sweet i rather see DPPT music in it or BW/2 may give it a try what format of music MP3?
XY uses .aac format, so you will need to convert your edited .wav to .aac using an online converter. It's all explained before the patching steps

You might have noticed that XY is using .aac audio files. You will need to convert your .wav to .aac. Open your web browser and search for a wav to aac convertor, and convert your wav. Once you get you .aac, you will need to rename it to the oeiginal song file name. For example, if you want to replace the pokemon league music, you will need to name it the same way as the original one, so bgm_xy_pokemon_league.
 

Danielz18

Member
Newcomer
Joined
Mar 30, 2018
Messages
22
Trophies
0
Age
26
XP
371
Country
United States
Hey thanks for this tutorial! I was able to change the trainer battle music, however I have a small problem now, each time that I edit the xy_sound.bcsar for a second time, I always get an error messages when I load the game, so I only can change one game song because if I try to change a second song I get that error, I don´t know what could be the problem. Once again, thanks for the tutorial!

Edit: Never mind! I solved the problem! Thanks man!!!! I can finally change the music. Thank you for this amazing tutorial!
 
Last edited by Danielz18,
  • Like
Reactions: XLuma

XLuma

Pkmn Rom Hacker
OP
Member
Joined
Feb 12, 2017
Messages
490
Trophies
0
Age
23
Location
Quebec
XP
631
Country
Canada
I mean RomFS is fine after doing this?
I heard different sizes may cause issues while playing or even repacking
You don't have to actually repack the whole romFS with LayeredFS, I guess you could put bigger audio files with LayeredFS
 

FedoraMan

Member
Newcomer
Joined
Feb 17, 2017
Messages
5
Trophies
0
Age
28
XP
91
Country
Netherlands
I just want to add to this, saying that, when replacing the hexadecimal values, you don't have to convert the decimal values to hexadecimal values manually. The search function also has a preplace function, so for example, if you had 224532 and have to replace it with 432532, you can just use the replace function (make sure to set the datatype as 'interger number'), and HxD will do the work for you. This saves a bit of time, especially when you're replacing a lot of songs.
 
Last edited by FedoraMan,
  • Like
Reactions: XLuma and MalikTH

Suiko

New Member
Newbie
Joined
Dec 10, 2019
Messages
2
Trophies
0
XP
45
Country
Costa Rica
I have a small problem, I can change the songs, the problem is that all the songs is heard in a more acute tone and is not heard as in the original

Any solution or just happens to me?

Sorry for my bad english
 

XLuma

Pkmn Rom Hacker
OP
Member
Joined
Feb 12, 2017
Messages
490
Trophies
0
Age
23
Location
Quebec
XP
631
Country
Canada
Hey guys, I'm PlatinumMaster, one of the guys who found the method of adding custom music to this game with looping. I may make a tool to make this a bit easier to do for people, given the recent advancements in 3DS hacking recently.
i'd like to see that
 

PikaCHOOO

New Member
Newbie
Joined
Jan 8, 2020
Messages
1
Trophies
0
Age
18
XP
35
Country
United Arab Emirates
i need help. you weren't specific at the part where we had to import the sound and type the loop start value. like where am i suppose to search? it gives me 5 options and i pasted the start value 449992 for the trainer battle music (xy vs trainer) at "find" and selected all directions. It couldn't find the value.

--------------------- MERGED ---------------------------

i have a problem. im struggling with the part where i must type the loop start value and idk which option to choose when i search. i get 5 more options. i went to find and pasted the loop start value and it didnt find anything. yes i have pasted the xy sound file it is the xy vs trainer sound. Could you explain it to me in full detail please??
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Black_Manta_8bit @ Black_Manta_8bit: hey