MTM2.com

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



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: KLP
PostPosted: Thu Jun 17, 2004 6:26 pm 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
Weird thing happened:
Ok, trying to figure out what the numbers in the klp files do.
So - i open music.pod and rename voodoo.wav and voodoo.klp to voodoo.wax and voodoo.klx so mtm2 wont load them.
then i replaced voodoo.wav in the sound folder with a song of my own.
then i changed the voodoo.klp in the sound folder from "1 0 0" to "1 30000 70000" (similar to the numbers for skidice.klp). Then i run mtm2 and i guess i had music turned off cause nothing played so i fiddled withthe sound options in mtm2 to get it to play the pre-race and race music. Then i run voodoo island and it plays like the first 11sec an goes back tot he beginningof the song. Then i kill mtm2 and go back to the voodoo.klp and change it back to 1 0 0 and then i goto mtm2 and it is still playing on ly the first 11 sec and repeating. Weird huh? Well it gets worse - now all the tracks repeat after 11 sec, crazy98 and all the others - odd huh? What do u suggest i do? Reinstall? i'm confused. I guess the problem is that i didnt try listeneing to the unchanged music. I dont know if i messed it up today or if i had already messed it up prior. Well just thought i'd let u know. I'm gona go try to figure this out. ttyl.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 17, 2004 8:26 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
Interestingly, the mod file in alphaville does not loop from the very beginning. There's an intro section that starts off with a sort of omimous thundering bell sound which eventually leads into the main part of the tune which then never replays the intro part. There is no klp for that mod so the feature is probably an attribute of the mod. I haven't checked other mod files to see if they have klp's or not.

Before you reinstall, try alphaville or other tracks with custom music - mods and wavs - and see how your game reacts. Also, turn off the play cd music option. That might be interfering. Also, backup the monster.ini file and copy the one from the cd (be sure to set it to archive, not read only).

My guess(es) what those values might mean:

First digit. Play wav. Zero could possibly signal not to use it. But it probably means to loop or not loop. Remember Altitude 2 by Monsta Driva? That song did not loop but when I renamed crazy98.klp to altitude.klp it loops just fine. In either case, it appears to be a binary zero/one value.

The other two digits. Like in the case of alphaville, it could be start and end positions - which would be necessary with a wav file. The value could be bits, bytes, time or percentage. Zero would mean play all. They could also be volume indicators. Or, possibly a clipping guard and noise gate. If that were the case, then it's probably decibel levels. Lastly, like many parts of this game, it's possible they are not used and are just left over remnents of earlier code.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2004 8:27 am 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
hmm, now i have uninstalled/installed the game a few times and one time it worked and now it isnt agaain. I have deleted my entire sound folder and replaced my music.pod like 5 times and it still does it lol.

Quote:
"Hi. The center number means the file will loop at that point in time of the file. The units of time are in Samples. In cool edit pro I just click the View Menu>Time format>Samples. Not sure how it is in other packages but I'm sure it's similar. The first number of the file indicates whether the file should loop infinately or not. I can't remember what the third number does at the moment, I've been away from the Fly! and development scene for a while.

Hope this helps!

P.S- You may have to fiddle with the Samples number, although the loop sounds perfect in the sound program it may still have pops at the loop in Fly!.

Cory."

- http://forums.avsim.net/


This Cory guy aka Prince seems to be the only person on the internet that knows lol. However, i cant really test this cause the weird 11sec thing on my comp lol. Umm.

I'm guessing that the last number is what sample to jump to

so like 1 60 50 means when u get to 60 jump to 50 every time but 0 60 50 would be do it once. Some sounds have wicked complicated klps with multiple lines and such, for example:

Accell3b
huey
jungl-n1
jungl-n3
rainf8
train22

for example: Jungl-n3:

3
9
0 0
0 58666
0 40865
67306 58666
0 0
43140 0
43140 40865
67306 40865
0 58666

all of those listed above start with 3 and then the next line states the number of lines folowing. each flowing line has two numbers. assumedly sample numbers for jumping. not sure what the rules are for when to jump where.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2004 4:46 pm 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
OK, I have figured out the format of the simple three number klp file

s t v

s is a boolean signifying wether or not to infinatly loop

t is where to jump to stored as a sample number. In a 22050Hz wav this would be the number of seconds into the file * 22050 if t is 0 it's considered the beginning of the file

v is the place to jump from, like when u get to this point jump to t. if v is 0 it's assumed to be the end of the file.



I also sorta figured out that whole 11Sec thing. MTM2 randomly decides to momentarily crash the game every 11sec. in some races it will pause every 11sec and all the audio will stop and so will the picture for a second. then is goes again but it restarts the music and like if army was talking he wont be anymore. This is somthing not related to klps. Any ideas?

I would work on figuring out complicated KLPs but it's difficult when u cant test more than 11sec of audio. Somtimes it works tho. Oh well. Maybe i'll restart my comp again. that might help. i havent figured out a patteren for the 11sec thing.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 18, 2004 5:02 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
Good work on the looping. I hope I was a help on that. I mean, in addition to cory ;-)

The 11 second problem. If updating or reinstalling sound drivers or directx doesn't do it, see if you can scrounge up a different audio card to try out. I'm having no end of trouble with random lock ups and I'll be trying a new mb within the week. If it's not software, then we gotta look at hardware.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 19, 2004 10:37 pm 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
it was an adware virus of some sort - took me a few hours to figure out how to make it stop regenerating when i deleted it but finaly got it working.

Some new tricks:

"2"
mtm2 will play the sound and then play it backwards and then forwards again etc. quite neat making mtm2 play a sound backwards.

"0"
and it will play only once

"3
4
0[end] 0[beginning]
17852 0[beginning]
46903 33663
0[end] 17852"
stuff in [brackets] would not be in the file - they are just clarification

Umm, this makes it start playing and then when it get's to "0"(first number on 3rd line) (the end of the wav) it jumps to the second number on the 3rd line being "0" meaning beginning of wav, then when it gets to 17852 is jumps to 0 (beginning), then when it gets to 46903 is jumps to 33663 and then when it get's to 0(end) it jumps to 17852, then it starts taking instruction on the 3rd line again - when it gets to 0(end) it jumps to beginning.
basically it starts at the beginning of the file and when it comes to the position noted as the first number it jumps to the second number - 0 is beginning or end - you never jump from the beginning or to the end (easy way to remember what 0 stands for when)
3
4 (number of instructions)
[Jump From] [Jump To]
[Jump From] [Jump To]
[Jump From] [Jump To]
[Jump From] [Jump To]


Hmm help me out with this next one:
"5
4
0 0
17852 0
46903 33663
0 17852 "
it goes from:
begin to end
end to begining
beging to m
m to n
n to end
end to begining

where n is farter along in the wav than m
Code:
                           end
    /\       /\      /\    n
   /  \  /\/   \  /\/  \   m
  /    \/       \/      \  begin


hope that text art worked ^


"6
4
0 0
17852 0
46903 33663
0 17852 "
seems to make it randomly go from point to point - not sure what rules there are for picking points to jump to and from. Each time i run it it sounds different.


if u make the klp where the first number on the first line is over 6 and it will not play (not too useful-altho i guess it could have been used in place of a null wav replacing the train horn in fixall)



Umm a good way to test this stuff is:
open music.pod in c-pod
rename voodoo.klp and voodoo.wav to .klx and .wax so that game will look in the sound folder for those files
in the sound folder put a voodoo.wav that slowly ascends in pitch so that it's easy to hear where you are in the wav
in the sound folder make a voodoo.klp and open it in notepad and work with it
Run mtm2
turn off cd-tracks
turn down the sound effects volume and up the music volume
get in voodoo island and listen to the sounds that the klp produces
pause the game and switch to notepad (alt+tab)
edit the klp
save
alt+tab back to mtm2
resume race
the music will restart using the new klp :)

have fun reverse engineering. I need sleep.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 19, 2004 11:26 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
If I'm following you, you mean this?

Line 1 - Play mode.
0 Play once
1 Loop

2 Forward and Back
3 Defined list
4 unknown
5 undetermined
6 random

Value 1 start/stop pair are on the first line
Values 0,2 use one number only

Line 2 - Number in list

Lines 3 and over - value pairs that define start and stop sample points.
[Jump From] [Jump To]
[Jump From] [Jump To]
[Jump From] [Jump To]
[Jump From] [Jump To]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 20, 2004 11:48 am 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
corrections:

0 - play once
1 - loop

clarifications:
only 1 has values on the first line
only 3, (maybe 4), 5, and 6 have more than 1 line
0,2 are only one number

Yea other than that you are correct

I think i have tried 4 but i dont remember tha findings, I'll have ot try it again somtime.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 20, 2004 6:31 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
Coincidentally, Alpine came up with a file he liked because of its loopability ;-)

I converted to wav and here's the in-game result.

Code:
3
14
440662 0
149923 440662
738600 0
149923 738600
1036614 0
149923 1036614
1356014 0
149923 1356014
1674511 0
149923 1674511
1972723 0
149923 1972723
2269655 0
149923 2269655

<a href="http://cownap.com/~tracks/beta/VOODOOKLPBETA.zip">VOODOOKLPBETA.zip</a> (1579k)

Note. It is set up for voodoo island. To make it work, mount it higher than MUSIC.pod in the pod.ini list. Or, mount it at the very top to avoid complications.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2004 10:18 pm 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
exactly - isnt that neat?
That music is actually what got me looking at this klp stuff. Alpine asked me to try to rip that music from an exe he had and after i did(i just played and recorded at the same time) i wante to get it to run in mtm2 - it originaly just did that beginning intro and then went from the end to right after the intro. I have an klp for that and it's quite spiffy if u ask me.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


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


Who is online

Users browsing this forum: No registered users and 73 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