by TurbomanAlco at 4:37 PM EDT on September 25, 2012
I kinda of stopped working on this but I could upload what I have done so far into a .rar. I think Yuuto has come along allot further than I have though. I'll come around to it soon though. I have other projects I'm working on at the time.
Okay, since I saw the MIDI format doesn't support everything the BMS sequences need (especially the higher amount of instruments, the different dynamic parts and looping) I decided to write a player in C# instead of an converter. I tested the playback with a dummy sound and it sounded okay so far. At the moment I'm implementing the playback of samples using the WSYS/IBNK files.
Terribly silly, but I saw the name thing on the first page. I think either:
-It could just be RSF (Revolution). I would personally dislike this as it lacks the "original" factor, but eh. -DSF could be renamed to KSF (Katana), and DSF would then be the name of a possible NGC/Wii format (Dolphin). Aside from the above, I also like this because it matches with the likes "USF", even in intention.
(I dislike "CSF", yet have no problem with "2SF". \O_o/)
I tried to rip the wav samples from tp but it didn't work, it doesn't use the szs file like super mario galaxy 2 does. It does however use the Z2Sound.baa file. Would renaming that to szs work? Because I really want a tp soundfont to see the light of day :) doubt I'll be working on it unless we get a whole team to collab.
Attention! guys I made a discovery!!! by dj4uk6cjm at 6:21 AM EDT on July 19, 2013
I finally did it! I was able to get a hold of the wav samples from the Z2Sound.baa using audiorippers code!!!!
The line of code is:
baad Z2Sound.baa ren "Z2Sound.baa.0.wsys" for %%1 in (*.wsys) do wsyster %%1 del Z2Sound.baa
----------------------------------
I repeat! The line of code is
<i>"baad Z2Sound.baa ren "Z2Sound.baa.0.wsys" for %%1 in (*.wsys) do wsyster %%1 del Z2Sound.baa"</i>
----------------------------------
I got thousands of wavs after running the batch (too many to count!) more like 16,000 if you want an estimate and don't thank me, thank audioripper as I edited his code from the super mario galaxy 2 sample rip.
I can't upload all the files right now as it's a little more than half a gigabyte but whats the point anyway without knowing the loop points? Merely for entertainment I guess until we find the loop points...enjoy.
Really? I couldn't find it anywhere in the search, well at least it's here for anyone who wants to rip all the samples from their own copy of the game.
Several programs (Kontakt 5 for example) claim the soundfont is invalid. :S
Also, I have an idea for loop points. Reading through the Wii dev documents it seems the loop points are stored within the audio files themselves. However, Nintendo don't use the WAV format for their files, they use AIFF. If someone could try rewriting the software to dump the AW files to AIFF it would be awesome. I mean… the loop meta data COULD be lost in translation. It's worth a try.
Starerik try opening the soundfont in your daw with sfz player (e.g. fl studio, sfz player) it worked for me :) and wow :O how did you find/read the loop points for the samples Yuuto? Can viena do it? I've been trying to find the loop points for the dumped sample wavs for a long time. I use Vsampler to loop some of the wavs to some success but not perfect.
I found out that the WSYS banks contain information about each sample and after I have understood the structure I have done the looping manually using a hex editor. But now I've written a tool to show that information. It would also be a good idea to write a program that creates the SoundFont automatically but I don't know how envelope data is handled.
Sound font does not work properly with SynthFont2 or does not work properly at all. If I assign it to track from ZTP it just plays drums. May be I'm doing something wrong.
One thing that has been bugging me all this time is why we don't have a sample for wolf link howling, you know from the howl stone songs in TP? Is it just streamed or doesn't exist?
"The only way to do it through actualy ripping (and not recording the music directly through the game) is to get a midi file from the bms files and use the music banks from the aw files and put them together."
Hey wait a minute, is it possible to join a midi file with its .aw? It's what I need for Pokemon Box!!
Contained within the first link (the stream ripping tools page for this forum) that google spits out.
Just modify the source code and recompile to make it dump raw instead of converting to wav. As far as turning it into a soundfont is beyond my capabilities.
You can't pass the entire disk image to the program. You need something to extract the relevant files first. IsoBuster can extract from GameCube images.
An even easier and less time consuming program to use would be the Dolphin Emulator, just browse (not open) for the ISO in question in the emulator and then right click it and go to properties and filesystem and from there you can look for the desired sound/bgm/data folder you want, right click again and hit extract.
@dj4uk6cjm - Well I just stick with vgmtoolbox anyway since I don`t have the tendecy to sometimes lose out many updates for an older build. It supports Windows XP even on its latest version, too.
@Nisto I digged into the ISO with VGMToolbox, and I only found AST files in the AudioRes folder. Are these the same as AW files? I can't open them with VGMTrans, anyway.
EDIT: I found AW files too, but I can't open them with the VGMTrans fork either.
Hey @Yuuto I congratulate you on the significant progress on the soundfont! By chance, are you about finished with the soundfont? No pressure haha Take your time. Or maybe I haven't downloaded the most recent one? The reason I was curious was because this soundfont is literally my most favorite of all time. I'm obsessed with the Twilight Realm atmospheric sounds for some reason lol Anyways, I'm thoroughly enjoying the current soundfont! I'm just curious if there are more instruments you're working on.. If you can't do any of the above, it's perfectly fine. We are all human, and we are all consumed by time and life.
Is there a tool for extracting the BMS sequences from the sequence.arc file? Searching this bloody forum is a nightmare. I already have VGMTrans built with the Qt UI.
by Nonchalantree at 10:42 PM EDT on September 9, 2020
Time for another resurrection! I'm going to complete the TP SoundFont once and for all. But I had trouble understanding Yuuto on how to get the AW file number, (likely because of those missing characters that appear like this "�").
So for example, I have instrument #3's (hex is 026B). But I can't figure out where to find the corresponding AW file.
Anyone here who does understand how to do this?
EDIT: Nevermind, I found a VGMTrans fork to do the dirty work for me.
edited 11:41 PM EDT September 9, 2020
by Nonchalantree at 1:17 AM EDT on September 13, 2020
actually I take back that nevermind. Magicus's VGMTrans fork has trouble with getting some of the instruments.
As with everyone here, I too am interested in TP SoundFont creation that's why I created a forum account to share my findings... and also to bump the topic ¯\_(ツ)_/¯.
Using the wsyster method is great if you want all the wave files, but I want the complete collection... root keys and loop points. Sure I could figure that out using Yuuto's guide, but I don't dabble in hex.
As Nonchalantree pointed out, Magicus' fork of VGMTrans has been able to spit out sf2 banks. But upon further inspection, his code only scans the first aw file. I know this because when you open the .baa file alone the log reads it can't locate BgmWave.0.aw. Also renaming a different file to be 0 results in a crash. If you open that bank_11 converted by VGMTrans in a soundfont editor you'll get 240 instruments of repeated BgmWave.0.aw sounds.
I'm not a coder, but if someone else can pick up where Magicus left off you might be able to write code to search for the rest of the .aw files in the wsys collection.
Anyone having trouble with the Staff Roll’s bms files from Twilight Princess ? I tried to convert them into midi files but all I got is a 41o unreadable file.
Generated TP SoundFonts by Yuuto2 at 4:18 PM EST on February 12, 2023
In case anyone is still interested: WIP TP Soundfonts The folder contains an SF2 for each instrument bank found in the game (5x SE, 3x BGM).
The SoundFonts were generated automatically from the BAA audio archive. However, this is still an work in progress version.
Things that do work: - sample looping - key zones - sample panning for percussion instruments - volume multipliers for each instrument and key zone - pitch multipliers (tuning) for each instrument and key zone - release envelope (kind of)
Things that don't work yet: - most of the envelope stuff
Mapping the game's envelope data to the ADSR model used in SoundFonts is kind of difficult, since the game has much more possibilities and freedom in designing the envelopes. Not only are there potentially more phases then the typical attack, hold, sustain and release, but the system also offers 4 different curves for envelopes. That is why the release phases of most samples seem to be a bit short.
The whole tool is work in progress and needs some serious refactoring, but I will release the source code eventually when I'm happy with the results.
General Updates by hat at 1:41 PM EDT on July 9, 2023
Managed to stumble upon this forum after being invested enough in finding useable sound-fonts / midi's for the game. Read through the whole thing and man it's like finding a hidden gem on the web.
Anyways read Yuuto's message above as they've been much more dedicated to this. Honestly probably the only usable version relies on them, without us having the source-code or other discoveries to follow the stepping stones.
We've got at least a semi-tangible sound-font to work with, but the midi's still remain + some effects and other things. Will definitely be waiting out even for another 5 more years for more progress, considering how close the finish line is.
I'm just popping in on this subject, as I've been really into this whole music thing for a little while now. I tried using the php code to convert .bms to .midi, but it doesn't seem to work. Has anyone else run into this problem? It could be my php configuration, but I don't know
BMS Converter by hat at 12:03 PM EDT on October 7, 2023
I managed to whip this together in a week a few months ago. You can use Yuuto's mostly working soundfont, but this can convert the BMS's with reasonable accuracy.
There is some clunkyness with pitch's in some songs, but it's a big improvement from the old converters. In truth though, the MIDI format itself is so limiting; would be much more useful if someone had a sequencer / live-player instead that supports all of J2A's systems for 1:1 pure audio.
Zant's theme is a great example as it uses PPQN changes which MIDI doesn't support. It still works don't get me wrong, but it isn't a 1:1 conversion for a couple of the songs and I doubt it'll ever be due to MIDI limitations.
Some people have used it for other similar games that use the J2 audio system (Super Mario Galaxy) and it seems to work fine.
This version should correct the broken pitch bends that the old VGM-Trans fork used. Either way it was about time that we moved away from the old php converter. So hopefully this helps!
Live BMS player in the making by Yuuto2 at 12:01 PM EDT on October 8, 2023
You are correct @hat, a live player would be really helpful. As you already pointed out, MIDI and also SF2 are quite limiting and thus not really suitable for ripping music and sound effects in this case.
That is why I have been working on a live player/renderer for quite some time now. It aims to mimic the JAudio system (currently only exactly the version Twilight Princess uses) as closely as possible. For the unknown stuff I am reverse-engineering the game's code in a disassembler/decompiler, which is a very tedious task and consumes a lot of time.
I also used this live-playing approach to render BMS to MIDI earlier this year and it could already handle most of the dynamic commands, see here. That thing was just a proof of concept that converted BMS to MIDI live and passed the MIDI events and the pre-generated soundfont to a MIDI renderer to play it back (with all limitations, that is).
I'm really sorry it takes so long, but this is my all-time favorite long-term project and I have high standards regarding my work on that. Also, I switched from C++ to Rust mid-progress because I wanted to learn that language anyway.
TL;DR: BMS live player/renderer (TP version) in progress, there is steady but slow progress, time is scarce and I cannot make a guarantee for a finishing date.
If you really want to see the state of the "old" C++ POC I abandoned, I perhaps can find some time to make the project a bit more portable and usable and eventually upload that code.
Twilight Princess BMS player preview by Yuuto2 at 4:30 PM EST on February 20, 2024
I spend a lot of time on trying to implement a live BMS player recently and got quite some work done. I am now able to playback TP's music sequences in realtime with an output already close to the original.
See for yourself with this little command line tool I've hacked together. In order to be able to use it, you need to extract the "Audiores" folder (which includes the Wave folder) and .bms files from the game ROM. Then run the following in a command prompt:
bmsplay.exe --path <path to Audiores folder> --bms <path to sequence> play
So for me it could be: bmsplay.exe --path "C:\Users\yuuto\TP\Audiores" --bms "C:\Users\yuuto\TP\Audiores\Seqs\seqs\deathmountain01.bms" play
When playing back an interactive sequence that contains segment jumps (like most of the boss themes do), you can enter the segment number you wish to jump to in the console. E. g. when playing e_fireman and entering 1, the "vulnerable" part is played. When entering 2, you jump back to the main track. Feel free to experiment.
Bonus: Instead of "play" you can pass "render" together with an output filename to render 2 minutes of a sequence into a wave file.
Please keep in mind that at the moment this tool is just for testing purposes. Thus it's not very convenient to use, largely untested on other systems except for my very own and may break any time. The executable is Windows-x64-only but the project itself is cross-platform. It is still under heavy development and it may take a while to produce stable results.
That being said, here's a short summary of what works what doesn't: - Envelopes are fully supported. - Support for surround sound is built-in, but the tool uses a stereo mixer in the last step. But there will be 5.1 mixing in the future. - Most features are implemented in a way that mimic the original very closely. - Reverb however is emulated very roughly. - On segment jumps, all releasing notes are cut off. - Tremolo & vibrato work. See e_goma02 and e_zant (segment 8/9). - Support for some BMS commands and more advanced sound registers is still missing, but most of these are only used by the SFX sequences. - There are still some sound artifacts like crackling or sudden volume changes.
There is still a lot to and a lot of details left to implement, but I think this is a solid foundation and implementing this has definitely been a lot of fun.
This is awesome! I really hope to see the work on this continue! I'd love to have the ability to listen to native Gamecube sequences on the PC, rather than recordings! I really hope this leads to other, previously unripped games, becoming available (Skies of Arcadia: Legends, for example, or Four swords on the Gamecube, or maybe Final Fantasy: Crystal Chronicles...). Though, unfortunately, it *does* require that the game in question is using the Nintendo dev kit for its audio, so obviously, this still leaves a lot of games as unavailable.
Super awesome @Yuuto2! I think we've definitely come to the consensus that live players are definitely the way to go, must've opened up a lot of freedom not being constricted to MIDI and soundfonts.
Love how e_zant actually now works with PPQN changes, and the howling tracks function. Theres a few expected audio artifacts (snowboard has some crackles). Hopefully it'll get some more features like individually exporting the sub-tracks and changing their volumes (like in holy_forest where everything is combined but changed in-game through triggers). Either way, some massive progress!
You're totally right, the MIDI+SF2 method has been way too limiting. On the other hand, this freedom requires a complex implementation, but in my opinion this is totally worth it.
None of the tracks have a PPQN change, as far as I can tell. Ticks per beat is set to const. 120 at the beginning of the root track for each music sequence. Maybe you mean tempo changes? e_zant has some of them.
One of the next things I will implement is volume ramping which should eliminate most audio artifacts. Next step is to add support for playing back sound effects. After that, enabling/disabling and volume control of single tracks will be next. I think creating a convenient tool that actually offers some useful settings for playing/rendering would also be a great idea. Oh and getting all this stuff on GitHub.