• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Magnius Guide to Pokemon Music Hacking

Dr. Seuss

Will finish GS Chronicles, I swear!
522
Posts
10
Years
Can you import Nintendo-DS music (like from Diamond, Pearl, Platinum, Black, White) music into a GBA hack? I would like to know, because I would like to make a Diamond/Pearl game in the future.

NDS music can be exported in Midi format, and mid2agb can work with any music in midi format, yes, you can export nds music and insert them in a GBA ROM
 
1
Posts
11
Years
  • Seen Sep 23, 2019
Can someone help? I'm trying to insert a song I made into Pokemon Firered. At first it came out bad but after some tinkering with the midi, I managed to fix most of it. The only thing that doesn't work are the drums. In sappy it works all fine, but in the rom, when playing, it just doesn't play.
 

Lunos

Random Uruguayan User
3,108
Posts
15
Years
Now click on "Assemble that ugly thing!" and wait for the program to finish assembling the song. Congrats, you've assembled the file.

Nope. No, I didn't.

EDIT: Left the .s Midi inside mid2agb folder and now I've got a different error.
UtBhkWS.png
 
Last edited:

Jakob99

Worlds greatest trainer.
82
Posts
11
Years
I'm trying to import songs from Breath of Fire but when I export them, they all sound like they were exported from the gameboy color, not the Gameboy Advanced which is what console this game was rereleased on. Anyone know how to fix this? I have the sound files uploaded here. The tracks I want to use are tracks 18, 34 and 36. Give them a listen and you'll see what I mean. Any help is appreciated.

P.S. I do have a thread on this situation waiting approval but that can be trashed.
 
Last edited:
62
Posts
5
Years
So when I imported my song the game decided to speed it up. Has this happened to anyone? In sappy the song plays normal but in game it's sped up.
 

RoadToCerulean

A Ordinary Kanto Lover
205
Posts
7
Years
So when I imported my song the game decided to speed it up. Has this happened to anyone? In sappy the song plays normal but in game it's sped up.

This might be the issue that the tempo (by default) is 120 but the parameter is not set in the .s file. You can open Anvil Studio and manually set the tempo to 120, save the song, and re-assemble it. If this still fails, open up the .s file in Notepad++ and add this line to the very beginning of Track 1:
Code:
.byte	TEMPO , 120*[YOUR_SONG_NAME]_tbs/2
Change the text inside the brackets to fit your song's name (the song name should not contain spaces).
 
Last edited:
62
Posts
5
Years
This might be the issue that the tempo (by default) is 120 but the parameter is not set in the .s file. You can open Anvil Studio and manually set the tempo to 120, save the song, and re-assemble it. If this still fails, open up the .s file in Notepad++ and add this line to the very beginning of Track 1:
Code:
.byte	TEMPO , 120*[YOUR_SONG_NAME]_tbs/2
Change the text inside the brackets to fit your song's name (the song name should not contain spaces).

Thanks! I've also been having an issue where the song will get distorted to point of it sounding like a parody of the song it once was.

This is what the song is supposed to sound like:https://youtu.be/ud6jDOVcZ1Y

And this is what it sounds like in Sappy. The odd thing is when I export it. It sounds fine, but in game it sounds like this. https://youtu.be/ZpbbEfETi40

If you or anyone else has any info on as to why this is happening, I'd greatly appreciate it.
 

RoadToCerulean

A Ordinary Kanto Lover
205
Posts
7
Years
Thanks! I've also been having an issue where the song will get distorted to point of it sounding like a parody of the song it once was.

This is what the song is supposed to sound like:https://youtu.be/ud6jDOVcZ1Y

And this is what it sounds like in Sappy. The odd thing is when I export it. It sounds fine, but in game it sounds like this. https://youtu.be/ZpbbEfETi40

If you or anyone else has any info on as to why this is happening, I'd greatly appreciate it.

This might be because of the "modulation" or "LFO depth" parameters of the tracks are too large. To make your song sound normal, just open up Anvil Studio and delete all the modulation events in all tracks or change them to 0.
 
62
Posts
5
Years
This might be because of the "modulation" or "LFO depth" parameters of the tracks are too large. To make your song sound normal, just open up Anvil Studio and delete all the modulation events in all tracks or change them to 0.

Thanks I'll try it out! My other question is where does the extra Data for the music go if it was a longer track than the old one? I know we made space for the header, but that barely takes up any bytes whereas when I insert a cry it takes from 4-8k bytes. I've checked the tracks before and after the ones i've inserted and they're fine. I'm just hoping that it's not going to overwrite some important data in the future.
 
62
Posts
5
Years
This might be because of the "modulation" or "LFO depth" parameters of the tracks are too large. To make your song sound normal, just open up Anvil Studio and delete all the modulation events in all tracks or change them to 0.

I'm also having difficulty finding these modulation events. I tried looking through Anvil's User guide, but I didn't see any info on how to point them out or delete them should they be present.

Just wondering exactly what am I looking for, thanks again!
 

RoadToCerulean

A Ordinary Kanto Lover
205
Posts
7
Years
I'm also having difficulty finding these modulation events. I tried looking through Anvil's User guide, but I didn't see any info on how to point them out or delete them should they be present.

Just wondering exactly what am I looking for, thanks again!

Click "View" on the menu bar and select "Event List" in the drop-down list, and you will see every event in the track you're currently viewing, including modulation, pan, volume and others.
 

RoadToCerulean

A Ordinary Kanto Lover
205
Posts
7
Years
Thanks I'll try it out! My other question is where does the extra Data for the music go if it was a longer track than the old one? I know we made space for the header, but that barely takes up any bytes whereas when I insert a cry it takes from 4-8k bytes. I've checked the tracks before and after the ones i've inserted and they're fine. I'm just hoping that it's not going to overwrite some important data in the future.

Each track is a continuous sequence of bytes. As such, it always risks damaging data if it is too long (when overwriting a single existing one). If it does not, then probably the track is not as long as you expected. Check the length of the track via HEX tools such as HxD (free) or UltraEdit (paid).

The header of a song is made up of these things:
Code:
4 bytes: AA 00 00 B2 (AA stands for the number of the tracks, from 01 to 0A);
4 bytes: Pointer to the voicegroup;
4×[number of tracks] bytes: Pointers to each track.
And each track can be independently inserted in any free space (as long as its position is in the header).

In order not to damage crucial data, make sure you correctly calculate the size of the header. Never try to overwrite existing bytes unless it is mandatory (e. g. changing pointers).
 
Last edited:
Back
Top