The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read


Tutorials Looking for a guide to help you out? Then you're in the right place! We've got everything you need, ranging from Mapping to Music!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.

Thread Tools
Old August 31st, 2013, 07:50 AM
du bist n00b
Join Date: Nov 2011
Location: A tree
Gender: Male
Nature: Bold
- Title -

Not much to say here... This is a tutorial on editing the .S file... Yup, the mysterious .S file that contains MIDI music's data!

Let's start!

Changing Speed
If you use Anvil Studio, like me, you might've noticed that there's a speed limit of 300, but you've seen some music that their speed is over 300. Example: Vs. Turner (Pokémon Vega [510 speed lololol]). This is how you do it.

Open the .S file in notepad and search for the following:

    .byte    TEMPO , X*M_tbs/2
Where X stands, put the current speed and where the M stands, put the name of the .S file (example: if the name is battle.s, I will change X to "battle").

Now, to edit the speed, replaceX with the speed you want.

Changing Volume
This one was found by Team Fail, so credit him!

If you once imported a MIDI from a DS game, you might noticed it didn't play in-game. It's because the music is too loud for the GBA to play.

Find the following:
    .equ    X_mvl, 127
Replace X with the name of the .S file.

Now, replace "127" with the volume you want. I recommend to set it to 79.

Changing an Instrument
Navigate to the start of the track and find the following:
    .byte        VOICE , X
Replace X with:
Current instrument -1
Replace it with:
Instrument you want it to set to -1

MIDI Events
Program Change
Write the following in the position you want the program change to start:
    .byte        VOICE , X
Replace X with the instrument you want it to set to -1.

Write the following in the position you want the panpot to start:
    .byte        PAN   , c_v+X
Replace X with:
0 = Left
64 = Middle
127 = Right

That's it, FOR NOW!

Last edited by xGal; September 1st, 2013 at 06:48 AM.
Reply With Quote
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 07:52 PM.

Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™,
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é
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.