Previous Page | Next Page

by TurbomanAlco at 5:27 PM EDT on August 9, 2012
I don't see much of a better way to do it. Dosn't dolphin have a bunch of dsp problems itself? Besides reverb isn't hard to replicate in other programs like audacity and fl studio. The looping isn't anything to hard to do because all of the songs I converted to midi files are already looped and the looping points are the begining and end meaning the whole song is looped. I wouldn't be worried about any of thoose things. Also they use a special technique in the sequences that give a reverb like effect probably meaning that there realy wasn't ever supposed to be a real reverb. By that I mean they double some of the tracks, move the notes over a bit, tone down the volume, and wala. You have a fake reverb like effect. Try it or look at some of the converted .bms files.
by Yuuto at 5:30 PM EDT on August 9, 2012
The sequences have a reverb command in some tracks. I took some MIDIs and rendered every single track. The tracks with a reverb command I edited manually in Audacity, and it sounded like in the game.
by TurbomanAlco at 6:12 PM EDT on August 9, 2012
Well that solves that. You use any means to get an effect like that. Where is the reverb command located anyway? Is that all just in the .bms?
by Yuuto at 6:17 PM EDT on August 9, 2012
The reverb command is located in the BMS track header.
http://www.hcs64.com/mboard/forum.php?showthread=5046&showpage=17
by Yuuto at 6:29 PM EDT on August 9, 2012
Okay, now the process of retrieving the instrument data. I think this could be a bit difficult to read and confusing, so maybe I'll upload a format specification later.

As I have already said you will need Z2Sound.baa.1.wsys and Z2Sound.baa.1_5.bnk. The .wsys file contains sample information, the .bnk instrument data, so at first open the instrument bank.
The file is structured by chunks, each chunk contains a different kind of information and starts with a 4-byte (DWORD) identifier in ASCII format (FourCC), so it's easy to find. At the very end of the file you will find the "LIST" chunk. The DWORD after that is the chunk size, then follows the number of instruments. Note that all values are DWORDs and in big endian format.

The number of instruments is followed by an offset for each one (it starts with the offset for instrument 0). At this offset you will usually find the FourCC "Inst". Jump 4 DWORDs forth. This is the number of samples the instrument uses and is followed by a 24 byte sequence for each sample. The first byte is the upper key range limit, i.e. when this is 46 (2e) in the first sample the key range is 0-46.
Jump 12 bytes forth. This DWORD is the ID of the sample. All values I didn't mention are currently unknown.

If the FourCC is "Perc" it is one of the two percussion 'instruments'. The structure is similar to the LIST chunk. The FourCC is followed by the number of percussion samples followed by an offset for each sample. The index of the offset indicates the key the sample uses (empty offsets indicate that the key is empty). This will lead to the "Pmap" FourCC. The byte 12 bytes from the beginning of the FourCC is the pan value (00 = fully left, 7f = fully right). The DWORD 28 bytes from the beginning is the sample ID.

The instrument bank does also contain envelope data but i haven't figured it out yet, so the values for attack, hold, decay and release must be done manually.

That was everything about the instrument bank so far, now to the sample banks. When opened the .wsys file you should set the bytes per line to 56, this makes reading the values easier.

At first search for the "WINF" chunk. Then search the sample you want by its ID (search for a 4 digit value, i.e. 1f0 -> 01f0). I know this method is not very precisely. When found, the byte in front of the ID is the number of the AW file. Then count the lines down to where the AW number is (start at 0, count how often "" stands in front of it).

Then change the bytes per line value to 44 and search for Z2BgmWave_X.aw where X is the AW number. Look at the table above that string and go in fron of the first "" in the top line. Then go down the number of lines you counted before.
Go two bytes forth. This is the root key. After that byte go 14 bytes forth. If this DWORD is 0xffffffff the sample loops and the loop start and loop end DWORDs follow. If 0, it does not loop. then convert the number you've counted into hex format and this this the name of the wave file.

I know this is very complicated and inaccurate, but this worked fine for me. Maybe I'm going to write a tool that extracts that values automatically.

EDIT: I found the instrument data that my tool ouputted.
Instruments
Percussion

edited 6:34 PM EDT August 9, 2012
by TurbomanAlco at 8:20 PM EDT on August 9, 2012
Hmmm, I don't understand the .bnk part to well but I was able to get some results on how to get the instrument. I'm looking for instrument 162 so after I was at the WINF chunk I did a search going down for 00A2 or 162 in hexadecimal. Then I looked at the binary in front of that and it was 2D or 45 in decimal. So then a did a full search for Z2BgmWave_45.aw and I did the counting the lines thing and I got Z2BgmWave_45.aw_00000002 which dosn't sound the least bit right in the twilight.bms.midi on the first track. Am I doing this right? And I can't apply the instrument data you retrieved from your tool to anything. How does that all work?
by Yuuto at 8:49 PM EDT on August 9, 2012
You need tolookup the ID of the sample instrument 162 uses. That would be the .bnk part, which you now can leave out because I uploaded ibnk.html.
There is every instrument with its sample IDs listed. Instrument 162 has only one sample, that with the ID 194.
Try it again with this ID.

Note that 194 is already hexadecimal.

edited 8:58 PM EDT August 9, 2012
by TurbomanAlco at 9:27 PM EDT on August 9, 2012
Ahh, this time it worked but my counting down was off by one number because I started with zero as a pose to one. Now to apply this to a soundfont if i can figure that out because it dosn't sound like it's at the right pitch in FL Studio indicating that it dosn't have the proper root key that I need.
by Yuuto at 9:29 PM EDT on August 9, 2012
Sample 194 has the standard root key 60 as far as I know.
by TurbomanAlco at 9:53 PM EDT on August 9, 2012
Thanks for mentioning that. Otherwise I probably would have went with 66 which is for Z2BgmWave_14.aw_00000000C and I need D but I messed it up when I counted one off. I'll probably need that number anyway cause that whole aw file seems to have most of what I need for the Twilight theme. I'm starting to like this soundfont tool. I tried it out and it's perfrect so far. Now for the next few instruments. Come to think of it, you could probably do this all from FL Studio using the Direct Wave plugin which works practically the same way if anyone wants to try that.

I've run into a small problem. I see in your soundfonts that there is proper looping. Was that done manualy or by values given by either the .bnk files or the .wsys files?

edited 2:17 AM EDT August 10, 2012

Previous Page | Next Page
Go to Page 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

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