JAudio Player by Yuuto at 9:47 AM EDT on October 14, 2012
As I wrote in another thread I'm currently writing a player for the BMS sequences used in Twilight Princess (I don't know if it works with the sequences of other games, too). My analysis of the sample & instrument banks is nearly finished so the program can play any sample a sequence needs, but I haven't figured out the envelope data yet, so the playback sound very unnatural when the release time is 0. Does anyone know how to inerpret these values?
Beside this there are some oher problems. I need a microsecond timer for use in C# that doesn't have too much CPU usage (the one I use takes 25% on each core!) and whose interval can be changed after the timer has started. And the program crashes sometimes, but I'm sure this can be fixed easily.
It would be great if someone has knowledge in these things.
All sequences have a resolution of 120 ticks per beat. A sequence with a tempo of 120 bpm would require an interval length of 4.1667 ms. I tried a timer with a resolution of 1 ms, but it only accepted integral values so it was very imprecise.
The problem with the crashes is fixed, I now use SharpDX instead of SlimDX.
edited 11:51 PM EDT October 14, 2012
Alpha Version by Yuuto at 9:04 PM EDT on October 31, 2012
The timer problem was actually easier to fix than I thought ^^
This is an unfinished version of the player. To use it you have to specify the path that contains Z2Sound.baa and the subdirectory Waves. The player can't decode the .aw files yet, so the Waves directory must contain the extracted/decoded .wav files (use wsyster for that).
Issues and things I haven't implemented yet: - Envelopment (somehow the biggest problem) Since I can't read the envelope data from the instrument banks and I did'nt implement default values yet, the samples stop (or start, depending on the samples) abruptly, which results in an unnatural sound and unlovely crackling. - Looping. The files only play once. - Vibrato - Dynamic tracks. e_goma01 and e_variant don't play at all because there occurs an error while parsing the header (dynamic sequences have a very complicated one). The other dynamic seqs seem to play correctly apart from the pause between the different parts (the player can't jump to a specific one). Due to this long pauses some parts run at the wrong tempo like in field_link_day. - Memory. The player gains increasingly memory but doesn't release it. - Individual problems. Some problems only appear in a single file, e.g. the remix samples in e_zant play two octaves higher than they should (I fixed that manually, as a temporary solution). - Pan. Compared with the recorded songs the percussion has sometimes a wrong position (e.g. event01).
I'm running Windows 7 x64 and after I choose the folder containing Z2Sound.baa and the waves, a message pops up stating "Cannot write to the registry key". If I try to do anything after this it crashes.
Are you using the registry to save directory settings? The only reason that I think I could be getting this error is if you compiled it for a different version of windows.
Also, are you planning on releasing your source code?
Yes I use the registry for saving the directory. I didn't expect any problem with that. Maybe it's better to write a file to the AppData folder.
I compiled it for .NET Framework 4.0 on Windows 7 for x86 and x64. I now moved to Windows 8 and saw that it doesn't work, so I have to build two versions, one for Windows 7 and its predecessors and another one for Windows 8.
I discovered some other issues. The velocity and volume values were interpreted incorrectly which caused some notes to be too loud. It now works for most of the sequences though there are still some I'm not entirely satisfied with. Furthermore tracks that use reverb/echo are too silent.
The biggest problems are still the encoding of the .aw files and the envelope data. Maybe someone could help with that. And these are only the most important ones, the other ones I mentioned in my last post still exist, too. The only things I fixed are the velocity/volume values and the memory bug.
To be honest I didn't think about releasing the source code yet. But when I look at all the issue the player currently has this idea is not that bad. Maybe I should upload it on an open source platform as a public project?
Make sure you are using the right version (Windows 7 and previous or Windows 8) and you have the DirectX runtime (June 2010) installed. When I upload the new version there won't be anymore two separate programs for Win7/8.