Abe's Exoddus Sound Loader
Hi everyone!
Here's a project I had been working on for a bit now. It's simple, you can replace the sounds in the game with wave files you make. Right now it's only limitation is the files are barely named (This can change) and you can't change the sample rate of the original sound. (This can also possibly change). I'll post updates for the dll when I can, but for now, it's something for you guys to play with. Also note that this is my first time using C++ for such a job like this, and if there are any problems, such as game crashing or such, let me know, or just post your log file (dsound.txt) Enjoy, and happy modding! |
testing...
it looks good... |
Hell yeah. Let's get the Munch's Oddysee voices on the go!
|
:
|
The one thing that always pissed me off in AE was Vice President Asslicks voice in-game compared to the FMV's.
We'd need a good sound-a-like to voice Asslick and then we're good to go! Anyone? |
Cool - my hook dll also has this feature. I used it to help reverse the SEQ format :)
|
You wouldn't happen to know where some of the functions to say, play a note in the current music track would be or something like that? Or at least any documentation on the game helps.
Because right now I'm looking into replacing the games built in music player with say, a midi parser, which would then play custom music. |
That's quite funny.. cause the inbuilt game one IS a midi player. In fact a SEQ file is just a midi file with a different header.
Just search for SEQ data in ram when the game is loaded and set a hardware breakpoint when it gets read, shouldn't take too long to find it. Also hard coding function address will break on other language/path/etc versions of the game. |
Does that mean you could potentially export .midis of the game soundtrack?
|
:
|
The soundfont would be loaded into memory though, right? Is it possible that you could rip it, or even pipe the music directly into a non-midi filetype?
I might have a bit of a play with this myself. |
Well there isn't exactly a pure soundfont just laying in the memory. Correct me if I'm wrong but all the instruments and their assigned samples (Or id's to the samples in Abe's Exoddus's case) are stored in the vb and vh files...
I'm going to have a play with the Seq files and see what I can do too :) EDIT: After some playing with, I've managed to replace a track with my own. It's an extreme pain in the ass and a lot of stuff was done manually... It is also an extremely simple track. (Just 4 notes) But hey, it works! Now to find out how to make it easy to do haha. But still, progress!!! :D |
Are you guys musically technical? I'm not so reversing the music format is painful for me. For example I think there is a function which sets the "note" of a sample/wav in the soundfont (vb/.dat). But I have no idea how you apply a "note" to a given base waveform - hence I don't really know what I'm looking for.
|
I'm musically literate. That's basically the same thing, right? :p
This is something I want to learn about anyway, so I'm prepared to do a bit of research into how it works. |
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. |
I'm not actually so bothered about the soundfonts, so long as the pitch and timing is there. That way I can convert it into sheets and stuff.
|
Pitch isn't guaranteed to be right, though. Especially with the pitched drums, you might only have a handful of pitches for each type of sound which sin't necessarily mapped to a relevant place on the virtual keyboard. C4 and C#4 could be a 5th apart.
You'd be better off trying to transcribe it yourself. Most of the music is pretty minimalist. |
I'd rather have a go with the midis. I have bad ears.
|
I've been meaning to do a full transcription of at least AO for a while now, but I just keep forgetting to actually start.
|
:
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. |
I'd love to be able to play each tone, it'll help me with what I'm currently doing. Could you send me a version of the DLL with that enabled? Or function pointers and their params, so I can hook it myself.
Also I'm building my own soundfont to use while editing in a Midi program... This is a little bit of what I've gotten out of it. (And why having that tone thing in the dll will help) |
Sweet. If there's any chance that you could just upload the midis as you found them (or walk me through the process of extracting them), I'd happily have a go at cleaning them up myself.
|
Here is the debug DLL and a screen shot of the UI. You'll need to attach the debugger to view the log output:
:
|
Good!
|
When I press play it just crashes my game, and I don't get any debug logs about the function hook, just Dsoundbuffer stuff. I'll just have to give it a go on my steam exe.
:
there is roughly in total 370 midi files; Most are just things like Abe's chant but a lot are music. I'll be posting a program to play these midi files soon, along with a sound font; Which at the moment only works with the music from Mines. But this will help with custom music, so while editing in midi software, you can listen to your odd track while you make it. EDIT: Yay more progress! I've reversed the PC version of the vb and vh files. Essentially the PS1 versions differ from the PC version as the PS1 vh file points to an offset in a big WAVE file for every sample, but in the PC one it's just an ID. (I have all the sounds which match up to these id's too) Essentially what this means is now I know how to add sounds to the game for music to use. Also now I need to write a vb/vh to sf2 (Soundfont 2) converter. And then I need to make a tool to edit the vb/vh files. :D |
:
So you reckon converting the samples to a soundfont2 will match what the game engine is doing? It sets reverb and some other jazz too? |
Yeah it's remarkably similar. In fact, soundfont2 sounds even better when it comes to sampling.
Just one thing... I have to figure out how to write a soundfont2 file in c# xD It's a bitch of a format, and it's doing my head in! |
Can't wait to hear the converted/playable music :)
|
Here's something for you to listen to.
The Soundfont was made by hand so a lot of things are missing. But yeah see how it sounds. It's pretty damn accurate. |
Nice, the secret and death sound effects are in there, they sound perfect to me.
EDIT: Tried listening the the midis with the SGM V2 soundfont, MISEQ17 actually sounds pretty cool, a lot of the others sound kinda creepy though. Now to see what Doom sounds like with the Abe soundfont... |