View Single Post
  #20  
02-10-2014, 09:03 AM
Paul's Avatar
Paul
Outlaw Sniper
 
: Jun 2007
: MilkyWay
: 1,535
Rep Power: 19
Paul  (718)Paul  (718)Paul  (718)Paul  (718)Paul  (718)Paul  (718)Paul  (718)

:
Yeah I make music in my spare time, and I know a fare bit about audio/midi formats, and how exactly the programs "make" music. So that's why I'm finding this not too hard.

What I know is that the game is simulating the PS1's midi playback system. How that works, is that there are patches (or instruments) with each note being assigned a sample.

For some patches, every single note is the same sample. But with some patches, there are different sounds. So say on one of the patches, the note C3 is Abe saying hello, but then note D3, is Abe saying follow me. E3 being wait... It goes on. Then in another patch is the slig voices, then another one is explosions... another one is a drum kit... So it really is a simple midi engine.


Also usually in midi, when it wants to play a note, then end a note it would do this:

"At 1000 milliseconds Play note C3, with Velocity FF"
"At 1500 milliseconds Stop note C3"

But in the game, it does this:

"At 1000 milliseconds Play note C3, with Velocity FF"
"At 1500 milliseconds Play note C3, with Velocity 00"

So to stop a note, it's just setting its velocity to 0!? This seems crazy to me, but I haven't finished my research on this part.

Once I've had my play with Seq files, I think I'll have to reverse the vb and vh files. That shouldn't be too bad considering there is so much documentation on the PS1 version of those files already.
velocity of 0 is the same as key off in midi - it used because the running status byte helps to as a sort of "compression". In my test DLL I have a simple UI that lets you play each tone in a program at a given "thing" - note maybe? Note sure..

I can also log out what the game is playing at any given time with the params to plug back into the basic UI, just some text boxes and a "play" button.
__________________
[ http://www.paulsapps.com ]

Crawling sligs will shout "Mommy!" while running around and then the slig mommy will appear and help them put their pants on.

Reply With Quote