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

Research: Music Hacking Info from the Fire Emblem Community

ArchsageX

The greatest sage.
38
Posts
16
Years
  • Seen Sep 26, 2013
A fond "hello" from the Fire Emblem ROM Hacking community! Myself and my hacking cohorts thought it might be helpful to share some stuff about music hacking around here, to aid in the hacking effort and such.

First of all, found this floating around in the Japanese GBA Hacking community boards. Not sure if you were aware of it, but I didn't notice any signs of that awareness.

http://dl.dropbox.com/u/5490460/sappy2006mod15.zip

Main thing of interest for me is IT DOESN'T FREAKING CRASH like the other Sappy 2006 when on Vista or Windows 7 and you load a ROM.

Another nice feature is "Edit Voice Table" function. Details are in the spoiler below.

Spoiler:

But more than just a Sappy update, there's also a tool that the FE Community has adopted (created by one of our members) called Zahlman's Song Editor. It can basically import songs from any GBA game (including their voicegroups) and even insert MIDIs, using specified instrument maps.

Another thing from the FE community that sorta links into Zahlman's editor, and I'm not sure if the Pokemon Hackers have done this already, is the use of MIDI instruments in the GBA ROMs. The "Instrument Patch" imports the MIDI instrument map from the song.gba file generated by MIDI2GBA, which allows for MIDIs to be directly inserted directly into the ROM in their original state.

A great example, one FE ROM Hacker (mariobro3828) ported a song from Golden Sun with this editor, and himself ported the instruments from Golden Sun to Fire Emblem. This is probably one of the most advanced things we've come up with, a direct instrument-for-instrument, note-for-note port of a song from an entirely different game.
 

colcolstyles

Yours truly
1,588
Posts
15
Years
I've never seen a tool with support for the attack, decay, etc. values in voicegroup entries. It's a pain to edit them by hand and ever since I stumbled upon this document, I've wondered how long it would take for someone to make a tool that allows easy editing of voicegroup/instrument data. Neat stuff. Thanks for sharing. :)
 
9
Posts
13
Years
  • Seen Jul 19, 2011
I haven't experimented it much, but it's much easier than modifying it manually.

Thanks for posting for me Arch :P

Custom Sound effects are also possible with wav2gba. Maybe I should link that too... at least once I get 15 posts.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
This is a wonderful gift, thanks!

Does Zahlman's Song Editor only support the Sappy Engine? Because I like to hack FFTA and only like 20% of the songs use the Sappy Engine. :(
 
1
Posts
12
Years
  • Seen Jul 4, 2011
The video of mine that Arch linked you to, it's an older version of the ported song, just follow the link in the description and it'll take you to my newer version.

To avoid credit grubbing, the ability to port instrument data is part of Zahlman's editor (to preserve the quality of the song). Most of the instruments I did not import manually, but I did successfully manage to port the GS drums manually (which...incidentally is like porting 20+ instruments at once because of the multiple tracks of the set...it's a nightmare, I don't recommend it unless Zahlman implements a way to port multi sample instruments).

The main thing I wanted to showcase with that video was the fact that I repointed some of the voice groups and made kind've a hybrid instrument map with two instruments from a midi instrument patch, and the rest directly from golden sun, using the midi instruments only when a certain instrument was incompatible with porting (gs drums sounded weird in FE for some reason...yes I did all that manual porting for nothing. Oh well, at least I proved it can be done manually. Also, the sawtooth synth instrument relies on GS's specific music engine, so I had to midi that too). I think I got it to sound pretty decent.

The other thing was the fact that I manually spliced tracks together. This is a handy little trick that helps you avoid the whole track limit thing. If you have knowledge of the music's score (I almost went the music major route so it helped me here), and how that is represented in data, splicing the tracks is easy. You just have to count notes and rests. The tracks can't overlap either. Though in the case of directly ported tracks, the game creators liked to use the B3 command (jump) to conserve space, which is always followed by a pointer, so it was a pain repointing about 80 or so pointers. Tracks inserted from midis should not have this problem. I used this technique to take a 10 track song and splice it down to 8 tracks, fitting within Fire Emblem's 8 track limit. Maybe someday there will be an app to do this very thing automatically.

Anyways, sorry for the jumbled mess of text I just typed. It's late...


This is a wonderful gift, thanks!

Does Zahlman's Song Editor only support the Sappy Engine? Because I like to hack FFTA and only like 20% of the songs use the Sappy Engine. :(
What exactly do you mean by sappy engine?

When porting a song, you feed the editor the offset of the header. With the information of the header, the editor ports every track there is a pointer to, leaving every byte of the tracks intact, save for the pointers, which it repoints automatically. It then looks at the pointer to the voice group data, grabs the necessary instrument samples for the songs, repoints etc, creates a custom instrument map for that song and puts it into the destination offset. If one of the voice groups has a pointer to a sub group (like drumsets do) then it does not import that track, because Zahlman hasn't programmed his editor to do something that intricate yet. The name of the game is lossless quality, it takes up a lot of data yes, but it's usually worth it.
 
Last edited:
9
Posts
13
Years
  • Seen Jul 19, 2011
This is a wonderful gift, thanks!

Does Zahlman's Song Editor only support the Sappy Engine? Because I like to hack FFTA and only like 20% of the songs use the Sappy Engine. :(

I've never actually tried. I know Tales of Phantasia doesn't use the Sappy Engine, and I've never experimented with Zahlman's application for those kinds of games.

If the table functions the same way, then it SHOULD theoretically be able to rip the song as well the voice sample.
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
I've never actually tried. I know Tales of Phantasia doesn't use the Sappy Engine, and I've never experimented with Zahlman's application for those kinds of games.

If the table functions the same way, then it SHOULD theoretically be able to rip the song as well the voice sample.

Turns out the version of Sappy that ArchsageX posted works with a lot more songs anyway. ^_^ Yeah, replacing the songs was never a problem. It was just tedious having to manually find the song number by playing through the game and setting a breakpoint on play_music routine. >_<

Once again, thanks for posting.
 
9
Posts
13
Years
  • Seen Jul 19, 2011
He's the guy that posted for me, since I didn't have high enough of a post count to do so.

I also have never used Sappy to rip or insert songs. I'm actually kind of wondering how it works to set the voicegroups. I've always used Zahlman's song editor since it was always importing from one Fire Emblem to the other. XD

Also, I still can't post links, but I should probably share wav2gba. Since sound effects you hear are usually just "one long note" and the "instrument" of the sound effect, it's pretty useful for having the GBA have the updated Fire Emblem "Get Item" or "Weapon Broke" sounds.

I just thought I'd share what we found to help you out and then mysteriously disappear... except the darned post count thing is preventing me from doing so. Well, I kinda understand. I'm pretty sure that prevents spam bots from causing a problem.


Edit: It SEEMS like I'm blind. That Sappy 2006 Mod 15 I found in the a Japanese GBA ROM hacking forum... I failed to see the "Import Sample" function.

Seems like my complicated process of making custom sounds... is now obsolete. XD
 
Last edited:

Platinum Lucario

The Legendary Master of [color=#D8D48C]Light[/colo
1,607
Posts
16
Years
This is excellent! Thanks so muchly, ArchsageX! For one thing, now we don't have to worry about Sappy crashing anymore, I really do think this modified version of Sappy should be spread around to everyone here on PC and to let them know how much better it is compared to the normal Sappy 2006 that has a load of bugs in it and doesn't read some of the waveform data in the voicegroup/soundbank, not only that but the original Sappy 2006 crashed at certain loop points when testing a song.

I am so glad we've actually an improved version of Sappy, I wonder if the program really is open sourced after all? Seeing that there's a newer one built by someone already means that the person has their hands on the source code of Sappy 2006. ^^

This surely is going to help me with inserting customized songs and editing the voicegroups/soundbank, so I could even make it sound even better. :o
 

Platinum Lucario

The Legendary Master of [color=#D8D48C]Light[/colo
1,607
Posts
16
Years
Oh, I like. I like. I will take a look at this because it will help with MIDI exporting a lot.

It doesn't like any of my Pokemon games. It crashes when trying to play files, and it doesn't like scanning for the soundtable in FireRed BPRE.

If you're wondering about Sappy 2006 Mod15 not showing the tracks in FireRed, well here's the interesting part. Sappy doesn't need an .xml file to be able to play and read the tracks in the ROM, you can just change and type in a higher number for which song you want to edit or play. In FireRed, the sound effects go from 1-255, while the BGM goes from 256-346, remember... the song number is in decimal, not hexadecimal.

Try typing in 298, then press play, and you'll hear the Kanto wild Pokémon battle music.

Maybe we'll have to see who is actually good at making a .xml file so that anyone can choose the song they desire, or you can always import the .xml from the normal Sappy 2006 (the buggy one of course). But I think it's best if someone creates a better .xml list for song list from what Kawa listed, like SE01, BGM01 and so on, because anyone is bound to insert new songs into their ROM Hack.

Oh and on another note, Sappy will only freeze if you select a song number that is blank and empty (that's right, free space!). So here's what you do, don't click play after when you put in a number higher than 346, instead... just click anywhere on the main amplifier area on Sappy and it will act like nothing happened. And you can insert new songs into the blank and empty spots.
 
Last edited:
9
Posts
13
Years
  • Seen Jul 19, 2011
Oh, I like. I like. I will take a look at this because it will help with MIDI exporting a lot.

It doesn't like any of my Pokemon games. It crashes when trying to play files, and it doesn't like scanning for the soundtable in FireRed BPRE.

It occasionally crashes for some reason, just like Sappy 2005.

As for your scanning the sound table, if it can't find it.. meh.

But if you know where it is, you'd best modify the sappy.xml file.

If you have used another Sappy before, you can probably use that Sappy.xml file.
 

ArchsageX

The greatest sage.
38
Posts
16
Years
  • Seen Sep 26, 2013
Just realized something! The instrument patch I shared only works for the game, Fire Emblem 7.

Instrument patch is a UPS patch that only works for FE7. Here's a raw hex version of it that you can paste into your ROMs manually.

http://dl.dropbox.com/u/5490460/Mid2GBA Instrument Patch.dmp

And paste it in your ROM at the offset 0x11C3AC0 (expand your ROM if you don't have that offset). That expands a ROM to about 20MB, so if you're warry about that sorta thing, you can also repoint the table to your own offset.

tl;dr summary for my version:

Patch your ROM/Paste the dmp at offset 0x11C3AC0.
When inserting MIDIs, reference the instrument map at 0x12F471C.
 

ArchsageX

The greatest sage.
38
Posts
16
Years
  • Seen Sep 26, 2013
You did it, didn't you? There's a different between "impossible" and "not advised."
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
*throws sappy into recycle bin* I'm loving this new Sappy! The table editing is awesome, as well as the import samples thing. Compatibility isn't my issue, since I have XP! :P
 
9
Posts
13
Years
  • Seen Jul 19, 2011
Considering how this version of Sappy is more useful than the old one...

Does that qualify as justification for updating the old topic/making a new thread on the Toolbox section?

I kinda only ended up here because most of the results/top results of "Sappy error" google search, like the "ActiveX object failed" or something like that results in one of this forum's very outdated topic, with no info on how to solve it, especially if those Sappy versions crash outright when you're running Vista or Windows 7.

As for any "source"... I don't have enough Japanese knowledge to decipher much on that site discussing "Sappy 2006 mod 12".

So getting the source code is VERY unlikely.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Considering how this version of Sappy is more useful than the old one...

Does that qualify as justification for updating the old topic/making a new thread on the Toolbox section?

I kinda only ended up here because most of the results/top results of "Sappy error" google search, like the "ActiveX object failed" or something like that results in one of this forum's very outdated topic, with no info on how to solve it, especially if those Sappy versions crash outright when you're running Vista or Windows 7.

As for any "source"... I don't have enough Japanese knowledge to decipher much on that site discussing "Sappy 2006 mod 12".

So getting the source code is VERY unlikely.

Most errors when starting sappy can be fixed my installing actual sappy from http://helmet.kafuka.org/, then copying the better one over it.
 

Xenesis

Syogun Changer
55
Posts
17
Years
Modifying voicegroups?

Sweet.

Music hacking's still probably the most complicated part of hacking a GBA game but what the heck, at least the tools are improving.
 
Back
Top