View Single Post
Old 31st August 2013, 03:52 PM   #1
Gal
Beginner
 
Join Date: Jul 2013
Location: Israel
Posts: 36
Gal
Default Editing .S File [GBA]

- 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
Spoiler:
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:

Code:
    .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
Spoiler:
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:
Code:
    .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
Spoiler:
Navigate to the start of the track and find the following:
Code:
    .byte        VOICE , X
Replace X with:
Code:
Current instrument -1
Replace it with:
Code:
Instrument you want it to set to -1


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


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


Volume Change

Spoiler:
Code:
    .byte        VOL   , 127*X_mvl/mxv
Replace X with the .S filename and then, replace 127 with the volume you want it to set to.




That's it, FOR NOW!
__________________
Odd Jokes:

Spoiler:
#1 - I saw Saw
#2 - Mateo's name is NOT Matt!
#3 - Karatekid is a n00b ROM hacker (;
#4 - LaZ doesn't like deadly metal music (;
#5 - Mateo doesn't like Flannery
#6 - Mateo is a bad guy ;(
#7 - Enough jokes about Mateo (;
#8 - I EM 7 YIRZ OLD
#9 - Ann Oldman
#10 - Stunfisk
#11 - Smexy Lotads

Last edited by Gal; 11th September 2013 at 07:35 PM. Reason: Just a little update
Gal is offline  
Sponsored Links