Hello, this is Magnius here with another document on GBA Music Insertion. 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...
Quote:
- 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.
2. Voicegroups
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.
3. Balance
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.
Credit:
Magnius