WAV file sound

VVMM

Trainz Scripter/Developer
Hi,

I want to know what are the supported formats for wav files that i can use for enginesounds and hornsounds.
I am using Adobe Audition to edit the sounds, but when i save them as wav, they are played by trainz like a radio-not-tuned fuzzy sound.
Maybe I am not using the correct sample rate etc...
I am using Trainz 12, so please reply with the highest audio quality (format) that TS12 supports for wave files.
Is there any lenght limitation for the sounds? (Especially three part hornsounds)

Later edit: I managed to create a three part hornsound that actually works, but i have gaps of silence between the three parts. If i hold the H key more than 1~2 sec the stop.wav file doesn't play at all. Why's that?

Thanks,
vvmm
 
Last edited:
Trainz does some absolutely illogical things with 3-part files. If you use the same technique that will function perfectly in a digital music synthesizer you'll end up with silence and/or you won't hear the stop wav.

Trainz appears to be overlapping the three audio files -- start.wav, idle 1.wav, and stop.wav -- rather than playing them sequentially, as a digital music sampler would.

Trainz also appears to continue playing the entire sustain section of the audio file (idle 1.wav) rather than stopping it when you release the "H" key (as a musical synthesizer would), which means the sustain file (idle 1.wav) continues to play for it's entire length and at the same time the stop.wav plays (but you won't hear it clearly because the idle 1.wav drowns it out.)

The only way you'll get to hear the stop.wav file is to make it longer than it really needs to be.

If you're getting a brief bit of silence, you probably need to make the start.wav longer in length. Trainz seems to insert silence if the start.wav isn't long enough, say around 1.5 sec. in length. But sometimes 1.5 sec. works and other times you'll need 1.66 sec. or maybe 1.44 sec.

You can press "H" one time and it'll work perfectly, and then press "H" again, and you'll hear a nasty "click".

I've recorded the output from Trainz while testing 3-part horn sounds and looked at the wavforms to try to figure out what the heck Trainz is doing with 3-part files. But there doesn't seem to be any real method to the madness. It plays the files slightly different each time...

Good luck!
 
Last edited:
It seems that all i have to do is to wait for auran to fix this issue....
My start and stop files have 0.40 sec and idle 1 1.25s. If i make them longer, they kinda' work, but if i tap shortly on H the sound is too long :D
 
wav files most suitable are 22k 16 bit mono.

To me it looks like your idle file is too long.

Also the three part horn has a different folder structure to the one and two part horns. Refer to Wiki for file names and folder structure.

Look here: KIND Hornsound
 
The files are named correctly and in the horn folder. Is there any sample 3 part horn that actually works?
 
Back
Top