Next Page

BMS finally figured out!!! BMS to MIDI Converter/Exporter coming soon! BMS Collection Thread~ by dj4uk6cjm at 9:24 AM EDT on July 16, 2014
So my friend has finally figured out exactly what bms do and the other files associated with it like szs, aaf, wsys and the bnks and heres what he told me:

[QUOTE]Turns out, the BMS files are played directly from RAM in real time without any modification (i.e. interpretted) and don't have "tracks" per say, but more like subroutines, as in the file is being scanned in several independent locations at once. Each subroutine is assigned an ID number (which may or may not be unique) and has their own polyphony, note history, jump history, delay timer, etc. What I've seen most people treat as a header is not a header, but rather just another part of the music file that ends up "spawning" the other subroutines.

The AAF file is loaded into memory when nintendo.szs is loaded and decompressed at the beginning splash screens (since it needs the coin sound effect and images) and kept there for the entire game. w1stLoad_0.aw is loaded immediately after nintendo.szs, while w2ndLoad_0.aw is loaded at the title screen (along with mario.szs and others) and kept in memory for the rest of the game, as well. In other words, what you were told was right:
* BMS files tell the audio engine what notes to play with what bank and program numbers.
* WSYS files tell the audio engine where each sample is in specific AW files (since those are just raw sample data pools) and specifies information such as what note a sample represents, loop information, sample rate, etc.
* IBNK files tell the engine the articulation of an instrument, along with which samples it uses and how the samples are mapped to the notes.

So the flow chart would presumably be: BMS -> IBNK -> WSYS -> sample data -> synthesis engine -> output[QUOTE]

This is the way super mario sunshine works at least so the format is probably similar in some other games as well. I had a feeling it worked like this for some time now myself, very useful information. :D

Check out his newest video of his BMS to MIDI Exporter in action here. Still have a long ways away but I will have the honor of being the first person to beta test it :D so I'll let you guys know how that goes. :)

He's coding it in C# and it should support windows 7 and 8 (maybe) he's doing some tests on XP (all 32-bit) so you will need Net 4 or 4.5 if you want to use it whenever it is ready and if you can run this then your fine and you will need the original super mario sunshine rom, I'm not going to tell you where to get it but just that it has to be either ISO or GCM with the exact file size of 1,459,978,240 bytes. Luckily I already have it. :)


So far we have the bms for Super Mario Sunshine, Super Mario Galaxy 1 & 2, Luigi's Mansion, Twilight Princess, Donkey Kong Jungle Beat, Wind Waker, Four Swords Adventures and Double Dash but we are looking for more so I've also made this a BMS Collection Thread for you guys to post all of your bms you have collected over the years or just now :P

Although Super Mario Sunshine is a priority and comes first all these would be good to test. ;)



Thanks again you guys~

edited 2:53 AM EDT July 17, 2014
by Kurausukun at 11:40 AM EDT on July 16, 2014
Super Smash Bros. Melee does not use sequences, the entire game is streamed. By the way, this is awesome.
by Yoshinkeru at 1:14 PM EDT on July 16, 2014
So some Gamecube games DID use sequences? I hope we can get the Animal Crossing soundtrack soon...maybe even start bms.joshw.info?
by dj4uk6cjm at 1:17 PM EDT on July 16, 2014
Noted! Any ideas on more BMS's we could use? FYI his soundfont code is sounding awesome! :D
by dj4uk6cjm at 1:26 PM EDT on July 16, 2014
Wii does too, hey I was shocked to learn that skyward sword even used sequences, I always thought nintendo did pure live orchestra :( I have the samples to prove it. :P
by soneek at 1:48 PM EDT on July 16, 2014
Me gusta. Also, not all sequences will be BMS. Most Wii games will use RSEQ if they're sequenced.

If your friend is interested in working with 3DS sequences though, I'd be willing to pass over my research. I've mostly gotten it finished, minus matching sequences to banks, but I don't have time to finish a player, or a new sequence format right now.
by hcs at 4:21 PM EDT on July 16, 2014
Fantastic, looking forward to hearing further progress on this project.
by Yuuto at 4:38 PM EDT on July 16, 2014
Since I did intense research on TP's BMS sequences for the last two years (I have already figured out that the tracks are 'executed' simultaneously and the 'header' is just a kind of meta track, just realized I haven't updated the player on Codeplex but on MediaFire) I wonder if you managed to decipher the special commands used in dynamic sequences (there are a lot of them) and envelope data in the IBNK.

Would be awesome!
by dj4uk6cjm at 5:44 PM EDT on July 16, 2014
Sigh bad news, I was just informed by my bro that Skyward Sword doesn't use sequences afterall......they're all streamed with a BRSAR like New Super Mario Bros. Wii.

Well that's one down XD but there may be some more games with sequenced music, post all the bms we don't have you can find here. Thanks~
by bxaimc at 6:47 PM EDT on July 16, 2014
*cough Wii Fit cough*
by Benjamin at 7:43 PM EDT on July 16, 2014
Paper Mario: The Thousand-Year Door is all streamed as well. As for the sound effects, I have no clue what file format the SFX sequences use.
by dj4uk6cjm at 9:48 PM EDT on July 16, 2014
Ugh well that's just great! :( going to have to check that off the list. Hopefully there are some more games that support bms, I don't want to leave any out. :P
by brncao1 at 10:40 PM EDT on July 16, 2014
Nice work! Would like to get the midis exported from all the Zelda games on Gamecube.
by Kurausukun at 12:26 AM EDT on July 17, 2014
If I wanted to play the Super Mario Galaxy files, how do I do that? I have Z2Sound.baa and the waves, but I have no idea how/where to find the .bms files.
by Benjamin at 3:45 AM EDT on July 17, 2014
I believe they're stored in JaiSeq or something, IDK.
by Kurausukun at 4:32 AM EDT on July 17, 2014
I dumped JaiSeq and all I got were .szs files. Even if I rename them to .bms, they don't play. It just opens them and does nothing. Unless I'm missing something?
by Koto at 2:46 PM EDT on July 18, 2014
Pokémon Colosseum?

See ya
by soneek at 7:02 AM EDT on July 19, 2014
Pokémon Colosseum and Tales of Symphonia use some different sequence format, unfortunately.
by logan28469 at 3:26 AM EDT on July 20, 2014
This is really exciting! There are so many great games that use bms.
New game suggestion by Yoshinkeru at 9:17 AM EDT on July 20, 2014
Ooh! Ooh! How about WarioWare Inc.: Mega Party Game$? Does that use sequences? I've wanted those for a while!
by starerik at 2:13 PM EDT on July 20, 2014
Sorry, this is not BMS, but it contains sequenced stuff from Star Fox Adventures. If your friend ever figures this file system out, I'll be forever in his debt.

audio.zip

edited 8:02 PM EDT July 20, 2014
by dj4uk6cjm at 3:09 PM EDT on July 20, 2014
The midis for Star Fox Adventures have already been ripped by another person, regard to this thread here and the midis here. Theres even a thread about it here on the hcs64 forums by koolaidman himself with a soundfont available so we don't need this right now but if you guys could post and upload all the bms files we don't have you want ripped here to this thread (it's why it's called "BMS Collection Thread" XD) would save us a lot of time. Thanks~

edited 8:21 PM EDT July 20, 2014
by starerik at 7:36 AM EDT on July 24, 2014
Will this tool include DSP effects like reverb?
by dj4uk6cjm at 9:44 AM EDT on July 24, 2014
Yes, it should to my understanding. Does anyone know if Wario World uses sequences? Been wanting the music for that game for a long time, it's my second favorite game next to Luigi's Mansion. :P
by starerik at 8:41 PM EDT on July 24, 2014
Nope, Wario World uses streams which are available here.
by dj4uk6cjm at 1:27 AM EDT on July 25, 2014
What about F-Zero GX and Soul Calibur 2? Those are the last games I can think of :( hope they use bms...
by hcs at 1:49 AM EDT on July 25, 2014
Nope, both use ADX streams.
by starerik at 8:31 AM EDT on July 25, 2014
Why do you hope games have sequenced instead of streams? I know it's for research but still curious.
by Kurausukun at 11:06 AM EDT on July 25, 2014
I'm just checking to be extra sure--when the final(?) version of this tool comes out, the Mario Galaxy games will be compatible, correct?
by dj4uk6cjm at 11:14 AM EDT on July 25, 2014
For now he is just testing the other bms with the editor, he might make a separate program for the SMG games since the bms are different.
by starerik at 4:14 PM EDT on July 25, 2014
Wouldn't it be better if there's only one tool but with different sets?
by Kurausukun at 9:09 PM EDT on July 25, 2014
As long as I can play and convert the Galaxy sequences, I don't care how.
by TheUltimateKoopa at 12:45 PM EDT on July 27, 2014
As I may or may not have mentioned, I still have some MIDIs converted from BMS that furry bob gave me, from Super Mario Galaxy (and a few from the Wind Waker IIRC, or some Zelda game)...

But it's all well and good being able to play the MIDIs, but as Kurausukun said (or implied)... playing MIDIs converted from BMS is cool. But of course, I'm sure we all want to hear them as they should be heard, with the proper instrument samples, right?
by brncao1 at 5:35 PM EDT on August 1, 2014
I use midis mainly for remixing and what not (OCRemix anyone?). Some songs are difficult to transcribe (i.e. instruments that are too quiet in the background or instruments that blend in thus making instrument separation harder). Mono or near-mono songs are the worst offenders (i.e. GBA games and legend of zelda four swords adventure)
by dj4uk6cjm at 2:20 AM EDT on August 3, 2014
Same here brncao1 :) I love remixing songs with different instruments and stuff and just talked to bro Arookas progress is coming along really well with the editor. He's working on a AAF to XML converter so the file will be easier to read, I wonder if this can be implemented into vgmtoolbox when he's finished? Anyways this is just fantastic. :)

Lol I tried to remake some super mario 64 songs with the sunshine samples/soundfonts but they didn't sound too well :P Arookas suggested I try using them on the new super mario bros. ds music which is a great idea!!! :D :D so I'll see how that goes, hoping they're remakable. Also he says he has enough bms files for now you guys so we don't need anymore.
by robotortoise at 9:46 PM EDT on August 16, 2014
How's the progress coming? I'm really interested by this idea.

Maybe we could finally get a Luigi's Mansion rip with separate humming tracks! :)
by furrybob at 11:46 PM EDT on August 17, 2014
@robotortoise
I uploaded the separate tracks to that years ago here
by Espyo at 1:55 AM EDT on August 22, 2014
I too am quite interested in knowing the progress of this. Specially with Pikmin 2. I THINK Pikmin 2's BMS files are a different format, but I can check it out later today. I can upload a list of the .bms files if needed.
by dj4uk6cjm at 1:48 AM EDT on August 23, 2014
Well he just uploaded a new video yesterday with the success of converting midis to bms which is a separate thing from bms to midi which he has already finished by the way as well and now you can remake midis, any midis you want to the instruments from sunshine the program uses which is limited to a few to my understanding at the moment but that should be fixed in the future but seriously guys...if more instruments from other games were added into the program then all of this will make remaking video game music a revolutionary thing. It will be much easier to remake, listen to and enjoy if you think about it lol no more daws, unless you just wanted to tidy up the midis of course before converting them which you may. :3

edited 6:54 AM EDT August 23, 2014
by agu fungus at 11:31 AM EDT on September 1, 2014
Here's hoping that a xsf format is made out of this soon!
by Espyo at 11:46 AM EDT on September 5, 2014
I'm subscribed to the channel, so I'll keep myself updated. Can't wait for progress!

edited 4:51 PM EDT September 5, 2014
by robotortoise at 2:29 PM EDT on October 12, 2014
@furrybob

I know this is REALLY late, but I just got those FLACs! Thanks man!
by dj4uk6cjm at 10:26 AM EST on January 8, 2015
He's been kind of AWOL or MIA lately but check out bro arookas G+ and new website for further updates on the bms format as it looks like he's working on it again :) so keep your fingers crossed!
by Richter X at 1:03 AM EST on January 16, 2015
Is there more to the StarFox Adventures set? The rip posted seems to be just the set from Dinosaur Planet, and is missing a good majority of the ones used in the final game. I checked the thread, but the other ones are nothing but dead links.
by XaikuTheMaverickHunter at 11:54 AM EDT on April 16, 2016
@furrybob

I don't know if you're still active, but I need the MIDIs and sounds from "The Legend of Zelda: Four Swords Adventures" for a specific project I'm working on. Is there any way you can help?
by nobody1089 at 12:47 PM EDT on April 16, 2016
you could try ripping the midis using this tool:

https://github.com/Yoshimaster96/BMS_DEC/tree/master/src
(source code only)

original thread (older version): http://kuribo64.net/board/thread.php?id=2363

I'm working on a project to write a better decoder, though it's nowhere near ready:

https://hcs64.com/mboard/forum.php?showthread=44951
by dj4uk6cjm at 2:18 PM EDT on April 16, 2016
@Xaiku I can help you with that with a link to the midis ripped from FSA, this is all of them as far as I know.

I can't remember if the samples or sound effects could be ripped though, if they're anything like Wind Waker or Twilight Princess they may be in AW files.
by nobody1089 at 4:26 PM EDT on April 16, 2016
Is there any central format specification of BMS files?

Any place where I can ask questions?

----

Current questions:

* I assume 0xC1 calls run in parallel. Do they ever appear nested?

* 0xE0 (unset dynamic):
** Arookas's encoder lists a single-byte argument (index)
** YoshiMaster96's decoder lists an unknown 2-byte command.

* Is this a 1-byte or 2-byte argument comand?
* Any games where this command is used?

I will add more questions in the future.

edited 4:26 PM EDT April 16, 2016
by XaikuTheMaverickHunter at 4:42 PM EDT on April 16, 2016
@dj4uk6cjm

Unfortunately, the link you provided leads to MIDIs that (for the most part) are either empty (as in they don't have any notation), or outright broken (as in they won't play at all in programs such as Winamp and Windows Media Player, instead giving the "can't play this audio file because such and such" message). Specifically, I need the MIDIs for the tracks that carried over from "A Link to the Past," such as the music for the Realm if the Heavens.

As for that tool that nobody1089 pointed me to (the one created by Yoshimaster96), I either don't know crud about how to compile it, or the process of compiling is pretty much impossible with my OS (I have the now-extremely outdated Windows XP). I do have a compiler, but I just don't know how to use it.

Any way that you might be able to help there?
by nobody1089 at 5:58 PM EDT on April 16, 2016
To compile, open cmd, go to the folder, and run:
g++ bms_dec.c

To convert MIDIs, copy a.exe to the folder of BMS files.
Then open cmd, go to the folder, and run:
for %a in (*.bms) do a %a %a.mid
by dj4uk6cjm at 7:01 PM EDT on April 16, 2016
Hmm that's odd, they play fine for me. Did you try opening them in anvil studio or something like fl studio? You may need to update windows media player because it should be able to play midi files unless theres something wrong with the encoder and I wouldn't use winamp for opening midi files since its known to have issues, try foobar2000.

Some midis like arasuji (intro theme) and the boss theme play fine, do note the other midis with low byte rate were not and still cannot be converted properly with any bms program as of yet. A lot of people have tried, hope I helped somewhat.
by XaikuTheMaverickHunter at 9:39 PM EDT on April 19, 2016
As far as simply opening them in a player is concerned, I may try the foobar2000 player, but the fact is my project requires the use of FL Studio, as I plan to make arrangements, even though I know about the fanmade MIDIs that exist, if that makes any sense.
by kode54 at 12:57 AM EDT on April 22, 2016
Please try processing the files through my MIDI processing library first. If necessary, you may wish to try either the -1 or the -lpx switches. The -1 switch will turn a type 0 file into a type 1 file, and the -lpx switch will do that, as well as splitting tracks based on their use of program change commands. Useful if you need to route different instruments through different plugins.

https://gitlab.kode54.net/kode54/tomid
by nobody1089 at 3:15 AM EDT on April 22, 2016
@kode54

Does your "tomid" program support bank switching? My current program doesn't. <dead github link removed>

I'm considering a MIDI-like format without a 16-channel limit. Can you help?
by XaikuTheMaverickHunter at 8:43 PM EDT on April 22, 2016
@nobody1089

How do I use your tool? There's just a bunch of .PY files that I don't know how to manipulate...

Yeah... I'm dumb.
by kode54 at 1:15 AM EDT on April 23, 2016
My tool is C++, and it needs to be compiled, and run from a terminal. Last time I checked, a Makefile was also included.

E: Close enough: Build scripts.

edited 1:16 AM EDT April 23, 2016
by nobody1089 at 1:36 AM EDT on April 23, 2016
My tool? msh? It's not really intended for anyone other than me. It's a "shell" interpreter that runs special scripts, to convert vgmtrans MIDIs into General MIDI files.

It requires Python 3 on your system. Then you drag your MIDI onto msh.py to open a shell, or call "msh.py script.msh song.midi". "mshload.py script.msh"

If you really want to use it, run "msh file.mid", enter "split_all", and "channel_all" (to reassign channels), then "write" (then check file.out.mid).

Note that my program removes all intermediate program-change events when splitting tracks, so the resulting tracks will not play properly in a single channel. I could change that, if I wanted to. However...

[spoiler]
At the present time, it takes days to write a script for a single song. I'm spending much of the time working around MIDI limitations, rather than making stuff sound good. That's because I first split each track's instruments into multiple channels, causing me to run out of MIDI channels.

As a result, I'm semi-retiring the program.
[/spoiler]

edited 1:40 AM EDT April 23, 2016

edited 1:40 AM EDT April 23, 2016

edited 1:41 AM EDT April 23, 2016
by XaikuTheMaverickHunter at 12:01 PM EDT on April 23, 2016
@kode54

I tried to compile it using g++ and cmd, typing in "g++ 2mid.cpp" and it gave me this message;

"'g++' is not recognized as an internal or external command, operable program, or batch file."

What can I do?
by nobody1089 at 2:57 PM EDT on April 23, 2016
You need a C++ compiler. You should probably use mingw2 or msys2. mingw2 *may* be easier to use for less computer-savvy people.
by XaikuTheMaverickHunter at 10:38 PM EDT on September 22, 2016
Man, did this thread become quiet or what? Anyway, after a while, I decided to approach my "A Link to the Past/Triforce of the Gods/Four Swords Adventures/Four Swords Plus(+) reworked soundtrack" thing; reverse engineer the non-functioning MIDIs via the game's instruments. If anyone has an idea on how to convert the instrument files into SF2s, or if it's already been done by someone else, please let me know.
GC+Wii BMS Progress Rant by dj4uk6cjm at 12:00 PM EDT on September 23, 2016
This thread has been dead for some time it seems, I just finally want a bms+wav soundfont player and be able to convert those to their respectable formats like mp3 or even back to midi.

Sadly we'll never see something like this for GC or Wii isos that are sequenced in the near future because no one simply cares which makes me very angry sometimes...video game music should be important to people, at least around here I'd think anyway and nobody has time to compile a damn program nobody knows nothing about or even has experience with this sort of thing.

And this is for all video game music programmers out there: if you yourself a programmer/coder actually creates something that can benefit the people in the GC and Wii music hacking scene then for the love of god share it with people in the public, don't just say your working on it and after a few years we don't see shit and if you have the means compile your program your damn self to an actual executable and share it with us :( don't make us do all the unnecessary dirty work we shouldn't have to be doing, your doing this for us not you lol there done with my rant.

My apologies if I offended anyone but this is how I feel right now and I'm just tired of it...why I'm considering giving up on video game music and video game music hacking in general.
by starerik at 4:43 PM EDT on September 28, 2016
"giving up on video game music"

What does that even mean?
by AnonRunzes at 4:45 PM EDT on September 28, 2016
@starerik - What he said was very clear. If you claim to be working on something, then prove that you`re actually working on it.

edited 4:45 PM EDT September 28, 2016
by dj4uk6cjm at 2:14 AM EDT on September 29, 2016
Just that people in general not caring about video game music is making me not want to care anymore and I hate that feeling, I hate how we treat modern music in todays society like it's a godsend when most of it is not.

Video game music should be respected for what it is to some, a calm, peaceful, sometimes blissfully intense badass music.

I think the problem is people in this generation aren't brought up into gaming like we are lol anyways I'm getting off topic here but yeah what I said still stands for anyone actually working on a BMS soundfont program.
by nobody1089 at 4:21 AM EDT on September 29, 2016
I'm working on a Python BMS decoder, but it's been stalled due to lack of time, and lack of interest, caused by some trouble organizing my code.

I'm trying to develop a format that maintains the structure of BMS files. This makes the code more complicated. Also I want to reencode files into BMS. Figuring how to bundle struct format, decoder, special jump/call handling, and encoder into classes/objects has been a roadblock.

And in the end, it's not a MIDI file. MIDI files suck. any MIDI decoder will produce bad results, because MIDI can't express smooth volume/pan/pitch bends and is limited to 15 channels + drums. But will anyone even use a non-MIDI decoder?
by starerik at 1:05 PM EDT on September 29, 2016
@dj4uk6cjm Game music is still being written all the time, why are you even mentioning popular music and talking like this tool is the only hope for the future of game music?

I'm really curious to why you're so obsessed with soundfonts, what do you plan to do with them?
by dj4uk6cjm at 1:08 PM EDT on September 29, 2016
Nice, not really a fan of python programs because many of them are brr...command line but good luck to ya! And maybe, maybe not. I'd expect a majority of people want a BMS decoder to support converting to midi, at least I do as there's not any other format you could use to really edit them and if you don't have midi than what is the use/point of wav and soundfonts anyway? Yep no midi kinda defeats the process of even working on something like that but mp3 might be a possibility if you're just out for the streams but many want and don't want those either, specially since we have a lot on josh's website already.

For a true BMS program to work I think it should be able to: read the designated bms files in all GC and Wii games, convert the bms sequences to midi and also generate a soundfont from the AW (wav) files found in the games and even convert midi back to bms which should be a last option for some. The first steps are more important to everyone right now.
by dj4uk6cjm at 1:18 PM EDT on September 29, 2016
You may have misunderstood my earlier post starerik but I guess I should've been more clearer, I meant a tool like this would be for the future of video game music hacking. Not video game music in general lol I just put that in the rant at the time because I was still upset about society not caring about video game music which is true and no one can deny it.

As for soundfonts, it's for research and other things. I am a collector of them afterall.
by derselbst at 1:54 PM EDT on October 25, 2016
Some time ago, I worked on Yoshimaster96's BMS_DEC. Primarily to make it better work with Luigis Mansion. See my fork, if anybody interested:

https://github.com/derselbst/BMS_DEC
by AnonRunzes at 4:39 PM EDT on October 25, 2016
@derselbst - Umm, that's cool I guess. But what about the .aw soundbank/soundfont?
Also, how can I compile that?

edited 4:41 PM EDT October 25, 2016
by dj4uk6cjm at 7:00 PM EDT on October 25, 2016
Ditto to what Anon said, I would like soundfonts from the AW files as well...can you make that happen and possibly compile it for us derselbst? That would be a really big help to everyone, otherwise nice job and thanks for sharing!
by Nisto at 7:11 PM EDT on October 25, 2016
win32 x86 executables compiled with GCC6
BMS_DE~1.EXE
BMS_DEC.EXE

Enjoy.
by AnonRunzes at 11:27 AM EDT on October 26, 2016
I never knew it requires a few plugins to work.
by derselbst at 12:06 PM EDT on October 26, 2016
Thanks Nisto.

I havent done any research on the .aw files, though I'm interested in getting this done. But I dont think I can do this on my own, i.e. starting completely from scratch (lack of time).

Is there any documentation on the AW file format available? Or example parsers? For a start this would really aid writing a small program that converts AW to a standard SF2.
by dj4uk6cjm at 2:25 PM EDT on October 26, 2016
Not that I know of but there was one person here who isn't around anymore that created the very first original Twilight Princess soundfont, his name was Yuuto and if I remember correctly he also made a program that read the BMS and AW files all in one folder and played them back to how they should sound, OST wise anyway but what it lacked was reverb and did not support saving samples to soundfonts so it was essentially just a player.

Here is his post about it https://hcs64.com/mboard/forum.php?showthread=26574 I think he put the source code in that thread with a link too, maybe it would be a good start in finally getting this whole BMS project complete? I don't know but you could try, anything would help right now and thanks for actually being able and willing to take on this task...not many people do anymore.

Edit: I think there was another user here that might of had documentation of the AW format but he isn't around anymore either :( his name was UnknownFile so he could still have some archived posts here on the forum of his discussion about it, I'm not entirely sure.

edited 2:39 PM EDT October 26, 2016
by derselbst at 12:55 PM EDT on October 27, 2016
Ok, thanks. I'll look into it. But dont expect any results this year ;)
by nobody1089 at 3:17 AM EDT on October 28, 2016
@derselbst I'll look into your BMS decoder. Looks very interesting! I see you made the MIDI writing code a lot less bit-bashy.

Do you expand "calls" (push current address to stack, then jump to address)? Parse jumps?

> Looks like you still don't. This would break Wind Waker Dragon Roost pretty badly, and I assume many other songs.

Also you made it a C++ program, but you're still using .C file extension. I sent a pull request.

----

@dj4uk6cjm I'm personally not really working on AW decoding right now.

I saw the JAudio Player source code. Earlier, I thought its (Twilight Princess) BMS decoder didn't match Wind Waker BMS. Looking now, it seems to match reasonably well.

Source code: https://jplay.codeplex.com/

Yuuto's profile: https://hcs64.com/mboard/forum.php?userinfo=1073
Interesting post: https://hcs64.com/mboard/forum.php?showthread=37639&showpage=0#post_37647 "the 'header' is just a kind of meta track"...

----

I may have some time to work on my BMS project, but I need to figure out how to get my code into Cloud9 web IDE. Dropbox is unreliable (because the dropbox authentication is invalidated whenever I don't login to Cloud9 for a week). I could set up a network drive at home or VPS... Or use Github synchronization only.

edited 3:22 AM EDT October 28, 2016
by derselbst at 5:22 AM EDT on October 29, 2016
> Do you expand "calls" (push current address to stack, then jump to address)? Parse jumps?

Not yet. I was more interested in revealing more unknown BMS events. But I guess BMS_DE~1.C attempts handling those "branches" you mentioned. Looking forward if you could do some work on this.


> Also you made it a C++ program, but you're still using .C file extension.

It's an leftover from Yoshimaster96. And it's absolutely correct to use a capital C for cpp sources:
http://labor-liber.org/en/gnu-linux/development/extensions

However, its confusing, I agree.
by Yuuto at 8:14 AM EST on February 7, 2017
I realized the code arookas decompiled is not available anymore, so I decided to continue working on it (I'm just too curious to stop). Using Dolphin as a debugger and manipulating RAM while running the game I accomplished matching some command bytes with their function names, which clears up the meaning and usage of some of them.

bms_commandNames.txt
by dj4uk6cjm at 8:50 AM EST on February 7, 2017
Nice! It's great to see someone is still working on this, as for arookas...I'm not sure what has happened to him. He hasn't been active on his youtube, soundcloud channel or website lately. I kinda wish he was still around to help us out, I hope you guys can finish what he started!
by Jasper at 11:14 AM EST on February 7, 2017
Yeah, this matches my own experience decompiling BMS: https://github.com/magcius/vgmtrans/blob/siiva/src/main/formats/JaiSeqScanner.cpp#L22

I originally wrote this for Super Mario Galaxy 2 for https://www.youtube.com/watch?v=jExS8RZabNE , which has a slightly different format which I called "MML2".

which was combined from BMS_DEC, JAudioPlayer, arookas's MIDItoBMS, Sage-of-Mirror's BMSTool, and my own analysis as well :)

I also have some really awful ugly code for parsing banks and completely fake ADSR which I hacked in there. If anybody wants to help me finish the vgmtrans stuff I've done, I'd more than appreciate it. I also have BRSEQ support in there as well.
by Jasper at 11:52 AM EST on February 7, 2017
Also, yeah, arookas is a mysterious guy.

This otherwise innocuous file https://github.com/arookas/blojob/blob/master/api-specs.md says the word "JSystem library", and the only reference to that name publicly that I can find is on some otherwise unknown guy's blog bio: http://www.gamasutra.com/blogs/MotoiOkamoto/989663/

"the code that arookas decompiled is no longer available" -- did he stumble upon a debug copy of JSystem or something?
by dj4uk6cjm at 1:31 PM EST on February 7, 2017
That's neat, I didn't know the slider theme in Super Mario Galaxy 2 was sequenced! What is the progress on the wav to soundfont converter if you don't mind me asking? It would be awesome to have SMG and other Wii and Gamecube soundfonts similar to this https://www.youtube.com/watch?v=SGp73tR20_Y for example :) I think it's safe to say that thanks to arookas we have a pretty good amount list of games that use bms now.
by Yuuto at 1:49 PM EST on February 7, 2017
Okay, these formats really seem to be incompatible, but nice to see you got the same results regarding the branch opcodes.

I don't think he got a debug build, he rather rewrote the disassembly of some functions by manually (can't remember the exact code). He also didn't name them according to the .map file.

I think I'm giong to rewrite my player, guess this will be the best way to check for the right behaviour. Writing a converter that can handle all kinds BMS files correctly is impossible anyway, since the converter would not even be able to tell whether a sequence terminates. Due to the various jumps and calls we get to the halting problem at some point.
by Jasper at 2:16 PM EST on February 7, 2017
I don't think the formats are that incompatible -- it's just some new-ish stuff and there isn't any opcode overlap as far as I can tell. The interpretation of the perf values in MML2 are a tad different, and I don't properly support both yet. See me changing the generic code here: https://github.com/magcius/vgmtrans/commit/f87bbacae8f37144280e934b05ce760a7d16c539#diff-29f90ee6b72d7024e9c527c3623c62f5R119

I have to do some more investigation to figure out the range of that.

Re: conversion, the approach that vgmtrans takes is to assume that any branch that has been taken before is considered a "Loop Forever", and it copies patterns like that until all tracks explicitly end or are in "Loop Forever" state. It's not perfect, but it gets you far enough to stick an epic flintstones in there.

I do have a Slider soundfont, but it's not perfect. As mentioned, I never quite figured out the values in the ADSR data. Twilight Princess uses multiple .aw files per WSYS, and I never quite figured out how the C-DF table actually works. Trying to copy what JAudioPlayer did got me in some really weird spots.

https://github.com/magcius/vgmtrans/blob/siiva/src/main/formats/JaiSeqScanner.cpp#L699-L701 is just the result of a ton of trial-and-error to get it to sound accurate, but someone smarter could probably figure out the actual meanings there.
by Yuuto at 5:53 PM EST on February 7, 2017
Some commands do overlap, like MML_TEMPO and cmdNop or MML_TIME_BASE and the cmdPrintf of the newer version. It's not a major difference, but different enough to be completely misinterpreted by a program.

That would be an option for simple single-loop seqs, but that's it. It would fail at more complex ones, you would have to adjust the converter for certain seqs to get the result you desire, as there just can't be a program that can handle everything properly. It is only possible to some extent, but it is possible. One could provide switches to disable certain types of branches or limiting the number of iterations or whatever.

Dou you mean JAudioPlayer got it right (apart from decoding the files)? Then I can take a look at it one more time, it's been a while since I wrote it.
by Jasper at 7:18 PM EST on February 7, 2017
I didn't actually run JAudioPlayer. I stared at the code for it, probably didn't quite understand it, tried to translate it into my vgmtrans code, and failed.

Can you roughly describe to me what the C-DF section does? Also, just in case you don't want to keep refreshing a forum thread, do you have IRC/Discord/Skype if you want to investigate a bit faster?
by Yuuto at 7:38 AM EST on February 8, 2017
I'll take a look at it, as I remember the structure wasn't too complex.

I get the feeling most BMS commands are parsed before thy are actually executed, my breakpoints get always triggered before the expected event occurs, except for the conditional opcodes like C4 and C6. They are executed right on time and I guess this is due to their result isn't predictable. However, I could be completely wrong with that.

Currently I don't have any of these, but perhaps I will take a glance at IRC soon.
Ports, Registers and data manipulation by Yuuto at 8:54 PM EST on February 8, 2017
Found out a lot on this topic today, now I know how most parts of the dynamic seqs work.

specs

There is still plenty of things I didn't document, but I think that's a good start.
I also know how conditional commands work, but that I'm going to upload another time.
by Yuuto at 6:56 AM EST on February 11, 2017
@Jasper

"C-DF" is followed by the number of samples (uint32) in this section and an offset (uint32) for each sample. The offsets point to a rather long and empty structure, but you'll need only the first two uint16. The first is the aw file the sample is stored, the second is the sample ID that is used in the instrument banks. You can then match the sample index in the C-DF section with the entry index for the sample information for the corresponding aw file in the WINF section.

For example: If the first entry in C-DF says aw file 2 and sample ID 0x2dc, you look into WINF section for aw table 2 and the first entry.
by Jasper at 1:56 PM EST on February 11, 2017
The issue I was seeing was that sample IDs wouldn't match up at all. Looking at SMR.szs from Super Mario Galaxy, it would have AW number 0, and a sample ID like "2C 20" which was much higher than any sample ID used by any of the regions in the Inst sections.

I also don't see the uint32_t offset -- perhaps I'm misinterpreting the sample number as that?
by sizaansivaas at 12:01 AM EST on February 19, 2017
Hi there, I didn't want to resurrect some old threads from 2012 so I'm asking here if it's okay. Trying to find what .wav files go to which sound effect name (specifically the rain sound if possible). I already know the format for bms files and it seems that sound effects have banks too. From here it also says that bsc files have some type of sequence that plays the sounds, but I have no idea how this format is laid out.
by Jasper at 1:01 AM EST on February 19, 2017
OK, so, I'm now dealing with ADSR data in the BAA banks: the ENVT section.

The ADSR data I did for the Slider rip was basically 100% fake. I thought I was basing it on certain values but when I went back to study it again, I found it made even less sense than usual.

So the ENVT section seems to be made up of 0x0C-sized entries of this shape:

00 03 01 14 00 00 00 0F 00 00 00 00
00 03 01 16 00 00 00 0F 00 00 00 00
00 03 01 16 5E 34 00 0F 00 00 00 00
00 03 01 18 00 00 00 0F 00 00 00 00

as an example. From what I can tell, the first two bytes are either 00 02 or 00 03. I haven't seen any counterexamples yet. The next four bytes seem to be random stuff. Then comes 00 0F, and then 0's.

The entries always seem to be in sorted order if you treat the whole entry as a number. This makes me think it's not just ADSR data directly as previously assumed. I'll probably play around with this in Dolphin to see if I can get the game to produce different results.
by Jasper at 2:51 AM EST on March 7, 2017
Yuuto, I have another question for you re: C-DF. In Twilight Princess's Z2Sound.baa, there are often multiple entries for the same sample number.

e.g. there are two AAF banks for sample ID 0x0CA4, one at the C-DF entry at 0x0D6D0C saying AAF 0x02, and then one at the C-DF entry at 0x0D9D75 saying AAF 0x03. These are both different samples. I can't figure out how to determine the "correct" sample, since it's only used once inside the instrument at 0x001F751C.

Do the instruments also have the AAF number somewhere as well?
by Yuuto at 6:20 AM EDT on March 12, 2017
To be honest, I've no idea. My player would not be able to handle that case. Are those from wsys 0 or 1?
by Jasper at 12:15 PM EDT on March 12, 2017
I'm trying to get Malo Mart and this came up. Samples just sounding wrong. This is from wsys 1 (the music one rather than the sfx one) I believe.
by thecoreyburton at 4:55 AM EST on November 12, 2017
I'm not sure what the current state of BMS playback is (so forgive me if this is already known / not useful), but arookas has a tool that might be of use: https://github.com/arookas/flaaffy
by fuzziqersoftware at 2:17 AM EST on November 24, 2017
I played around with the Super Mario Sunshine data recently, and wrote some programs to dump the instruments/samples/sequences and render the sequences: https://github.com/fuzziqersoftware/gctools

The renderer is far from perfect; it ignores some opcodes that are probably important, I didn't figure out the ADSR parameters or get pitch bending quite right, and it probably can't play in real time unless you use --linear. But it does generate audio that sounds a lot like the actual game. I probably won't work on it much at this point, but posting it here in case others might find it useful.
by nobody1089 at 11:38 PM EST on January 26, 2018
fully? functional BMS decoder with looping support W00T

https://github.com/magcius/vgmtrans
magcius-vgmtrans/VGMTrans_WTL.exe
magcius-vgmtrans/i_ryu.mid

edited 11:38 PM EST January 26, 2018
by Kurausukun at 6:12 AM EST on January 27, 2018
How does this work/what files should I be attempting to extract from? Just to test I tried using Wind Waker, but I couldn't figure out what files to use.

Next Page
Go to Page 0 1

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source