Jump to content
XCOMUFO & Xenocide

Sound


Kratos

Recommended Posts

I am currently trying to implement TFTD alien units into Ufo2k and fixing up the TFTD weapon set. However, there is a road block I am hitting. Sound. I know sound is under the .cat files, but I am uncertain of "where" specific sounds are. Finding these sounds would be ideal for TFTD implementation, but I do not have the time to do this and program. Although, I would like to know if there were some type of editor out there for .cat files.

 

Basically this mainly is a request. If you could provide .cat #'s of the location of particular sounds, much would be appreciated. :) Even pointing out a few sound locations every once and awhile would be a great help!

 

I am primarily in need of:

 

- alien death sounds (this is highest priority for unit implementation)

- alien walk sounds (low priority)

- weapon fire sounds

- weapon impact sounds

Link to comment
Share on other sites

TFTD has similar format of .CAT files compared to those from EU, version 1.4. I described it here. About the samples I can say from head that they are headerless PCM data, 11025 Hz, 8 bit signed. In the evening I'll try to find more detailed notes, and maybe port my crude EU sound extraction tool to TFTD.
Link to comment
Share on other sites

Don't they act the same as UFO's .cat files?

 

BTW, I'm not trying to rip them out. I'm using the sound.cat from the original TFTD. Ufo2k simply grabs these cat files out of the XCOM and TFTD sound folder. We don't use copyrighted data by any means.

 

But I am glad to know someone here knows about these things. Maybe you can help me identify these sounds? :) (since you appear to know what you're doing)

Edited by Kratos
Link to comment
Share on other sites

Don't they act the same as UFO's .cat files?

 

It depends. You can upack them the same way as .cat files from EU (DOS version 1.4 or CE), but the actual sound data is different.

 

First part of the file is table of contents, with two longints for each sound effect: offset and length. Actual data for each sound lies at offset+3 bytes, so not exactly headerless as I posted (waves from EU 1.4 also have them, I have no idea what it is for - do you?)

 

Anyway, I'll rip them all and try to make a list of those which I recognise.

Link to comment
Share on other sites

Here's the (unfortunately short) list of sounds that I'm pretty certain.

001 - 012 footsteps
013 tank movement

030 underwater explosion
031 underwater explosion

043 throwing
044 mc noise
045 item placement
046 weapon reload
047 automatic door
048 door
049 underwater ambient
050 - 061 footsteps

077 - 080 explosions

092 throwing
093 mc noise
094 item placement
095 weapon reload
096 automatic door
097 door

100 death scream
101 tank destruction(?)
102 aquatoid death
103 gillman death
104 tentaculat death
105 lobsterman death
106 tasoth death
107 calcinite death
108 deep one death
109 biodrone death
110 triscene death
111 hallucinoid death
112 xarquid death

116 tentaculat movement

 

For some reason there are lots of duplicates in the file, some exact and some just similar. Also I'm afraid I won't be much of help with weapon sounds :\ - there's lot of them, most are very similar, and I never played TFTD that much actually.

 

PS. Sorry it took so long, I still can't enjoy fully the motorcycle I recently bought :)

Edited by Quantifier
Link to comment
Share on other sites

Wow, very helpful there! =b Thanks! I didn't mean to rush you, sorry about that. :(

 

If you wish to not do this anymore, may I ask if I can use your tool? Again, I really appreciate this. I'll be sure to credit you for your help. :)

 

Edit: *sigh* I now know what you mean by being different from EU. The sounds sound extensively long, and garbled in UFO2000. I guess we need to hard code this in. Could you provide me with more info about these differences? Also, your tool, what language did you program it in? UFO2000 currently is programmed in c++, and if you did the same, or know c++, maybe you can help us with support for TFTD sound? You seem to know what you are doing with this. :)

Edited by Kratos
Link to comment
Share on other sites

My tool is written in Pascal (come on, everyone used it someday in the past :P) I can post it later today when I get home.

 

The reason you get them garbled is probably you treat them as unsigned values - you need to read signed bytes.

In the function soundFile::loadCeCat() don't call wav2sample(), but something more like derivative of raw2sample()

 

SAMPLE *signedpcm2sample(const std::string& buf) {
SAMPLE *spl = create_sample(8, 0, 11025, buf.size());
/* above returns NULL if len == 0 */
if (spl == NULL)
	return NULL;

/* copy data */
buf.copy(static_cast<signed char *>(spl->data), buf.size());

/* fix signedness */
for (unsigned i = 0; i < buf.size(); i++)
	(static_cast<unsigned char *>(spl->data))[i] =
		((static_cast<signed char *>(spl->data))[i] + 128);

return spl;
}

 

(I'm not saying this code will work... I'm Tcl coder, and much prefer C over C++ - anyway I hope you get it working)

Edited by Quantifier
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...