• 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 Part 2

Status
Not open for further replies.

Magnius

Pokemon Music Hacking Guru
295
Posts
18
Years
  • Seen Feb 17, 2014
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 [url="http://www.pokecommunity.com/showthread.php?t=121856]first[/url] 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.

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".

MusicHack.png


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.
 
Last edited:

Master_Track

ROM Reaverz Scripter
916
Posts
16
Years
wow, this will really help me (just like the 2 other guides of u, part one of inserting and looping tut).
u r great man :D

I'm glad that I had anvil studios before, time to try this out ^^
 

Master_Track

ROM Reaverz Scripter
916
Posts
16
Years
er..I know my problem isn't directly referred to the tutorial, but u wrote:
now click play..etc.. in sappy.
But for some reason...this never worked for me o.o
everytime I click play sappy shuts automatically down, without an error message or something.
do u know the problem?
if not it's not that important, since the sound works at least ingame..
but I'd like to know what it sounds like before starting my rom ^^''
 

Magnius

Pokemon Music Hacking Guru
295
Posts
18
Years
  • Seen Feb 17, 2014
er..I know my problem isn't directly referred to the tutorial, but u wrote:
now click play..etc.. in sappy.
But for some reason...this never worked for me o.o
everytime I click play sappy shuts automatically down, without an error message or something.
do u know the problem?
if not it's not that important, since the sound works at least ingame..
but I'd like to know what it sounds like before starting my rom ^^''
Well if it's doing that it might be in your assembling which is covered in the first tutorial. Also check your file name or simply the number of instruments in the midi, that might make it not able to play in Sappy. You can compress the number of instruments with the program change method. So if it does have too many instruments and you want to compress it, try putting all of the melodies in one track and using the program change method.
 

Magnius

Pokemon Music Hacking Guru
295
Posts
18
Years
  • Seen Feb 17, 2014
How do you turn off the tracks? I'm sorry, I'm a total noob at Avil Studios and I'm trying to learn how to use it.
lol no it's a good question. To get a track by itself go into the "On" column of the tracks channel. By default it'll say "on" in the box. Click it again, you'll get "mute", click it again you'll get "solo" which is what we want.
 
230
Posts
16
Years
  • Seen Jan 3, 2010
Hey, a good tutorial indeed!

I just inserted third custom song and I partly followed your tutorial. It turned out to be great!
 

Shadow-X

That Guy
9
Posts
16
Years
  • Seen Jul 22, 2009
EDIT: nvm, I found a way to make space :)
 
Last edited:

Magnius

Pokemon Music Hacking Guru
295
Posts
18
Years
  • Seen Feb 17, 2014
I still can't get my song to sound like a real song...Tried changing the voiceset, but it still sounds like a Monophonic ringtone or something...
Well my guess is that your problem is one of these...

1. You're using an instrument that's not very common in use in the Pokemon GBA games(Like for instance, Shamisen's aren't used in Pokemon GBA games so those might bring up monophonic stuff).

2. Using too many DirectSound tracks.

And those are probably the only two I can think of. Also, when looking for the right voice set, find a voice set that has the same instruments you use. So for instance, if you use a trumpet in your song, you want a voiceset that uses a trumpet and if the voiceset you pick, DOESN'T have a trumpet, it'll end up sounding like GB synth.
 

Master_Track

ROM Reaverz Scripter
916
Posts
16
Years
er...I remember that this tutorial was much longer Ô.o.
I wanted to go through everything now, but there are only a few lines and most things which were explained are simply gone. Or are they just not displayed for me, because of my browser/whatever?

edit: I found it on my computer, I once saved it in case my internet is down or PC keeps getting database errors (ehem...xD).
The first post includes introduction and end, the biggest part of the tutorial is missing.
I wonder why...
 
Last edited:

Magnius

Pokemon Music Hacking Guru
295
Posts
18
Years
  • Seen Feb 17, 2014
er...I remember that this tutorial was much longer Ô.o.
I wanted to go through everything now, but there are only a few lines and most things which were explained are simply gone. Or are they just not displayed for me, because of my browser/whatever?

edit: I found it on my computer, I once saved it in case my internet is down or PC keeps getting database errors (ehem...xD).
The first post includes introduction and end, the biggest part of the tutorial is missing.
I wonder why...
lol yeah, I have no idea either. It's not just you, a big part of the tutorial dissapeared for some reason. Could you send it to me? I don't think I have any backup of it.
 

Magnius

Pokemon Music Hacking Guru
295
Posts
18
Years
  • Seen Feb 17, 2014
Tutorial is working again. Apparently there was something strange about the Anvil Studio link that made it not show the whole document. But it's fixed now.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I guess I was a bit outdated. :\

anyways, nice tutorial, however, Anvil Studio seems to dislike my computer.
is there other ways for me to know what voices/instruments sounds good for Ruby? Other than hex, I mean. :\
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
Yes, this is a good tutorial indeed.
Now, I'm playing music like a Pro! Also, I noticed with Anvil Studio(and Sappy), on the Piano Roll Editor, it's fun turning off and on the tracks to go with the beats, It sounds great too.

I've edited The Verdanturf Music, and am going to try it now, if no luck, then I'll try something again. Thanks for this tutorial.
P.S. Is there a way to combine exported Tracks back into a .s file?


Never mind, I did it! I repointed the voicegroup to my own created one. Now it sounds exactly like the Ruby one, and it loops!
 
Last edited:
Status
Not open for further replies.
Back
Top