MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Mon Nov 25, 2024 12:06 am



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Question about audio
PostPosted: Mon Aug 03, 2020 10:58 pm 
Member

Joined: Wed Jul 15, 2020 9:42 pm
Posts: 26
Fila since you have the source code, maybe you might know

The games audio files, though having the wav extension, are not wave files
I know they are raw (and it plays back WAV compressed audio with much lower volume to boot)
Do you know what raw format they are in?

it does appear to be 16bit
and i am suspecting it is the now defunct MS ADPCM raw, they made and used that a lot back in the day

If it is that, do you know of an existing codec for it?

I was tinkering around with the engine sounds for giggles
and it only plays raw 16bit PCM 22k sort of close to correct, but not exactly, actually it is terrible
but if i manipulate the DC offset it is less terrible but still not remotely correct, Speed it correct, and it is recognizable but it still sounds like garbage, it is not standard PCM that they are using in the games sound engine from what i can determine.

Their wave forms also are heavily biased
No wave form below -0.3 ish which is a pretty heavy DC offset
Entire bottom of the wave form is flattened out.
Like nothing below around -0.3

the game will play a standard wav file, but it does not play it correct and the volume is kinda not there
Which makes sense if the game is actually looking for and using that heavy DC offset for something


Top
 Profile  
 
 Post subject: Re: Question about audio
PostPosted: Tue Aug 04, 2020 1:54 am 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
Ugh... not sure how to answer that because they're source code uses a sound engine called KASE. I haven't found anything whether it was a standardized sound engine or whether they built it from scratch.

In terms of songs, it accepts .wav or .mod files only.

There is a lot of written code by them mixing the sound volumes in weird ways.


Top
 Profile  
 
 Post subject: Re: Question about audio
PostPosted: Tue Aug 04, 2020 7:11 pm 
Member
User avatar

Joined: Sun Oct 16, 2005 4:39 pm
Posts: 1822
Location: Winnipeg Manitoba, Canada
I thought the game needed 8bit mono wave files?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Question about audio
PostPosted: Thu Aug 06, 2020 1:11 pm 
Member

Joined: Wed Jul 15, 2020 9:42 pm
Posts: 26
Slayer wrote:
I thought the game needed 8bit mono wave files?


for the sound effects, engine etc, if you extract those from the pod
though they have the .wav extension, the do not appear to be an actual WAV file

They appear to be some kind of 16bit raw wave form
I suspect 16bit 22k mono MS-ADPCM big endian, and they are heavily DC biased
You will see what i mean,if you import one into something like audacity.
export one of the idle or accel sounds, those are the engine

I have tried every tool i have but can not analyze and determine the exact raw wave format

The game will play back an 8k mono WAV file if you put one in as a replacement
but it does not play it back in the same manner as the stock raw files, for one volume is much reduced

Fila wrote:

There is a lot of written code by them mixing the sound volumes in weird ways.


That does not surprise me given that they are using very oddly manipulated raw wave forms for the sound effects
No one DC biased like that by accident


Top
 Profile  
 
 Post subject: Re: Question about audio
PostPosted: Fri Aug 07, 2020 2:20 am 
Member
User avatar

Joined: Mon Jul 02, 2001 2:01 pm
Posts: 1426
Location: Lost in Translation
Yeah I can't find anything that is easily identifiable as to what codec they were using. But sure as heck there's like 200 lines of code for how to mix the volumes of the songs. lol


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group