View Full Version : [Tutorial] Full Music Editing Tutorial

Green Charizard
October 27th, 2007, 2:18 AM
This has been up on my site for a long time. I still see people asking over music in threads and such, so here it is, my music editing tutorial. I tried to go in to as much depth as possible, rather than the sketchy outlines people have been given.
Music editing, some see this as a hard thing in hacking, personally, I disagree. Sappy is currently the only way to edit music. For some reason when you hit “assemble that ugly thing” there’s a good chance it won’t work. (I'm not sure if this applys to newer versions of Sappy, that have been released since I wrote this, but the tutorial still applies). From experimenting, I don’t think sappy writes the voice group properly sometimes. I can’t confirm this; it’s just a theory. There is a way to overcome this problem; this means you can insert any midi, without failure if you follow my instructions carefully, which I shall write below.


How to edit music

To edit music you need the following things:-
The latest Sappy
Sappy support in your XML file for that game
Your .midi music file
A spare Rom, that your prepared to kill.

Midi2gba (midi2agb.exe) – I’m not providing details on getting this, as everything about it is sketchy.
A hex editor Creating your .s file

First place EVERYTHING in the same folder, if you don’t this’ll get confusing. To convert your midi, drag it onto “midi2agb.exe” If your midi is called “FutabaTown.midi” it will become “FutabaTown.s”. A very easy first step.

Converting your single .s file into multiple .s files

Most people just insert that single .s file, however that tends not to work. So we’re going to convert it into separate ones for each instrument.

To do this you need to sacrifice a ROM, so just copy one, or get an unedited one. Now open up sappy. Find any town, it doesn’t really matter on this. Click import and copy the voicegroup. Now, go to “Assemble Song” click on the .s file we created earlier. Paste the voicegroup into that section, also set the base destination offset to a blank space, so &H800000 if you’ve not already used it. Now click “Assemble that ugly thing!” and wait, click yes to the prompt that appears after a while. Then close that window. Now you need to reload sappy and the ROM that you just edited that you’re sacrificing. Find the town that you edited and click export. Now, tick all the boxes.

Don’t get confused with this next bit; it’s not that difficult.
In the right hand box either type $T or $P. $T numbers the tracks your exporting and $P labels the tracks with an offset. I suggest $T, it doesn’t really matter. Click ok.

Now we finally get to insert your freshly prepared music. Open your REAL ROM (Not the one you sacrificed!). Find the town that you want to write the music to. Go to import. You should see numbered files, or offsets, depending on what you chose earlier. Tick all the numbered/offseted files.

Before we carry on we need to look for blank space in a hex editor, so open one up and look for A LOT of “FF FF FF FF FF…” take a note of the offset on the right.

Back to sappy, enter this offset in the second box down, this “repoints” the track so it doesn’t overwrite data. No click ok and press yes at the prompt. You’re done! Music inserted! Now try it in the game. If it sounds odd go back to where we’re inserting multiple tracks and change the voicegroup box to one of another track (which can be viewed if you click on the town/route and press import, just copy and paste it), This changes the instruments. You can change the instruments by hex, but most of the time, it’s not necessary, good luck everyone!

~by Green Charizard

The Smell
October 30th, 2007, 11:47 PM
Thanks! This worked great for me! I can now fully do my Diamond Remake!


Martin Yiu
October 31st, 2007, 12:11 AM
Ummm... Is there any chance to see the advanced instrument editation tutorial? Because I am pretty sure that some members (and me) would appreciate it. You know, some songs are never perfect if you import them from RSE and use one of default FRLG voicesets.

Green Charizard
October 31st, 2007, 6:43 AM
A good idea, I might be able to do that I read how to do that somewhere, I should be able to implement it in my own way. Personally, I just try it with different voice groups from the game your hacking and rewrite the .s files with different ones. Generally you can find one that fits quite well without having to edit anything. Also by having the multiple .s files you can choose not to use certain ones that may not sound correct.

October 31st, 2007, 7:36 AM
Wow this tutorial is really handy!
Thanx Green Charizard!

November 2nd, 2007, 1:04 AM
I tried replacing a the Wild Pokemon Battle in Fire Red but when I go in the grass the game freezes. Is something wrong?

Green Charizard
November 2nd, 2007, 2:28 AM
Yes, that'll be down to the music. Did you repoint? All you can do is try again, also, make your .s file again, midi2agb may be at fault.

November 9th, 2007, 1:12 PM
Just trying to keep this thread Alive, Can't this be done any other way?

Prof. 9
November 9th, 2007, 10:59 PM
For some reason it doesn't work =/ it just repoints the old song
I'm using Sappy 2006.

Also, for some reason, I didn't get a yes/no prompt when assembling that ugly thing.

November 10th, 2007, 2:46 AM
yeah i had that problem too, it may just be the .s file, you cant fix that...at least i dont think so as i spent 3 days trying to fix it

December 10th, 2007, 4:24 AM
In my opinion, the instrumentation depends on what is available in the voicegroups. For example, the instruments available in the voicegroup for Viridian City may or may not be available in the Lavender Town voicegroup.

Just one question. When I tried to insert a song in the ROM, I placed a new header offset. The first new insertion was successful, but the rest didn't make a sound at all (my first insert has a value 015B in AdvanceMap, and I tried to insert the succeedind tracks with 015C, 015D, etc.). How can I find the right hex value for the other tracks?