PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive

Notices

Archive Old threads that serve no purpose are here.

 
 
Thread Tools Display Modes
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
Old 31st August 2013, 05:00 PM   #2
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 564
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

Quote:
Originally Posted by Gal View Post
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.
Thought I'd mention. It's not that it won't play, because if it weren't, your instruments you were using wouldn't be in your voicegroup, it's that if you get crackling from the audio during playback, due to oversampling.
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline  
Old 31st August 2013, 05:30 PM   #3
Gal
Beginner
 
Join Date: Jul 2013
Location: Israel
Posts: 36
Gal
Default

Quote:
Originally Posted by Team Fail View Post
Thought I'd mention. It's not that it won't play, because if it weren't, your instruments you were using wouldn't be in your voicegroup, it's that if you get crackling from the audio during playback, due to oversampling.

That's it - the GBA will play crackling sounds instead of playing the actually sounds because of the oversampling...
__________________
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
Gal is offline  
Old 31st August 2013, 05:50 PM   #4
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 21
Posts: 418
droomph
Default

could you give us an example .s file to download and play with? I understand it's pretty easy to do but for the ones on Linux or Mac it's a real big hassle to get a file because Anvil Studio is Windows only I believe.
__________________
droomph is offline  
Old 1st September 2013, 04:02 PM   #5
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 564
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

Quote:
Originally Posted by droomph View Post
could you give us an example .s file to download and play with? I understand it's pretty easy to do but for the ones on Linux or Mac it's a real big hassle to get a file because Anvil Studio is Windows only I believe.
I have a .s on my Windows 7 PC. If I can find it, I'll upload it here, as well as the voicegroup it uses.
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline  
Old 11th September 2013, 07:45 PM   #6
Gal
Beginner
 
Join Date: Jul 2013
Location: Israel
Posts: 36
Gal
Default

Updated the tutorial ;-;

BY THE WAY
Quote:
Originally Posted by droomph
could you give us an example .s file to download and play with? I understand it's pretty easy to do but for the ones on Linux or Mac it's a real big hassle to get a file because Anvil Studio is Windows only I believe.
Here is an example of a .S file: https://www.dropbox.com/s/8i0dzb6nwc3ls08/kantogl.s

Heh sorry about the long answer...
__________________
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
Gal is offline  
Old 11th September 2013, 08:33 PM   #7
AtecainCorp.
Banned
 
Join Date: Sep 2013
Posts: 52
AtecainCorp.
Default

One question. How loop music...
AtecainCorp. is offline  
Old 11th September 2013, 09:58 PM   #8
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 564
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

Quote:
Originally Posted by AtecainCorp. View Post
One question. How loop music...
http://www.romhackersonline.com/show...tor-ever-again
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline  
Likes Elsa liked this post
 

Tags
editing, file, gba, [Document]

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 03:33 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts