Oddworld Forums > Zulag One > Oddworld Discussion > Oddworld Mods & Hacks


 
Thread Tools
 
  #1  
02-05-2014, 01:38 AM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)
Happy 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!
Attached Files
File Type: zip exoddus_sound.zip (363.0 , 770 views)
__________________
I make games, programs, music and stuff so yeah

Reply With Quote
  #2  
02-05-2014, 11:08 AM
Shrykull69's Avatar
Shrykull69
Chippunk
 
: Nov 2012
: spain
: 23
Rep Power: 0
Shrykull69  (10)

testing...
it looks good...
Reply With Quote
  #3  
02-05-2014, 11:23 AM
Fuzzle Guy's Avatar
Fuzzle Guy
Outlaw Flamer
 
: Apr 2003
: Greater London, UK
: 2,634
Blog Entries: 17
Rep Power: 24
Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)

Hell yeah. Let's get the Munch's Oddysee voices on the go!
__________________

Reply With Quote
  #4  
02-06-2014, 12:47 AM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

:
Hell yeah. Let's get the Munch's Oddysee voices on the go!
Yeah that's what I did when testing this. It was cool to hear him say "How ya doin!?"
__________________
I make games, programs, music and stuff so yeah

Reply With Quote
  #5  
02-06-2014, 05:28 AM
Fuzzle Guy's Avatar
Fuzzle Guy
Outlaw Flamer
 
: Apr 2003
: Greater London, UK
: 2,634
Blog Entries: 17
Rep Power: 24
Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)Fuzzle Guy  (2482)

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?
__________________

Reply With Quote
  #6  
02-06-2014, 08:12 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)

Cool - my hook dll also has this feature. I used it to help reverse the SEQ format
__________________
[ 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
  #7  
02-06-2014, 07:45 PM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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.
__________________
I make games, programs, music and stuff so yeah

Reply With Quote
  #8  
02-08-2014, 05:01 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)

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.
__________________
[ 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
  #9  
02-08-2014, 07:50 PM
MeechMunchie's Avatar
MeechMunchie
Sgt. Sideburns
 
: Mar 2009
: :noiƚɒɔo⅃
: 9,743
Blog Entries: 83
Rep Power: 31
MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)

Does that mean you could potentially export .midis of the game soundtrack?

Reply With Quote
  #10  
02-09-2014, 03:13 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)

:
Does that mean you could potentially export .midis of the game soundtrack?
Yeah but they will sound terrible as you need the soundfont.
__________________
[ 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
  #11  
02-09-2014, 04:56 AM
Phylum's Avatar
Phylum
No Artificial Colours
 
: Sep 2008
: Rock bottom
: 4,911
Blog Entries: 94
Rep Power: 22
Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)

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.
Reply With Quote
  #12  
02-09-2014, 07:45 AM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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!!!
__________________
I make games, programs, music and stuff so yeah


Last edited by mlg man; 02-09-2014 at 09:41 AM..
Reply With Quote
  #13  
02-09-2014, 02:47 PM
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)

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.
__________________
[ 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
  #14  
02-09-2014, 03:08 PM
Phylum's Avatar
Phylum
No Artificial Colours
 
: Sep 2008
: Rock bottom
: 4,911
Blog Entries: 94
Rep Power: 22
Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)

I'm musically literate. That's basically the same thing, right?

This is something I want to learn about anyway, so I'm prepared to do a bit of research into how it works.
Reply With Quote
  #15  
02-09-2014, 07:04 PM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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 make games, programs, music and stuff so yeah


Last edited by mlg man; 02-09-2014 at 07:59 PM..
Reply With Quote
  #16  
02-10-2014, 02:16 AM
MeechMunchie's Avatar
MeechMunchie
Sgt. Sideburns
 
: Mar 2009
: :noiƚɒɔo⅃
: 9,743
Blog Entries: 83
Rep Power: 31
MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)

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.

Reply With Quote
  #17  
02-10-2014, 02:20 AM
Phylum's Avatar
Phylum
No Artificial Colours
 
: Sep 2008
: Rock bottom
: 4,911
Blog Entries: 94
Rep Power: 22
Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)

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.
Reply With Quote
  #18  
02-10-2014, 02:22 AM
MeechMunchie's Avatar
MeechMunchie
Sgt. Sideburns
 
: Mar 2009
: :noiƚɒɔo⅃
: 9,743
Blog Entries: 83
Rep Power: 31
MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)

I'd rather have a go with the midis. I have bad ears.

Reply With Quote
  #19  
02-10-2014, 02:25 AM
Phylum's Avatar
Phylum
No Artificial Colours
 
: Sep 2008
: Rock bottom
: 4,911
Blog Entries: 94
Rep Power: 22
Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)Phylum  (5748)

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.
Reply With Quote
  #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
  #21  
02-10-2014, 10:10 PM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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)
Attached Files
File Type: zip Output.zip (163.5 , 460 views)
__________________
I make games, programs, music and stuff so yeah

Reply With Quote
  #22  
02-11-2014, 07:06 AM
MeechMunchie's Avatar
MeechMunchie
Sgt. Sideburns
 
: Mar 2009
: :noiƚɒɔo⅃
: 9,743
Blog Entries: 83
Rep Power: 31
MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)MeechMunchie  (14320)

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.

Reply With Quote
  #23  
02-11-2014, 11:01 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)

Here is the debug DLL and a screen shot of the UI. You'll need to attach the debugger to view the log output:

:
IDirectSoundBufferProxy::Release
IDirectSoundBufferProxy::SetFrequency : 44100
IDirectSoundBufferProxy::Play
calls_play_snd_seq(0, 14, 69, 76, 64, 50)
IDirectSoundBufferProxy::Release
IDirectSoundBufferProxy::SetFrequency : 9271
IDirectSoundBufferProxy::Play
calls_play_snd_seq(0, 1, 59, 34, 64, 124)
IDirectSoundBufferProxy::Release
IDirectSoundBufferProxy::SetFrequency : 24750
IDirectSoundBufferProxy::Play
These params to "calls_play_snd_seq" are in the same order as the UI AFAIK.
Attached Thumbnails
Click image for larger version

Name:	snd_debug.png
Views:	438
Size:	22.6 
ID:	13930  
Attached Files
File Type: zip ddraw.zip (292.8 , 385 views)
__________________
[ 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
  #24  
02-11-2014, 03:38 PM
Delux492
Zappfly
 
: Sep 2013
: Oddworld land
: 1
Rep Power: 0
Delux492  (10)

Good!
Reply With Quote
  #25  
02-11-2014, 05:08 PM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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.


:
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.
What I'm trying to do is to play the games midi files WITHOUT modifying them. And
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.

__________________
I make games, programs, music and stuff so yeah


Last edited by mlg man; 02-11-2014 at 08:08 PM..
Reply With Quote
  #26  
02-12-2014, 09:22 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)

:
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.




What I'm trying to do is to play the games midi files WITHOUT modifying them. And
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.

It only works with the English AE AFAIK - the offsets are hard coded since its just a debugging/RE aid.

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?
__________________
[ 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
  #27  
02-15-2014, 03:43 AM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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!
__________________
I make games, programs, music and stuff so yeah

Reply With Quote
  #28  
02-15-2014, 03:19 PM
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)

Can't wait to hear the converted/playable music
__________________
[ 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
  #29  
02-16-2014, 05:21 AM
mlg man's Avatar
mlg man
Howler Punk
 
: Nov 2006
: Australia
: 346
Rep Power: 18
mlg man  (171)mlg man  (171)

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.
Attached Files
File Type: zip Abe2MidiPlayer.zip (560.7 , 382 views)
__________________
I make games, programs, music and stuff so yeah

Reply With Quote
  #30  
02-19-2014, 06:07 AM
RoryF's Avatar
RoryF
aka OddMan360
 
: Jul 2009
: 42 Wallaby Way
: 1,485
Blog Entries: 17
Rep Power: 16
RoryF  (860)RoryF  (860)RoryF  (860)RoryF  (860)RoryF  (860)RoryF  (860)RoryF  (860)

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...
__________________
>> oddmatics.co.uk <<
there's stuff there, totally cool stuff, really!


Last edited by RoryF; 02-19-2014 at 06:31 AM..
Reply With Quote


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 








 
 
- Oddworld Forums - -