10-04-2012, 04:16 PM
Hrlo and welcrum, I happened upon a handy program recently and I'm not sure if tSR is quite aware of its existence yet. Along with it are instructions to both use it and to convert the resulting files to various audio formats. I might give a visual aid sometime, but :effort:, so right now it's text only.
This program reads a .gba ROM and extracts the soundbank from it, processing it into a .sf2 (soundfont) file, along with a .mid for every song/sound effect in the game. You can also convert these files into MP3/WAV if you so desire... say, for sound effects. This requires a little extra though.
I hope I don't come off as patronizing when I'm writing this but I'm basically trying to explain it so anyone could do it. I know everyone on tSR is intelligent but guests might not understand these things
Requirements for this program and associated conversions, with links:
- Java runtime environment, as GBAMusRiper is a Java program.
- Foobar2000 (handy free program that can play MIDIs with Soundbanks. A pretty good music player in general, to boot )
- Foo_MIDI, a plugin for Foobar200 that allows it to process MIDI files.
- LAME MP3 encoder (if converting to MP3. I haven't verified this yet but this download link should be safe - SourceForge is having issues currently)
- WAVPack (if converting to compressed WV)
- Oggenc (if converting to Ogg. Ogg's pitch seems higher for some reason though...)
It works with ~90% of GBA titles, but some don't use the most common sound engine, which this program is only able to support, sadly. However, it should work for most Nintendo published games - with a notable exception of Zero Mission/Fusion.
Usage:
- Extract somewhere (Anywhere really, but I suppose categorizing doesn't hurt!) and browse to it in Windows Explorer. Copy the address of the folder from the title bar.
- Open Windows Command Prompt (WinKey+R, type "cmd" and hit enter)
- Once the window is open, type "cd " and paste in the address that you copied from the Explorer window*, hitting Enter
- You should now be in the previously extracted GBAMusRiper directory.
- Enter "cd bin" and hit enter.
- To extract music, enter/paste "java gbaMus.GBAMusRiper your_rom.gba", where "your_rom.gba" is the filename of the ROM you want music/SE from**. The program shall do all of the work for you, spitting out a .sf2 file named after the directory and an arbitrary number of MIDI files named songXXX.mid***. Now the fun part comes, you need to manually rename all of those files
- To install the foo_midi component, open up Foobar2000. Click [File -> Preferences -> Components] and simply drag the .component file from above into the window, it should automagically install itself and prompt you for a restart. Do it. Now Foobar2000 plays the MIDIs, but chances are high that they sound terrible****.
- To get Foobar2000 to recognize a sf2 file it normally won't (it sometimes will if the sf2 is named after the directory it is in, i.e a directory named LttP_FS with a LttP_FS.sf2 file inside it), go into [File -> Preferences -> Playback -> Input -> MIDI Synthesizer Host].
- Change Plug-In to BASSMIDI instead of Emu De Midi. Next, go down to the BASSMIDI section and click the space to the right of SoundFont. Navigate to your sf2 file and select it. Now when you open a MIDI, it will play using the instruments ripped from your game. It should sound exactly like it did ingame, perhaps even better!
- If you wish to allow looping, select "When Loop info detected" or "Always" and check loopStart/loopEnd Track Markers (FF7PC, HMI). It doesn't always loop perfectly (a note may skip) but it works. Converted files do not appear to have this issue.
To convert these MIDIs into WAVs/MP3s:
- Open a song (or multiple songs) in Foobar and right click one/several under Title/Track Artist. Click [Convert -> ...] and configure/select your method of choice for output. Selecting a format may require codecs which are listed above for WV/MP3/Ogg. You can also configure where they are output/whether they are in separate files and what not. It should be self-explanatory.
- You may be prompted to open a file when you try to convert. In this case, simply navigate to the folder containing the codec you previously extracted (if you didn't, better do it now ).
- Enjoy your ripped music!
Man this took way more time than I thought it would
If you wanna copy/embed this tutorial somewhere (ignore this if you're merely linking it), just please let me know where you're doing this since I may need to update this eventually (say if one of the links break).
To show you what this program can output, I'll link some music/SE I extracted below; LttP_FS is mostly named at this point but there may be some mistakes and most sound effect files are currently un-named/un-converted. Gonna need to play Four Swords again so I know what's what.
I also plan to submit the sound effects from these games myself if they're not already on tS(ounds)R but if you can't wait for them, just tell me so I don't need to do any conversions
* It may vary for your CMD window but I was able to paste by hitting right-click. You can alter this by right clicking the top of the window (where it says C:\Windows\system32\cmd.exe) and selecting Properties, checking the Quick Edit and Insert Mode boxes.
** "your_rom.gba" should be copied to the bin directory just to simplify things, but if you want you can always navigate to the .gba file via "../"s. imo that's a pain in the ass though. Another note is that GBAMusRiper supports various command-line switches but if you really want to know about them, chances are you really don't need me to tell you how to do it
*** You can try playing these MIDI files in Windows Media Player if you want, but I wouldn't recommend it. Without a program that plays MIDIs with Soundbank (sf2) support, it's going to sound terrible - if you hear anything at all! This is where Foobar2000 comes in. I'll have assumed you already installed it from here on.
**** According to the component, you should not need to manually add the Soundfont to Foobar, but I found for LttP: Four Swords and Minish Cap I had to. I did not need to do this for Nightmare in Dream Land. Next instruction shall be italicized since it may not be necessary.
This program reads a .gba ROM and extracts the soundbank from it, processing it into a .sf2 (soundfont) file, along with a .mid for every song/sound effect in the game. You can also convert these files into MP3/WAV if you so desire... say, for sound effects. This requires a little extra though.
I hope I don't come off as patronizing when I'm writing this but I'm basically trying to explain it so anyone could do it. I know everyone on tSR is intelligent but guests might not understand these things
Requirements for this program and associated conversions, with links:
- Java runtime environment, as GBAMusRiper is a Java program.
- Foobar2000 (handy free program that can play MIDIs with Soundbanks. A pretty good music player in general, to boot )
- Foo_MIDI, a plugin for Foobar200 that allows it to process MIDI files.
- LAME MP3 encoder (if converting to MP3. I haven't verified this yet but this download link should be safe - SourceForge is having issues currently)
- WAVPack (if converting to compressed WV)
- Oggenc (if converting to Ogg. Ogg's pitch seems higher for some reason though...)
It works with ~90% of GBA titles, but some don't use the most common sound engine, which this program is only able to support, sadly. However, it should work for most Nintendo published games - with a notable exception of Zero Mission/Fusion.
Usage:
- Extract somewhere (Anywhere really, but I suppose categorizing doesn't hurt!) and browse to it in Windows Explorer. Copy the address of the folder from the title bar.
- Open Windows Command Prompt (WinKey+R, type "cmd" and hit enter)
- Once the window is open, type "cd " and paste in the address that you copied from the Explorer window*, hitting Enter
- You should now be in the previously extracted GBAMusRiper directory.
- Enter "cd bin" and hit enter.
- To extract music, enter/paste "java gbaMus.GBAMusRiper your_rom.gba", where "your_rom.gba" is the filename of the ROM you want music/SE from**. The program shall do all of the work for you, spitting out a .sf2 file named after the directory and an arbitrary number of MIDI files named songXXX.mid***. Now the fun part comes, you need to manually rename all of those files
- To install the foo_midi component, open up Foobar2000. Click [File -> Preferences -> Components] and simply drag the .component file from above into the window, it should automagically install itself and prompt you for a restart. Do it. Now Foobar2000 plays the MIDIs, but chances are high that they sound terrible****.
- To get Foobar2000 to recognize a sf2 file it normally won't (it sometimes will if the sf2 is named after the directory it is in, i.e a directory named LttP_FS with a LttP_FS.sf2 file inside it), go into [File -> Preferences -> Playback -> Input -> MIDI Synthesizer Host].
- Change Plug-In to BASSMIDI instead of Emu De Midi. Next, go down to the BASSMIDI section and click the space to the right of SoundFont. Navigate to your sf2 file and select it. Now when you open a MIDI, it will play using the instruments ripped from your game. It should sound exactly like it did ingame, perhaps even better!
- If you wish to allow looping, select "When Loop info detected" or "Always" and check loopStart/loopEnd Track Markers (FF7PC, HMI). It doesn't always loop perfectly (a note may skip) but it works. Converted files do not appear to have this issue.
To convert these MIDIs into WAVs/MP3s:
- Open a song (or multiple songs) in Foobar and right click one/several under Title/Track Artist. Click [Convert -> ...] and configure/select your method of choice for output. Selecting a format may require codecs which are listed above for WV/MP3/Ogg. You can also configure where they are output/whether they are in separate files and what not. It should be self-explanatory.
- You may be prompted to open a file when you try to convert. In this case, simply navigate to the folder containing the codec you previously extracted (if you didn't, better do it now ).
- Enjoy your ripped music!
Man this took way more time than I thought it would
If you wanna copy/embed this tutorial somewhere (ignore this if you're merely linking it), just please let me know where you're doing this since I may need to update this eventually (say if one of the links break).
To show you what this program can output, I'll link some music/SE I extracted below; LttP_FS is mostly named at this point but there may be some mistakes and most sound effect files are currently un-named/un-converted. Gonna need to play Four Swords again so I know what's what.
I also plan to submit the sound effects from these games myself if they're not already on tS(ounds)R but if you can't wait for them, just tell me so I don't need to do any conversions
* It may vary for your CMD window but I was able to paste by hitting right-click. You can alter this by right clicking the top of the window (where it says C:\Windows\system32\cmd.exe) and selecting Properties, checking the Quick Edit and Insert Mode boxes.
** "your_rom.gba" should be copied to the bin directory just to simplify things, but if you want you can always navigate to the .gba file via "../"s. imo that's a pain in the ass though. Another note is that GBAMusRiper supports various command-line switches but if you really want to know about them, chances are you really don't need me to tell you how to do it
*** You can try playing these MIDI files in Windows Media Player if you want, but I wouldn't recommend it. Without a program that plays MIDIs with Soundbank (sf2) support, it's going to sound terrible - if you hear anything at all! This is where Foobar2000 comes in. I'll have assumed you already installed it from here on.
**** According to the component, you should not need to manually add the Soundfont to Foobar, but I found for LttP: Four Swords and Minish Cap I had to. I did not need to do this for Nightmare in Dream Land. Next instruction shall be italicized since it may not be necessary.