|11th October 2012, 04:59 PM||#1|
Wataru-Kun's Ultimate Pokémon Music Hacking Guide
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.
You can watch a video tutorial [nomedia="http://www.youtube.com/watch?v=el2s5EIHWSM"]YouTube- Broadcast Yourself.[/nomedia].
How to make your music sound the best
In my previous documents, I covered how to insert a midi into a GBA game. But the problem is, when inserting just any regular midi without modification, it might not sound the best on the GBA. In this tutorial, I'm going to basically give you guys some info on the GBA's music limits and how to make your music sound the best it can in your Pokemon hack. Before you read this document though, it is REALLY recommended you read and understand the first before you read this one.
1. Some information on the GBA's Music Limits
I'll start this document off with some information on the GBA's Music Limits that Clonex25 informed me of. Here's a direct quote on the limits from a PM that he sent me which best explains them...
- You can use up to 10 tracks per song: 5 for DirectSound (D/S), and 5 for GB Waveform (GB).
- You can use any instrument in the D/S tracks, provided that you must limit the playing instruments to 6 (including the drums).
- You may reserve a D/S track for the drums.
- You can use the GB tracks for the following: 1) Square1, 2) Square2, 3) Wave, 4) and 5) Noise.
- Two GB tracks are used for the Noise part because Applause (126) has a "smoother" effect than Gunshot (127).
- You may maximize the 5 D/S tracks for town/city/route/cave music.
- You must limit the battle music D/S tracks to 4. This gives a track that the GBA uses for the attack SFX. Maximizing 5 D/S tracks may sacrifice the drums upon execution of attacks like Surf, or when there's a stat change (+ATK, -DEF).
So those are mostly the limits of the GBA, music wise and if you surpass those limits, the song might not sound as good as it could on the GBA. Now, I know some of you might be confused now by all the DirectSound and GB Waveform business, so I'll explain it. DirectSound instruments are basically any instruments that aren't GB Synth. So a trumpet would be a DirectSound instrument, a flute would be a Direct Sound instrument and so on. GB Synth is basically any instrument that uses the GB's internal Waveform. The original Game Boy and Game Boy Color only used Waveform and Direct Sound was added to the GBA.
Every different song in each of the Pokemon GBA games uses a certain voicegroup and this can effect how good or bad the song might sound on the GBA. For instance, in Sappy you could assemble your .s file to "Encounter 1" and it might sound great, but then you assemble it to say... "Pallet Town" and it sounds horrible. This is because those songs use different voicegroups. Now, I know it's possible to change voicegroups through Hex Editing, but seeing as I've not tried that yet, I won't cover it here. So basically, what'd I reccomend is toying around with assembling your song to different songs and seeing which one sounds the best.
Sometimes the midi you've inserted into your GBA Pokemon hack, won't sound good if it's unbalanced. You know, if one instruments playing too loud and all the others are playing too soft or overall, the whole midi is just too loud. Balancing your midi can really help it sound better on the actual GBA. How I like to do this is I go into Anvil Studio(A program that let's you edit midi tracks) and just toy around with the volume of different instruments. You know, turning certain instruments up and turning certain instruments down and seeing what happens. But yeah, balancing the volume of your midi tracks can really help your midi sound better on the actual GBA.
4. Commonly used instruments in GBA Pokemon games
Here I will cover instruments that are commonly used in the GBA Pokemon games. Now, if you want to use an instrument not on the list, you can try to, but most of the time instruments that aren't common result in the instrument being converted to GB Synth. Overall, don't look at this as the definite list as you can try and use other instruments if you like and see if they work.
Commonly used DirectSound Instruments:
1 - Bright Acoustic Piano
2 - Electric Grand
5 - Electric Piano 1
13 - Xylophone
14 - Tubular Bells
17 - Percussive Organ
21 - Accordian
24 - Acoustic Guitar Nylon
25 - Acoustic Guitar Steel
29 - Overdriven Guitar
36 - Slap Bass 1
38 - Synth Bass 1
45 - Pizzicato Strings
46 - Harp
47 - Timpani
48 - Strings
53 - Voice Oohs
56 - Trumpet
59 - Tuba
60 - French Horn
73 - Flute
78 - Whistle
Direct Sound also has a drum track, but I'm not sure which one it is.
Commonly used GB Synth Instruments:
4, 6 and 7 = Not necessarily Square instruments, but are used as Sqaure's.
80 - Square(As Melody or Bass)
81 - Sawtooth(Mostly used as Bass)
82 - Calliope
83 - Chiff
84 - Charang
85 - Voice
87 - Bass + Lead
88 - Pad 1 (New Age)
91 - Pad 4 (Choir)
92 - Pad 5 (Bowed), mostly used as a Wave instrument
126 - Applause(Used as Drum Noise)
127 - Gunshot(Used as Drum Noise)
So yeah, those are the commonly used instruments in the GBA games. Now the numbers are the instrument numbers as they appear in Sappy. To get these instruments in most common midi programs, just add 1 to the instrument number. For instance 56 = Trumpet in Sappy, but to get a trumpet in a midi program, you'd look for track 57. I know this is all very confusing but bear with me here.
Read all that? Good because the last portion of this document is going to get a bit complicated and is really only recommended if you REALLY want your midi to sound great on the GBA. Basically, in the last document I'll be covering the Program Change. It's not really that hard to do, just hard to explain.
5. Program Change
Open Sappy and then open a rom of Pokemon Fire Red or Leaf Green. Then scroll down the songs list in Sappy and find "Route Theme 4". Click the box with the check beside it next to Location, to turn all of the tracks off. Now that you've done that, select the click on the second track. Now press play. If you watch closely, you'll immediately notice that within in the first 2 seconds, the track starts as strings(48), then the SAME TRACK changes into a French Horn(60) and then changes to a Trumpet(56). This is something I like to call Program Changing, which is when ONE track changes into another instrument on the fly. Learning how to do a Program Change will really help you compress the number of instruments a midi uses.
First, download and install Anvil Studio. Once you've done that, open Anvil Studio, find your midi and open it. Now turn off all but one track(Prefferably the Melody Track). Now go up to View and click on it and then click on "Piano Roll Editor". Then go to the part of the song where you want to change the instrument. But wait, before that, I have to tell you something very important. In order for a program change to work on the actual GBA there must be 4 blank notes before it. Once you've found a spot with 4 blank notes before it though, click on the beggining of the blank notes and go up to "Edit". Once you've clicked on that go down to "Insert Midi Controller Event...". The picture below shows you what I mean by "4 blank notes".
After that first make sure the "Show all controller events" box is selected and then go up to the "Kind of Event" box and find "Program Change". Once you've done that, it will probably already be on the correct channel number and all you have to do is change the control value(The value of the instrument you want to change to). So say for instance, you had strings and you wanted to switch to a trumpet, you'd put "57" as the control value.
And that's the end of a long tutorial guys. I know a lot of things in here are confusing, but it's really advanced stuff and is hard to explain.
Fire Red voice groups and the intruments they play
In this document, I'm gonna list all the voicegroups in Fire Red as well as the instruments each voicegroup can play. But first, what are voicegroups? My definition would be a group of instruments stored in a particular value in a rom. Voicegroups are one of the biggest deciding factors in whether the midi you insert sounds good or not. For instance, if you insert a midi, but you notice one of the DirectSound tracks gets turned to GBSynth, this is probably because the instrument isn't in the particular voicegroup of the song you assembled. This could also be though, because of the GBA's music limits, which are explained in Part 2 of my Music Hacking document. Luckily for you you can change the voicegroup before assembling, but what instruments can each particular voicegroup play? That's what I'm mostly gonna cover in this document. After much research I've produced an accurate list of instruments that each voicegroup can play and if an instrument isn't in that particular voicegroup, it probably won't play correctly.
However, before we move onto that, a little information on how some tracks are used on the GBA. First off, know that every track after 80 is mostly going to transfer into GBSynth, when assembled into Sappy. Channel 81, the sawtooth, is commonly used as the bass instrument in most GBA tracks, although sometimes DirectSound basses can be used if the voicegroup supports it. GBSynth tracks can be used in any track, so if I forget to list them in one voicegroup, that doesn't mean you can't use them. Second of all, I won't be covering what particular drums each voicegroup supports. Also a note to add about track 62 "SynthBrass1" though it says SynthBrass, this track is generally used to make a heavy low guitar sound. You'll find the different voicegroups inside the spoiler:
So yeah, that was the list. Next I'm gonna cover choosing the right voicegroup for your song.
Choosing the Right Voicegroup
When the choosing the voicegroup you want to use, you should generally pick a voicegroup that has a lot of the same instruments that are in your midi. For instance, if your midi uses strings, trumpets, but also guitars, you want to find a voicegroup that has all of those. If you find a voicegroup with most of the same instruments, you can either try your luck or change some of the instruments in that midi, so that they're all in that particular voicegroup. If a particular instrument isn't in any voicegroup, it will probably have to be substituted for some other instrument.
But I'm confused, my tracks have different numbers than the ones used on the GBA...
If you have standard midi software, the track numbers are probably going to be different than what's used on the GBA. I don't know if this'll work for your particular midi program but to get the GBA track number, I take the general midi track number and subtract it by one. So say my general midi program has 57 for the track number of the trumpet, it would be track number 56 in the Pokemon games. Your midi program might also have different names for instruments than mine, but it's generally gonna be in the same order. Hopes this helps you guys gain an understanding.
And yeah, that's the tutorial guys... Hoped it help you out.
A Complete list of Fire Red's music values
Are you like me and wanted to change Fire Red's map music in AdvanceMap, but had no idea what the values where? Well, worry no more. In this documentation, you will find a list of Hex Values for EVERY song in Pokemon Fire Red. These Hex Values have been tested in game, so I know that each and every last one of them is the right music value. So yeah, if you ever wanted to change the games music, but didn't know the correct hex values, here they are. All the names are taken from Sappy, with minor add ons and corrections.
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
So there you go, that's the list. Hope this helps people out.
Advance music hacking guide - Midi events
Hey, what's up guys this is Magnius here again today with another tutorial on how to make your music that you insert in Sappy, sound even more professional. But what will I be covering today? Well, midi events. Midi events are things that you can add to your midi files in order to change a number of variables such as a tracks volume or a tracks instrument, on the fly.
But what does that have to do with music hacking? Well, the official FRLG songs use midi events in them and by knowing how to use these midi events correctly, you can not only make your midis sound more official, but you can make your midis look more official.
So basically, in this tutorial I will first explain to you, HOW to insert midi events and then tell you what those events do.
However, before you move on you're going to need 2 programs... Anvil Studio and WinjammerPro, both which are free. The links to where to download them are listed below...
You can get Anvil Studio there.
You can get WinJammer there.
Both are pretty much required for this tutorial.
It's also recommended you read the previous tutorials, before reading this one...
So now on to the tutorial...
So, how do you actually add a midi event in Anvil Studio?
Well, that's a good question. Well to make things easy, I'll tell you things step by step.
1. Open up Anvil Studio.
2. Next, find where it says "File" near the upper left corner and click on that.
3. Once you've clicked on that, find "Open Song..." on that menu.
4. Next find a midi of your choice and open that.
5. Now that you've done that, find the "View" option at the top and click on that. Then make sure it's set to "Mixer".
6. Select the track that you want add a midi event to.
7. Now this isn't mandatory, but it's probably a good idea to solo out this track, so that only it is playing. To do this, look in the "On" column of that particular track. Then keep clicking in the "On" section of that track, until it changes to Solo.
8. Next, with that same track selected, click on View near the top. After that scroll down to "Piano Roll Editor". This will take you to the Piano Roll.
9. Once you're in the Piano Roll, listen to the track and decide where you want to insert the event. After you've done that, click on the place where you want to insert the event.
10. After that, find "Edit" at the top and click on it. Then find "Insert MIDI Controller Event..." on the list of options and click on that.
11. After this, you should see a box that says "New MIDI Event" at the top. When you get to this box make sure "Show all controller events" is checked.
Now, do you notice that small scrolling box, next to "Kind of event:"? Well by default the box should say "ChannelVolume - b007".
That my friends is a midi event. If you look below that you'll see the words "Control Value" with a box next to it that has numbers.
That's basically the Control Value of the midi event.
If you click on the scrolling box next to "Kind of event:" and keep scrolling down, you'll see a ton of different midi events.
Now, in this tutorial I won't be covering ALL the midi events, however, I will only be covering those commonly used in the FRLG mixes. Those events are...
1. ChannelVolume - b007
ChannelVolume - b007, as it's listed in Anvil Studio, is a midi event that allows you to change a track's volume at a selected position in the song. So if you want a track to play loud at one point, but then want the volume of the track to suddenly become low, you can use this event for that. The control value of this event, decides how loud or how soft the volume change will be. As you can probably guess "100" is the loudest volume and 0 is the lowest volume.
Now, if you want the volume to gradually get lower, that's more advanced, but can be done in WinJammer.
2. Program Change
Alright, so if you go into Sappy and isolate one of the DirectSound tracks on one of the official FRLG songs, more than likely you'll notice that sometimes that one track, may change it's instrument on the fly. This is used in MOST official FRLG mixes and is a great way to fit more instruments in, without adding more tracks in. After all, the GBA can only have 5 DirectSound tracks playing at once.
The control value for this midi event, is basically the instrument number that you want to switch to. How to figure out what numbers correspond to what instruments, has been covered already in another document.
3. Panpot - b00a
Well, if you go into Sappy and examine the tracks of some of the FRLG mixes, sometimes you'll notice the sound moving either to left or to the right, as opposed to being in the center like usual. This, my friends is called panning and it's something that most of the official FRLG mixes use.
The control value for this one is kind of confusing. Basically the way I like to think, is that "30" is the value I use if I want to pan the sound to the left and "90" is the value I use if I want to pan the sound to the right. "64" is what I use if I want to center the sound.
And yeah, that's the end of part one of the tutorial. On the next tutorial, I'll be covering one more new event, that you need Winjammer for and I'll be covering how to do advanced things with events in Winjammer.
RSE voice groups and the instruments they play
Hi this is Magnius. In this document you're going to find information on the voicegroups used in RSE, as well as some general information about voicegroups. For those of you who have not read the Fire Red voicegroup document yet or are just clueless about what voicegroups are, I'm going to go over the basics of voicegroups.
So what is a voicegroup? Well if I had to define it myself, I would define it as a list of instruments stored in a particular value of a rom. That's my personal definition of what a voicegroup is. But why are voicegroups important you ask? Well, it's because they play such a big role in whether or not a midi you insert into the game sounds good. I'm sure you've all been in a situation where you assemble a midi into the game, but then some of the most important instruments get turned to GBSynth. This is most likely because of A. The instruments that get turned to GBSynth aren't in the voicegroup you assembled the song too or B. You have too many DirectSound instruments.
"But Magnius, how do I know which voicegroups support which instruments?" Well, simply, read through this topic and you'll find out all of that. Below, you're basically gonna find a list of most of the voicegroups in RSE and what instruments they play.
But before we get on to that... I'm gonna list a few things that are true for every voicegroup, as well as some general notes on things regarding the voicegroups.
- Usually, tracks 80 and up are used as GBSynth. In the rare case this ISN'T true for a particular voicegroup, I'll note that.
- Tracks 2-13 are also usually used as GBSynth. There are however, some cases where that's not true. In the case that one of these instruments IS used as a DirectSound track, I'll list it.
- 125, 126 and 127 are used as "Noise" tracks.
- Track 0 is usually the drum track, however, in some voicegroups Track 0 is used as an Acoustic Grand track.
- Tracks 33-38 are commonly used basses in RSE, however, you can only hear in Sappy is Track 38 - Synth Bass 1, in Sappy. So while all the other basses DO play in game, you won't be able to actually hear them in Sappy.
- Be aware that even if a voicegroup has more than 5 DirectSound instruments in it, you can only have 5 DirectSound tracks playing at once. If your song uses drums, that already counts as one of the DirectSound tracks.
Read through all that? Haha. Well then here it is, what you guys have been waiting for! The list, in the spoiler!
And there it goes. It's not complete yet, but it probably will be pretty soon.
|guide, hacking, music, pok?mon, pokemon, pokmon, ultimate, watarukun, [Guide]|
|Thread||Thread Starter||Forum||Replies||Last Post|
|[Guide] Complete ROM Hacking Guide - Part 1: Introduction To ROM Hacking||Linkandzelda||Guides & Documentation||0||11th October 2012 04:24 PM|