The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.


Reply
 
Thread Tools
  #1    
Old January 3rd, 2008, 09:58 PM
Magnius
Pokemon Music Hacking Guru
 
Join Date: Jul 2005
Gender:
Nature: Adamant
Hello my friends, I'm Magnius and I'm going to teach you today how to insert ANY song you like, into the GBA Pokemon games. For this particular tutorial we will be using Pokemon Fire Red, but it can be done on almost any Pokemon GBA game. However, before we start you're going to need a few things...

- 2 Pokemon Fire Red Roms(Don't ask me where to get the roms).
- An emulator to play the rom on(I use VisualBoyAdvance myself).
- Sappy and mid2agb which you can both get here.
- A midi that you want to insert into the game.
- A backup of the Pokemon Fire Red rom incase anything goes wrong.

Got all that stuff downloaded? Good. Once everything is downloaded make sure to extract everything into the same folder, trust me, it'll make things much easier later on. Now let's move on to the tutorial.

Step 1 - Convert your midi to a ".s" file
In this first step we're going to use Mid2Agb to convert our midi file that we want to insert into the game, to an ".s" file. Before we move on, make sure your midi is in the same folder as Mid2Agb. Once you've made sure of that, open up the folder that Mid2Agb is in and click on your midi. After you've clicked on your midi drag it over to the Mid2Agb file and Mid2Agb will automatically convert the midi into a ".s" file. There is another way to convert the midi using the command prompt, but that just makes the whole process harder than it has to be.

Step 2 - Assemble the song using Sappy
Alright, now that you've got your ".s" file, we're going to put it to use in Sappy. So first, open up Sappy. After you've opened up Sappy, go to file and then click on "Open". Now find your first Pokemon Fire Red rom and open it. Now once you've opened your rom in Sappy you'll notice that in the upper left corner of the program a dropdown box will appear with a song name in it. Click that dropdown box and you'll see a list that you can scroll, of songs from the game. The song you click will be the song you'll be modifying in game. You can change any song, but for this tutorial find a song on the list called "Pokemon Theme", since it's one of the first songs you hear when you turn on the game. After you find that, click on "Assemble song" which is in the left part of the program. After that a box will pop up that says "Assemble .S file" at the top. Click the button next to the first box and then to open your ".S" file. The second box, is where you'll write your base offset, but don't worry about that too much now. For now just type the offset "0xEB0B20" in the base offset box. Third is the Voicegroup offset box which will already be filled in. Now click on "Assemble that ugly thing!" and wait for the program to finish assembling the song. Congrats, you've assembled the file. If the song plays already in the game by now, then congratulations, you're done, but if it doesn't, don't fret, move on to Step 3.

Step 3 - Getting the file to work in game
So now you've assembled the file and it plays in Sappy, but you see that it doesn't play in game. Well slow down there guy, there's still a ways to go before we can get the file playing in game. Now that you've assembled the file we're going to export the tracks. In order to do this, go to "Export Tracks". You'll then see a bunch of unchecked boxes which are basically the offsets of the tracks, check all of them. In the 2nd box, you can either put $T or $P, don't know worry too much about what they mean, for this tutorials sake just type in "$T". After that click on "Ok". The songs tracks will now be dumped to your folder and since you picked "$T" the tracks will be numbers like one tracks file name will be 0, the next tracks file name will 1, it's pretty simple. So after that close out Sappy and reopen it. Now that you've reopened Sappy, open the unmodified Pokemon Fire Red rom and find the song you modified in other rom, which should be "Pokemon Theme" in the case of this tutorial. Now go to "import tracks" and check all the "numbered" files, which are basically the tracks we dumped earlier. Next to the "First track" box basically type in an offset where there's a lot of free space, for the sake of this tutorial just put "0xEB0B20" there. Then press OK. Now open up your emulator, open up the rom you just modified and you'll see that the song works in game. Congratulations, you've done your first successful music hack.

And yep, that's how you insert music into the GBA Pokemon games. But I know some of you are asking, what if I want to import music from one Pokemon GBA game to another? Well, I'll explain that in this extra step.

Importing Music from one Pokemon GBA game to another
Importing music from one Pokemon GBA game to another is easy. First open the Pokemon GBA game you want music from like for instance, if I wanted to take music from Ruby and put it in Fire Red, I would open Ruby. Then I'd simply select the song I want to put into the other game and go to export tracks. Once you're in the export tracks window, check all the tracks, type "$T" in the second box and all your tracks will be exported to numbered files(1, 2, 3, 4, 5 you get the point). After that, open the game you want to insert the music into and find the track you want to replace. After that choose import tracks and import the numbered tracks you dumped and press okay. Congrats, you've successfully taken music from one GBA Pokemon and inserted it into another.

And that concludes this tutorial. Hope it helped you guys out.

If you think you've mastered this part of music hacking, these other documents will help improve your music hacking skills even more.

Magnius' Music Hacking Document Part 2

http://www.pokecommunity.com/showthread.php?t=139156
Part 2 of my music hacking document. This covers more advanced stuff.

A document on Fire Red voice groups and the instruments they play.

http://www.pokecommunity.com/showthread.php?t=148811
This document lists every voicegroup in Fire Red, as well as the instruments those voice groups can play.

A complete list of Fire Red's Music Values

http://www.pokecommunity.com/showthread.php?t=123520
This document is a complete list of Fire Red's music values. So say you wanted to change the music playing on a map, but you didn't know the hex value of the song you wanted to change it to, this is what this document will tell you.

GBA Music Looping

http://www.pokecommunity.com/showthread.php?t=123520
This is a document by Clonex25 that explains how to successfully loop a song once you've inserted it.

IF YOU ENCOUNTER THE VBAL ERROR OR HAVE PROBLEMS RUNNING SAPPY ON WINDOWS 7 DOWNLOAD THIS VERSION OF SAPPY.

I also mirrored that file here, in case the original link gets deleted.

Last edited by Magnius; June 17th, 2012 at 10:07 PM.
Reply With Quote
  #2    
Old January 4th, 2008, 01:49 AM
Νιτραμ
Trainer
 
Join Date: Nov 2007
Nice thing, dude, this tutorial looks good. I have some experiences with music editing, but still, a newbie should find this useful. Even I gave up with my efforts when my first MIDI masterpiece that I rewritten from someone's notes - took 2 hours - scrambled up.

Cheers!

P.S.: Don't link to Mid2AGB, it's official Nintendo program and its distribution considered illegal.
__________________
If you remeber me, feel free to send me a PM ;-)
Reply With Quote
  #3    
Old January 4th, 2008, 04:37 AM
clonex25's Avatar
clonex25
PM disabled until notice...
 
Join Date: Jun 2007
Location: Pearl of the Orient Seas
Age: 29
Gender:
Nature: Timid
Good guide there, Magnius! To me it's in full detail. If you want, you may merge the thread I posted that tackles slight details about music looping originally posted by Baro (I gave credits to him, anyway).
__________________




I hvae updated the GBA Music Looping thread. It now has a tutorial for looping multiple-tracked S Files. Click the link below:
http://www.pokecommunity.com/showthread.php?t=118722

Due to popular demand, I have lowered the Wild Pokemon Theme (with two versions) and added it in my music collection thread:
http://www.pokecommunity.com/showthread.php?t=139756

Next STOP: To make guidelines regarding GBA music tracks
Reply With Quote
  #4    
Old January 4th, 2008, 06:37 AM
Swampert 22's Avatar
Swampert 22
Is making tools for you...
 
Join Date: Sep 2005
Location: Switzerland
Age: 23
Gender: Male
Nature: Brave
Hey Magnius, great, easy to follow tutorial, but when I click on 'assemble that ugly thing' the program crashes. I've retried several times with different songs but it still won't work. Any ideas?
__________________

I've made some tools for Pokémon hacking! Please check out the thread... Swampert Tools Showcase

Head over to my thread to check out my latest tool, Pokémon Red/Blue Trainer Editor!

Visit my site for Pokémon ROM Hacking tools! Swampert Tools Homepage
Reply With Quote
  #5    
Old January 4th, 2008, 11:21 AM
Magnius
Pokemon Music Hacking Guru
 
Join Date: Jul 2005
Gender:
Nature: Adamant
Quote:
Originally Posted by swampert22 View Post
Hey Magnius, great, easy to follow tutorial, but when I click on 'assemble that ugly thing' the program crashes. I've retried several times with different songs but it still won't work. Any ideas?
Hmm... How long are your midi files? Generally I've found that longer midis don't work sometimes or it may also be that the midi has a lot of instruments.
Reply With Quote
  #6    
Old January 5th, 2008, 12:15 AM
clonex25's Avatar
clonex25
PM disabled until notice...
 
Join Date: Jun 2007
Location: Pearl of the Orient Seas
Age: 29
Gender:
Nature: Timid
Quote:
Originally Posted by swampert22 View Post
Hey Magnius, great, easy to follow tutorial, but when I click on 'assemble that ugly thing' the program crashes. I've retried several times with different songs but it still won't work. Any ideas?
The filename's length is somehow relevant to this case. Magnius is right in his suggestions of reducing instruments. I, too, encountered the same problem (if not the crash, the weird instrumentation).
__________________




I hvae updated the GBA Music Looping thread. It now has a tutorial for looping multiple-tracked S Files. Click the link below:
http://www.pokecommunity.com/showthread.php?t=118722

Due to popular demand, I have lowered the Wild Pokemon Theme (with two versions) and added it in my music collection thread:
http://www.pokecommunity.com/showthread.php?t=139756

Next STOP: To make guidelines regarding GBA music tracks
Reply With Quote
  #7    
Old January 5th, 2008, 10:15 AM
lilbl4ze
Beginning Trainer
 
Join Date: Jan 2008
is it possible to put covert mp3's to .s?
Reply With Quote
  #8    
Old January 6th, 2008, 02:24 AM
Magnius
Pokemon Music Hacking Guru
 
Join Date: Jul 2005
Gender:
Nature: Adamant
No you'd need the midi. However, if you need a midi of a particular song I can help in making it.
Reply With Quote
  #9    
Old January 6th, 2008, 03:33 AM
Swampert 22's Avatar
Swampert 22
Is making tools for you...
 
Join Date: Sep 2005
Location: Switzerland
Age: 23
Gender: Male
Nature: Brave
Quote:
Originally Posted by clonex25 View Post
The filename's length is somehow relevant to this case. Magnius is right in his suggestions of reducing instruments. I, too, encountered the same problem (if not the crash, the weird instrumentation).
Oh ok then. Thanks for the help. I'll try these things later!
__________________

I've made some tools for Pokémon hacking! Please check out the thread... Swampert Tools Showcase

Head over to my thread to check out my latest tool, Pokémon Red/Blue Trainer Editor!

Visit my site for Pokémon ROM Hacking tools! Swampert Tools Homepage
Reply With Quote
  #10    
Old January 14th, 2008, 01:12 PM
zaayid
Beginning Trainer
 
Join Date: Jan 2008
Gender:
I have a problem with Sappy. When I open my Fire Red rom with it, I get a message saying "Sappy has stopped working". Help anyone? I'm using Vista Ultimate if that helps.
Reply With Quote
  #11    
Old January 14th, 2008, 04:34 PM
Tony the Awesome's Avatar
Tony the Awesome
mi nombre es tony
 
Join Date: Sep 2007
Thank you Magnius for making this guide.
I learned how to add music into my rom!
Thank you!
__________________
Name: Tony
FC: 3094-2957-4865
Reply With Quote
  #12    
Old January 14th, 2008, 05:10 PM
Saken's Avatar
Saken
Beginning Trainer
 
Join Date: Jan 2007
Location: Australia
Nature: Modest
Zaayid, i have the exact same problem. Maybe it is a fault within Windows Vista(You know, how some programs dont work with Vista..), seeing as i have Windows Vista as well.. Or you could simply redownload it from somewhere else, which i have done before and not worked..

Giovanni
__________________
FC: 3867 0389 3587
Reply With Quote
  #13    
Old January 14th, 2008, 05:37 PM
+Sneasel™'s Avatar
+Sneasel™
It's a meeee, itman!
 
Join Date: May 2007
Location: None of your business!
Age: 20
Gender:
Nature: Lonely
Send a message via Windows Live Messenger to +Sneasel™
THis guide rocks, thanks!
I tried it and it worked!
Of coarse, i just made random music, but it still worked, and thats the important thing!
__________________
Intentions that were pure have turned obscure,
Seconds into hours, minutes into years.
Don't ask me why,
PLEASE DON'T CRY!
I can't tell you lies...

Don't click this!

PPH - A great hacking forum
Reply With Quote
  #14    
Old January 16th, 2008, 06:47 PM
Apple Inc.'s Avatar
Apple Inc.
This Changes Everything. Again
 
Join Date: Jul 2007
Location: 
Age: 20
Send a message via AIM to Apple Inc. Send a message via Windows Live Messenger to Apple Inc.
Great tutorial. When i go to assemble it closes because something goes wrong.

PS. pm me for assignment
__________________

Reply With Quote
  #15    
Old January 17th, 2008, 08:25 AM
zaayid
Beginning Trainer
 
Join Date: Jan 2008
Gender:
Dammit why are there so many probs with Vista? And it would've been so cool to put Alter Bridge's Metallingus in my hack.
Does anyone know of any other program similar to sappy?
Reply With Quote
  #16    
Old January 17th, 2008, 12:52 PM
Magnius
Pokemon Music Hacking Guru
 
Join Date: Jul 2005
Gender:
Nature: Adamant
Quote:
Originally Posted by Garfieldlover94 View Post
Great tutorial. When i go to assemble it closes because something goes wrong.

PS. pm me for assignment
lol think I already did but you never replied.

But yeah, all this will really do is insert what you have in your midi into the game. If you want your midi to sound REALLY good on the Gameboy Advance, it'll have to be tweaked. I've been researching GBA sound myself to make my own GBA remixes sound bette and here's what I've observed...
- On the GBA you can only have a number of "direct" tracks. The number? I'm not sure, the most I'vve been able to get is 3 direct tracks playing at a time, but some of the official Nintendo GBA music uses more, however I haven't figured out how. Direct tracks are anything that isn't GBA synth. Basically instruments like trumpets, violins, strings, anything that isn't GBA synth. The most number of direct tracks I've been able to play at once is 3. One trumpet, one drum track and a strings track. But 3 direct tracks only seems to work, if the third instrument is a string ensemble. Also it seems drums can be the only 2nd "Direct" track as of now. Still I've seen professional Pokemon GBA music using 2 "non drum" direct tracks, so I'm trying to figure out how it's done.

- Since the GBA can only hold so much memory, the "Direct" instruments have certain ranges they can play in. If the instrument goes out of that range, the GBA interprets that as GBA synth.

- "Square" and "Sawtooth" instruments seem to emulate the GBA synth quite nicely.

And yeah, that's what I've observed. Much of how the GBA and Sappy interpret the sounds is still a mystery to me.
Reply With Quote
  #17    
Old January 17th, 2008, 01:35 PM
Apple Inc.'s Avatar
Apple Inc.
This Changes Everything. Again
 
Join Date: Jul 2007
Location: 
Age: 20
Send a message via AIM to Apple Inc. Send a message via Windows Live Messenger to Apple Inc.
Also another thing is that it will also work with other GBA games. However you cannot export easily. I tried it and it ended up being a 5 second bit of it
__________________

Reply With Quote
  #18    
Old January 17th, 2008, 05:02 PM
Dan13x
Togepi
 
Join Date: Apr 2007
Location: Brisbane, Australia
Age: 18
Gender: Male
Nature: Quiet
A very good tutorial Magnius, great! I replaced the Wild Pokemon Battle music and inserted a D/P Wild Pokemon Battle music (in the backup ROM). Then I closed and re-opened Sappy, selected the Wild Pokemon Battle music from the dropdown list and then exported the tracks. I test it in VBA but it doesn't work! It only works in Sappy! Please help!

Last edited by Dan13x; January 17th, 2008 at 07:02 PM.
Reply With Quote
  #19    
Old January 17th, 2008, 09:17 PM
Magnius
Pokemon Music Hacking Guru
 
Join Date: Jul 2005
Gender:
Nature: Adamant
Quote:
Originally Posted by dan123410 View Post
A very good tutorial Magnius, great! I replaced the Wild Pokemon Battle music and inserted a D/P Wild Pokemon Battle music (in the backup ROM). Then I closed and re-opened Sappy, selected the Wild Pokemon Battle music from the dropdown list and then exported the tracks. I test it in VBA but it doesn't work! It only works in Sappy! Please help!
Did you open the unchanged rom afterwords and import the tracks back into the "Wild Pokemon" battle music? If not that's why it's not working yet.

Ah yes and here is a remix of the GSC Encounter Rival Theme I successfully loaded into the GBA. I'd like the lead instrument to be louder, but this is a good example of what this program can do.

http://www.sendspace.com/file/klxksr

Here's a youtube clip showing it in game....

http://www.youtube.com/watch?v=lgQtTmYgLzE

Last edited by Magnius; January 17th, 2008 at 09:34 PM.
Reply With Quote
  #20    
Old January 19th, 2008, 02:01 AM
clonex25's Avatar
clonex25
PM disabled until notice...
 
Join Date: Jun 2007
Location: Pearl of the Orient Seas
Age: 29
Gender:
Nature: Timid
Quote:
Originally Posted by Magnius View Post
- On the GBA you can only have a number of "direct" tracks. The number? I'm not sure, the most I'vve been able to get is 3 direct tracks playing at a time, but some of the official Nintendo GBA music uses more, however I haven't figured out how. Direct tracks are anything that isn't GBA synth. Basically instruments like trumpets, violins, strings, anything that isn't GBA synth. The most number of direct tracks I've been able to play at once is 3. One trumpet, one drum track and a strings track. But 3 direct tracks only seems to work, if the third instrument is a string ensemble. Also it seems drums can be the only 2nd "Direct" track as of now. Still I've seen professional Pokemon GBA music using 2 "non drum" direct tracks, so I'm trying to figure out how it's done.
I'm not sure, but I've inserted 4 DirectSound tracks (including the percussion, I don't know if Timpani goes with the percussion as I have inserted one separate track) and it worked for me. I think it has something to do with the voicegroups but if you want to hear more instruments from your GBA MIDI, try to use the Bank/Patch Change of your MIDI software.
__________________




I hvae updated the GBA Music Looping thread. It now has a tutorial for looping multiple-tracked S Files. Click the link below:
http://www.pokecommunity.com/showthread.php?t=118722

Due to popular demand, I have lowered the Wild Pokemon Theme (with two versions) and added it in my music collection thread:
http://www.pokecommunity.com/showthread.php?t=139756

Next STOP: To make guidelines regarding GBA music tracks
Reply With Quote
  #21    
Old January 20th, 2008, 02:35 AM
shinygoldash's Avatar
shinygoldash
bagel-meister ;)
 
Join Date: Aug 2007
Location: Europe
Age: 18
How do we put the export tracks down like.

$T battle?

or

battle $T?
__________________
Paired with MaJuSe|Sister Of DarknessVolt|Twins with ~Sweet Dawn~|Brothers with Sheima-Manafi|

CHRISTMAS 2010!
2 Months
Reply With Quote
  #22    
Old January 20th, 2008, 03:25 AM
zaayid
Beginning Trainer
 
Join Date: Jan 2008
Gender:
Quote:
Originally Posted by zaayid View Post
I have a problem with Sappy. When I open my Fire Red rom with it, I get a message saying "Sappy has stopped working". Help anyone? I'm using Vista Ultimate if that helps.
Can no one help me with this problem?
__________________
Zaayid's PokePet

Mr Muggles the level 56 Charizard!
/color]
Reply With Quote
  #23    
Old January 20th, 2008, 10:44 AM
Magnius
Pokemon Music Hacking Guru
 
Join Date: Jul 2005
Gender:
Nature: Adamant
Quote:
Originally Posted by shinygoldash View Post
How do we put the export tracks down like.

$T battle?

or

battle $T?
If you're talking about folder names it would go something C:\Pokemon\$T.

As for the problem, it may be a vista related problem and I use XP so I wouldn't be sure how to resolve it.

Also since the document apparently didn't get accepted yet or something, here's a list of music values in Fire Red unless you wanted to change the music in AdvanceMap.

Quote:
0105 = Healing (RS)
0106 = Level Up
0107 = Evolution Start
0108 = Evolution/Safari
0109 = Battle 1
010A = Battle 2
010B = Unknown/Not listed in Sappy
010C = Fanfare 1
010D = Fanfare 2
010E = You Fail It!
010F = You Fail It Again!
0110 = Follow Me
0111 = Game Corner
0112 = Evil Lurks
0113 = Gym
0114 = Jigglypuff's Song
0115 = Introduction
0116 = Pokemon Theme
0117 = Cinnabar Island
0118 = Lavender Town
0119 = Healing
011A = Bicycle
011B = Encounter 1
011C = Encounter 2
011D = Encounter 3
011E = You're In The Hall of Fame!
011F = Viridian Forest
0120 = Mount Moon
0121 = Abandoned Place
0122 = End Credits
0123 = Route Theme 1
0124 = Route Theme 2/Intro
0125 = Route Theme 3
0126 = Route Theme 4
0127 = Indigo Plateau
0128 = Battle 3
0129 = Battle 4
012A = Battle 5
012B = Battle 6
012C = Pallet Town
012D = Oak's Lab
012E = Oak's Theme
012F = Pokemon Center
0130 = SS Anne
0131 = Surf's Up
0132 = Pokemon Tower
0133 = Silph Co.
0134 = Cerulean City
0135 = Celadon City
0136 = Victory 1
0137 = Victory 2
0138 = Victory 3
0139 = Vermillion City
013A = Viridian City and Pewter City
013B = Gary's Theme
013C = Gary's Theme (bis)
013D = Fanfare 3
013E = Fanfare 4
013F = You caught a Pokemon!
0140 = Trainer Card Photo
0141 = Gamefreak
0142 = Victory 2 (bis)
0143 = Intro Message 1
0144 = Intro Message 2
0145 = Intro Message 3
0146 = Game Corner (+1)
0147 = Game Corner (+2)
0148 = Net Corner
0149 = Mystery Connection
014A = Game Corner (+3)
014B = Mount Ember
014C = Follow Me (alt)
014D = Water Labyrinth
014E = Tanoby Ruins
014F = Islands 1-3
0150 = Islands 4-5
0151 = Islands 6-7(AKA Violet City Theme from GSC)
0152 = PokeFlute
0153 = Battle - Deoxys
0154 = Battle 5 (+1)
0155 = Battle 5 (+2)
0156 = Encounter 4
0157 = Deoxys Encounter
0158 = Trainer Tower
0159 = Pallet Town (fame mix)
015A = Teachy TV

Last edited by Magnius; January 21st, 2008 at 10:54 AM.
Reply With Quote
  #24    
Old January 21st, 2008, 07:19 AM
zaayid
Beginning Trainer
 
Join Date: Jan 2008
Gender:
Well do you know a tool that serves the same function as Sappy?
__________________
Zaayid's PokePet

Mr Muggles the level 56 Charizard!
/color]
Reply With Quote
  #25    
Old January 24th, 2008, 09:21 AM
shinygoldash's Avatar
shinygoldash
bagel-meister ;)
 
Join Date: Aug 2007
Location: Europe
Age: 18
I put the D/P Rival music in and it doesn't loop.

Are you going to add that to the tutorial?
__________________
Paired with MaJuSe|Sister Of DarknessVolt|Twins with ~Sweet Dawn~|Brothers with Sheima-Manafi|

CHRISTMAS 2010!
2 Months
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 05:09 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.