Thysbelon.Logo of a Hummingbird moth.

My Attempts to Improve GBA Music Romhacking and SiIva-Style "Ripping"

(Whenever I talk about "ripping" in the below post, I am referring to a style of mashup made popular by SiIvagunner.)

Hello! Working on my last post made me think about how, even though GBA ripping is very easy and reliable especially compared to other consoles, the process could still be improved. For example, GBA_Mus_Ripper has a bug that causes the generated soundfonts to sound horrible in fluidsynth, and it often adds vibrato to songs that aren't supposed to have vibrato.
I was also thinking about how I remembered Sappy2006 being a very easy to use program to inject sequence data into most GBA games. I thought "How hard could it be to rewrite that part of Sappy2006 in a modern programming language so more people can use it?". If I could pull it off, the result would be useful to both romhackers and high quality rippers. And I did pull it off!

GBA_Mus_Ripper

I tried to make this fork of GBA_Mus_Ripper the best it could be. I need to give huge credit to IAGOnGithub, who fixed the fluidsynth soundfont bug and made lots of other bug fixes too.
This version of GBA_Mus_Ripper is a fork of IAGOnGithub's fork of berg8793's fork of CaptainSwag and Bregalad's GBA_Mus_Ripper. I also took a bug fix from justedni's fork.

I recommend running GBA_Mus_Ripper with the arguments -xg -sb -rc -raw.

-sb
Outputs all the soundbanks in the rom as separate sf2 files, instead of all in one sf2 file as is the default. This is necessary for some games to get functional soundfonts (e.g. Circle of the Moon).
-rc
Rearranges the channels of the output midi in order to avoid channel 10, which midi synthesizers read as the percussion channel. Some synthesizers will respect the midi file's request to treat channel 10 as an ordinary tone channel, but some like fluidsynth do not, so -rc is necessary for these cases.
-raw
A mode that focuses on dumping raw GBA sequence data. Using -raw is most useful for people who plan on injecting their edited midi back into the game, but I recommend that all users use it because I've updated this mode to sound as accurate to real hardware as possible.
-xg
May not be necessary, but I've never tested the program without it, and I don't think it has any downsides. -xg tells the program to use the extended general midi standard when outputting midis.

Midi2AGB

This is a program written by ipatix that can take a midi file and convert it into ARM assembly code that can be injected into a GBA game. It's very good!

Update Oct 4 2024: I have made slight modifications to it for the purpose of my romhacking/ripping workflow.

gba-song-assembler.py

This is a rewrite of Sappy2006's assembler into python. This program takes an .s file outputted by Midi2AGB, compiles it to machine code, and injects it into a GBA game. The original Sappy2006 could only be used on Windows, but this version should be usable on any platform that can run Python!

There are still more features I want to add to these programs, but I thought I would release them now because they're in a good state now and it will take me a while to add those last features.
I hope you find them useful!

Tags:
Categories: