A Comprehensive Guide to Ripping Music for Use In GBA FE

A few years ago, I wrote a music insertion guide that briefly touched on how to rip music from other games to use in GBA FE. Since then, the available toolage has changed somewhat and my knowledge on the subject has expanded. This guide aims to be a comprehensive resource for ripping music in a format compatible with insertion to GBA FE.

Introduction

To start off, we need to be clear about what we’re trying to get here. To get music to sound good in GBAFE and not take up a ridiculous amount of ROM space, we need them to be sequenced audio, and the toolage available for this uses MIDIs. A MIDI is analogous to “sheet music” of the song in question: it doesn’t contain any instrument data, just the notes of the song. See the Basic Music Insertion Guide for more information on what to do once you have the MIDI, and the Intermediate Guide for ways to improve the process outlined in the former.

The reason we want to rip these ourselves instead of finding pre-made MIDIs on the internet is that we cannot run into permission issues when the MIDI is generated directly from the original game, which often can happen when using MIDIs transcribed by a human being, as well as avoiding inaccuracies in the MIDI by generating it from the original song directly and sidestepping the imperfections of a human transcriptionist, resulting in a more accurate-sounding final product.

Table of Contents

For this guide, we will go in an order roughly coinciding with compatible platform release dates.

From this point on are generally sub-par but technically functional options. These are recommended only as a last resort.

VGM Rips

.vgm is a file format that contains a sample-accurate log of commands sent to a sound chip. It can then be used to play back a very accurate rendition of the song as it would be output by the original system. It supports a wide variety of sound chips, giving it compatibility with both popular and obscure consoles alike.

The premier source of these files is VGMRips. At the time of writing, there are over 65,000 songs from almost 4000 games in their catalog, all available for download. The files downloaded here are .vgz, which is a compressed form of .vgm; for our purposes, you can treat this the same as a .vgm file. All files on this site should be compatible with this method

Once you have your file(s), download vgm2mid. This is the tool that will convert the .vgm to a MIDI file. The download is somewhat convoluted for Windows users: grab the Win32 binaries (full package, 2012-03-11) download, extract it to a folder, then download the Win32 binaries (exe-only update, 2013-09-09) file and replace the vgm2mid.exe in the folder with the one you just downloaded. For non-Windows users, there are no prebuilt binaries. You will need to grab Source code (VB6, 2013-09-09) and compile it for your platform of choice.

Once installed, using vgm2mid is simple. Run the executable, add files or directories using the buttons labeled for doing so, then press Convert All. It will output the MIDIs for each song in the same location as the .vgm.

There are some limitations to the output of this method. Noise channels often used for percussion are not always properly converted, or even present, in the resulting MIDI. This is for a variety of reasons, but it largely isn’t feasible to convert noise to a sensible MIDI drum track. As such, you’ll have to add this section yourself if it’s missing or incorrect.

Examples of compatible systems with this method include:

  • Nintendo Entertainment System (NES) / Family Computer (Famicom) / Family Computer Disk System
  • Sega Mega Drive / Sega Genesis
  • Game Boy / Game Boy Color
  • Sega Master System / Sega Game Gear
  • TurboGrafx-16 / PC Engine
  • PC-98
  • MSX2
  • Neo Geo
  • A wide variety of Arcade Machines

At the time of writing, there are 196 systems in total, so this barely scratches the surface of what’s available.

If you’re looking for Master System or Game Gear songs, you won’t find them on VGMRips. You’ll need to get them from SMS Power instead. The same conversion process applies. Similarly, if you’re looking for a specific Genesis/Mega Drive song, you can try Project 2612 in addition to VGMRips.

If the game you want the music from has not been ripped in .vgm format but the console is compatible, it’s possible to rip the music yourself. See this list of emulators with VGM logging for the tools to use for ripping the music. Once you have a .vgm file, the same conversion process applies.

VGMTrans

VGMTrans is a tool that supports a wide variety of file formats. For most of these, you can drag & drop a ROM or equivalent into the program and it will automatically locate relevant music files, and this is an option for everything except SNES games, where instead of dropping the ROM you’ll want to use .spc files. These are similar to .vgm files but specifically for the SNES’s sound chip. You can find a large collection of SPC rips at SNESmusic.org. Note that the files downloaded here are .rsn: these are just fancy .zip files and can be opened with any archive manager, they are just archives containing all of the .spc files in the collection and a text file with metadata. In addition, you can use the music files from ROMs directly rather than detecting them automatically. This is useful for .psf files, similar to .spc files for PS1 games, of which a very large collection exists on Zophar’s Domain.

To rip a song, drop the relevant file into the program. If it’s compatible, you’ll see a number of songs appear in the box along the bottom of the window. You can click on any of these to select them, then press the Play button below the songs box to listen to it. Once you’ve found the song you’re looking for, right-click on it and select any of the options. the SF2 file can be useful in formatting the MIDI afterward, but it’s not necessary. A MIDI file will be output where you specify, which can be formatted for insertion.

Examples of compatible systems with this method include:

  • A large number of games for the Super Nintendo Entertainment System (SNES) / Super Famicom (SFC)
  • A large number of games for the PlayStation 1
  • A selection of games for the PlayStation 2
  • Most games for the Nintendo DS
  • A selection of games for the Game Boy Advance

Note that despite being compatible, I would not recommend using VGMTrans for Game Boy Advance games. There are more specialized tools for this purpose that we will touch on later. Though this does have limited PlayStation 2 support, note that the PS2 is well into the era where sequenced audio in games became increasingly uncommon, so the vast majority of PS2 games do not use sequenced audio and there is no good way of converting the streamed audio they do use to MIDI.

N64 Midi Tool

As the name suggests, N64 Midi Tool is a tool specifically for Nintendo 64 games. Launch the program, select the game you want to rip from in the Game dropdown list, then use Load ROM and select the N64 ROM for the game you selected. After it loads, you can either press the Export All to Midi button and sort through the exported files, or select a song from the Spot dropdown and use Export Midi to just export that one song. At this point, you have the files to format for insertion.

If you run into trouble trying to run the program, you may be missing required dependencies. If so, you can find the relevant installers here.

VG Music Studio

VG Music Studio is a tool for Game Boy Advance and Nintendo DS music. I would recommend using VGMTrans over this for DS music, but it is the premier option for GBA music. This is analogous, but not identical in features, to Sappy for GBA purposes, but it handles compatible games differently. Sappy has a tool that automatically detects if a game is compatible. This tool is imperfect and misses a number of games that its toolset would be compatible with minor changes. Conversely, VG Music Studio contains a database of compatible games and the relevant locations within their ROMs. This means that the relevant information is manually specified: it also misses a different set of compatible games, but unlike with Sappy you can add them manually to the database file if need be. In addition, it’s also compatible with AlphaDream’s GBA sound engine, meaning it can get music from Mario & Luigi: Superstar Saga among a handful of others.

For most games, you’ll want to load them using FileOpen GBA ROM (MP2K). This is the “Sappy engine”, and the one most games use. For Superstar Saga, etc. use Open GBA ROM (AlphaDream) instead. Select your ROM, set the song number in the top bar, or advance through them until you find the song you’re looking for, then use DataExport Song as MIDI to get the song as a MIDI file.

spc2midi

spc2midi is an ancient tool for converting SPC files to MIDIs. The benefit of this tool is that it technically works with any SPC file; the tradeoff is that it’s very unintuitive to use and usually does not give a very good output MIDI.

FileLoad SPC to load the SPC file, then FileSave Midi to save it as a MIDI. You have to specify the output file location along with the exact length of the output MIDI in seconds. This is quite unwieldy to use and the MIDI then output is likely going to need a lot of work to be insertable, hence why this is not recommended as anything other than a last resort.

emu2midi

emu2midi is a trio of lua scripts for various emulators that convert the raw audio output to MIDI in real-time. the scripts are nes2midi, pce2midi, and gb2midi, each of which is to be used in conjunction with a specific emulator; the linked post has more specific information. gb2midi specifically needs the version of VBA-RR mentioned and linked to within the post to work, newer versions are not compatible and the current download host for VBA-RR does not have the necessary version.

To use, start the relevant emulator and game, pause when you reach the point where you want to start recording audio to MIDI, start the Lua script, unpause the game until the section you wanted to record is finished, then stop the Lua script. A MIDI file will be created in the same directory as the lua script.

This is a poor choice due to its lack of quantization (it’s not going to be aligned to normal measures in a MIDI editor at all) and it picking up all sound output during the recording and not just the music, but is still an option if need be.

If All Else Fails / Very Case-Specific Solutions

If all else fails and you still want to rip music from a game, if it’s an old enough PC game and you’re lucky it might already have MIDIs as its soundtrack, or have an official MIDI soundtrack release. In these cases, you’re going to need to search for more information on the specific game yourself. If the game uses MIDIs for its music normally, you may be able to find them within the game files, or some additional game-specific intermediate step. If there is an official MIDI soundtrack release, such as with the Ys series, you can try to locate a rip of the soundtrack somewhere online or get ahold of the soundtrack and rip it yourself. In these cases, it may be in your best interest to forego ripping the music and either transcribe it yourself or find a pre-made MIDI online somewhere with adequate permissions, but these may still be options available to you nonetheless if you wish to pursue them.


I’ll make an effort to update this guide with methods for more platforms as they come around. As always, please let me know if you see any issues so that they may be corrected!

27 Likes

Super cool, thanks for putting this together.

My immediate reaction to reading about the N64 tool was “finally, the world can hear Mischief Makers MIDIs” but I got this error when trying to open it:

image

Curious if there’s any additional setup on my machine I need to do to run this. Thanks Sme.

The readme mentions installing these first:

6 Likes

Finally was able sit down and get this working. Thanks again for this guide.

2 Likes

I followed the method here using GBFanPlus (a deprecated emulator) to record and rip a MIDI from a GBC game. Was not too terrible and the MIDI came out decently with multiple tracks.

3 Likes

Any tips on dealing with tracks that export distinct instruments on the same channel?

Struggling to clean up some output in getting where it’s clear that a few channels got merged. Appreciate the help

3 Likes

I can only think of two scenarios that would fit your description: a MIDI track with a lot of program changes, usually caused by exporting a MIDI from a game that dynamically allocates voices across channels (some SNES games do this), and the solution to that is to cry and maybe manually copy-paste each section of the track to new ones for each instrument; or something going wrong when opening a MIDI in Anvil Studio (i.e. sounds wrong compared to how it sounds in, say, Windows Media Player), which might be resolved by updating Anvil Studio, but is more likely to be resolved and (probably painstakingly!) fixable in another MIDI editor.

However, I could be off-base, and your issue is related to some particular exporter outputting some complete mess. More details would be appreciated if what I said here doesn’t address your particular issue.