How to put custom songs in XY (finally)

Discussion in '3DS - Tutorials' started by Lglaplante, Oct 4, 2018.

  1. Lglaplante
    OP

    Lglaplante Pkmn Rom Hacker

    Member
    3
    Feb 12, 2017
    Canada
    Quebec
    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 Lglaplante, Oct 4, 2018
    LowEndC, 78_Alpha, Danielz18 and 4 others like this.
  2. chrisrlink

    chrisrlink Intel Pentium III Hamster inside

    Member
    8
    Aug 27, 2009
    United States
    inside your crappy old PC
    sweet i rather see DPPT music in it or BW/2 may give it a try what format of music MP3?
     
  3. Lglaplante
    OP

    Lglaplante Pkmn Rom Hacker

    Member
    3
    Feb 12, 2017
    Canada
    Quebec
    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

     
  4. Danielz18

    Danielz18 Member

    Newcomer
    2
    Mar 30, 2018
    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, Jan 3, 2019
    Lglaplante likes this.
  5. LowEndC

    LowEndC ǝɹıℲ ɥʇıM ǝɹıℲ ʇɥƃıℲ

    Member
    3
    GBAtemp Patron
    LowEndC is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jan 25, 2019
    Niger
    You have to die before you can wake.
    thank u
     
    Lglaplante likes this.
  6. Lglaplante
    OP

    Lglaplante Pkmn Rom Hacker

    Member
    3
    Feb 12, 2017
    Canada
    Quebec
    glad it helped !
     
    LowEndC likes this.
  7. j0rv4r

    j0rv4r Member

    Newcomer
    1
    Dec 26, 2018
    Uruguay
    any restriction with file size ?
     
  8. Lglaplante
    OP

    Lglaplante Pkmn Rom Hacker

    Member
    3
    Feb 12, 2017
    Canada
    Quebec
    Apparently no, but I haven't tried with big files (the biggest I went is around 5 MO )
     
  9. j0rv4r

    j0rv4r Member

    Newcomer
    1
    Dec 26, 2018
    Uruguay
    I mean RomFS is fine after doing this?
    I heard different sizes may cause issues while playing or even repacking
     
  10. LowEndC

    LowEndC ǝɹıℲ ɥʇıM ǝɹıℲ ʇɥƃıℲ

    Member
    3
    GBAtemp Patron
    LowEndC is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jan 25, 2019
    Niger
    You have to die before you can wake.
    guess its time to do some experimenting eh? :yay3ds:
     
    Lglaplante likes this.
  11. Lglaplante
    OP

    Lglaplante Pkmn Rom Hacker

    Member
    3
    Feb 12, 2017
    Canada
    Quebec
    You don't have to actually repack the whole romFS with LayeredFS, I guess you could put bigger audio files with LayeredFS
     
  12. FedoraMan

    FedoraMan Newbie

    Newcomer
    1
    Feb 17, 2017
    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, Jun 17, 2019
    Lglaplante and MalikTH like this.
  13. MalikTH

    MalikTH Member

    Newcomer
    1
    Dec 2, 2016
    United States

    Got it to work with music from The Messenger. Thanks for the tutorial!
     
    Lglaplante likes this.
  14. Lglaplante
    OP

    Lglaplante Pkmn Rom Hacker

    Member
    3
    Feb 12, 2017
    Canada
    Quebec
    glad I was able to help you !
     
    MalikTH likes this.
Loading...