Jump to content

Trainz/Kinds/kind enginesound

From Wikibooks, open books for an open world

KIND Enginesound assets are locomotive enginesounds customized to the type of locomotion prime mover in the Locomotive. Kind Enginesound will also often be seen by KUID references in other rolling stock, for even freight cars make noise.

There are three types of Locomotive prime mover power plants - Diesel, Electric, and Steam.

[e]
KINDs (type asset groups)
and containers


Diesel enginesounds are formed of a number of separate wave files. These are 'steady state' sounds (one for each runlevel from 1 up to 8) and 'transition' sounds (used when going between one runlevel and the next one up, or next one down). Diesel locomotion is more correctly termed diesel-electric, for the diesel most often turns a dynamo producing electric power, and the wheels are torqued by electric motors. When acceleration is a factor, the reverse torque from the wheels creates what might be thought of as reverse power surges, which can be seen on the panel meters: as the applied-torque builds, the amperage peaks up higher; as the speed picks up, the reflected power and counter-torque drop and the meters indicate a lesser stable current use. In real locomotive driving, a major part of the operator's job is to accelerate as fast as possible whilst keeping such peaking power requirements within acceptable range limits; otherwise things break, burn up and catch fire!

Electric enginesounds play one wave file, but pitch shift it to produce a continuously variable sound linked to the speed of the train. (Note: If your electric needs it's enginesound linked to throttle position rather than train speed, it's better to use a 'diesel' style 'ramping' sound). Electric locomotion has the same reverse torque reflection power demands, and the ammeters will operate the same. The biggest difference in sound, is the power is remotely provided at high voltage and stepped down to supply motive currents. The loading sounds prevalent in diesels, take place in the dynamo's of the power station. Hence electric locomotion reflects only motor noises.

Steam enginesounds play a number of individual 'chuff' files at low speed, and switch to a series of pitch-shifted loop sounds at higher speeds.

Note: Trainz knows that a specific enginesound is a 'steam' enginesound simply because it's used on a steam locomotive KIND.

KIND Parent Classes

[edit | edit source]

Supported Tags

[edit | edit source]
kind "enginesound"
speedup 2.2
isramping 1
isfading 0
number-slow-sounds 4
number-cylinders 2
number-power-strokes 2
engine-sound-ramp-up-durations 0.0,1.5,1.5,1.5,1.5,1.5,1.5,1.5
engine-sound-ramp-down-durations 0.0,1.5,1.5,1.5,1.5,1.5,1.5,1.5
Editor's note: Tags engine-sound-ramp-up-durations and engine-sound-ramp-down-durations, around since Trainz 0.9 (beta release) were mysteriously ommited from the legal values in the fault testing software for both TS2009 and TS2010 (TBV's v2.9–v3.3); both were in development at the same time, both have four service packs, and over lap technology levels so their various TBVs. The two parameters are again mandatory in TS12, so porting an older asset into those TBVs or using a locomotive with those TBVs in an earlier or later release will create problems... on the one hand, the tags and values can be moved into the description (text) block to safeguard them, and get the engine to work. (What it sounds like is unknown). Taking an engine with these TBVs into TS12 or TANE means the data is missing! So good luck with that. Stealing values from another similar locomotive of an earlier version seems a likely solution. Still, Good Luck with that!



speedup

[edit | edit source]
Data Type: Decimal
Description: Controls the rate of pitch change for an electric type enginesound. A value of 1.0 would mean the top frequency used is as much again as the base frequency - in other words, the frequency of the sound played would double over the speed range of the vehicle.

isramping

[edit | edit source]
Data Type: Boolean
Description: 'Ramping' diesel enginesounds have transition sounds between each level state.

isfading

[edit | edit source]
Data Type: Boolean
Description: For diesel engine sounds, 'fading' sounds do not have transition sounds between each level state - instead, one sound is faded into the next to 'fake' a transition. For electric enginesounds, 'fading' sounds are quieter at low speed and louder at high speed - whereas 'non-fading' sounds are more constant across the speed range.

number-slow-sounds

[edit | edit source]
Data Type: Integer
Description: Number of 'chuff' sounds available in a steam enginesound.

number-cylinders

[edit | edit source]
Data Type: Integer
Description: Number of cylinders in the locomotive the steam sound was recorded from.

number-power-strokes

[edit | edit source]
Data Type: Integer
Description: Number of power strokes in the locomotive the steam enginesound was recorded from (should generally be left at the default, 2).

engine-sound-ramp-up-durations

[edit | edit source]
New tag for trainz-build 3.6
Data Type: List of 8 Decimal values. Default values: 1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5. Units: seconds to 3 decimal places
Description: Sets the duration of play of each of the 8 soundfiles, "start.wav" and "up 1 - 2.wav" to "up 7 - 8.wav" files. Value must not be greater than the duration of the corresponding sound file.
If there is no "start.wav" then enter 0 as the first number in the set.


engine-sound-ramp-down-durations

[edit | edit source]
New tag for trainz-build 3.6
Data Type: List of 8 Decimal values. Default values: 1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5. Units: seconds to 3 decimal places
Description: Sets the duration of play of each of the 8 soundfiles, "stop.wav" and "down 2 - 1.wav" to "down 8 - 7.wav" files. Value must not be greater than the duration of the corresponding sound file.
If there is no "stop.wav" then enter 0 as the first number in the set.
Refer to TS12 Doppler for usage examples.

engine-sound-ramp-duration

[edit | edit source]
New tag for trainz-build 3.6; likely illegal in prior TBVs.
Data Type: Decimal. Default value: 1.5
Description: Sets the duration of play of all up and down ramp sounds. All ramp sound files should be the same duration to use this tag.


Example Config.txt

[edit | edit source]

Diesel

[edit | edit source]

Sample config.txt file for a diesel type 'enginesound' asset, with the Standard Tags excluded for brevity:

kind "enginesound"
isramping 1
isfading 0
engine-sound-ramp-up-durations 14.706,7.086,4.241,4.861,3.017,2.245,2.278,5.119
engine-sound-ramp-down-durations 12.286,7.086,4.241,4.861,3.017,2.245,2.278,5.119


Electric

[edit | edit source]

Sample config.txt file for an electric type 'enginesound' asset, with the Standard Tags excluded for brevity:

kind "enginesound"
isramping 0
isfading 0
speedup 4.0


Steam

[edit | edit source]

Sample config.txt file for a steam type 'enginesound' asset, with the Standard Tags excluded for brevity:

kind "enginesound"
number-slow-sounds 4
number-cylinders 2
number-power-strokes 2

Wave file naming

[edit | edit source]

Diesel

[edit | edit source]

In a 'fading' diesel enginesound, the following sound files are used:

idle 1.wav engine idle / notch 1 sound
idle 2.wav notch 2 sound
idle 3.wav notch 3 sound
idle 4.wav notch 4 sound
idle 5.wav notch 5 sound
idle 6.wav notch 6 sound
idle 7.wav notch 7 sound
idle 8.wav notch 8 sound

In a 'ramping' diesel enginesound, the following additional sound files are also used:

start.wav engine startup
stop.wav engine shutdown
up 1 - 2.wav transition between notch 1 and notch 2
up 2 - 3.wav transition between notch 2 and notch 3
up 3 - 4.wav transition between notch 3 and notch 4
up 4 - 5.wav transition between notch 4 and notch 5
up 5 - 6.wav transition between notch 5 and notch 6
up 6 - 7.wav transition between notch 6 and notch 7
up 7 - 8.wav transition between notch 7 and notch 8
down 2 - 1.wav transition between notch 2 and notch 1
down 3 - 2.wav transition between notch 3 and notch 2
down 4 - 3.wav transition between notch 4 and notch 3
down 5 - 4.wav transition between notch 5 and notch 4
down 6 - 5.wav transition between notch 6 and notch 5
down 7 - 6.wav transition between notch 7 and notch 6
down 8 - 7.wav transition between notch 8 and notch 7


Electric

[edit | edit source]

The one sound file for an electric engine is named engine_loop.wav.


Steam

[edit | edit source]
loco_stationary_fast.wav
loco_stationary_med.wav
loco_stationary_slow.wav

These are background sounds for when the loco is stationary. The fast will be played when the loco has just stopped, and if it is left for a while, the sound will progress down to 'med' and then eventually 'slow'.

piston_stroke1.wav
piston_stroke2.wav
piston_stroke3.wav
piston_stroke4.wav

... and on up to the number specified in the 'number-slow-sounds' tag. These sounds are the low speed 'chuff' sounds.

smoke_stack_hiss.wav

This is a background hiss noise that appears to be played continually.

steam_loop_30RPM.wav
steam_loop_35RPM.wav
steam_loop_40RPM.wav
steam_loop_50RPM.wav
steam_loop_60RPM.wav
steam_loop_75RPM.wav
steam_loop_90RPM.wav
steam_loop_100RPM.wav
steam_loop_125RPM.wav
steam_loop_150RPM.wav
steam_loop_175RPM.wav
steam_loop_200RPM.wav
steam_loop_250RPM.wav
steam_loop_300RPM.wav
steam_loop_350RPM.wav
steam_loop_400RPM.wav
steam_loop_500RPM.wav
steam_loop_600RPM.wav
steam_loop_700RPM.wav
steam_loop_800RPM.wav
steam_loop_1000RPM.wav
steam_loop_1200RPM.wav
steam_loop_1400RPM.wav
steam_loop_1600RPM.wav
steam_loop_2000RPM.wav

These loops are played as the loco picks up speed. They are individually stretched or squashed in length (also incurring pitch shifting in the process) to match the wheel rotation speed so the audible 'chuffs' within the loop maintain synchronisation with the drive bogie animation.

It should be noted that unlike the earlier steam loop, which was based on track speed, rather than wheel rotation speed, this system enables sound files to be shared between locomotives with different wheel sizes. 60RPM (which is one revolution per second) on a 2 cylinder loco will produce four chuffs per second irrespective of the wheel size - the only difference this makes is what speed the train will be doing when the drive wheels are rotating at 60RPM.

Any individual file can be omitted from this set - the system will use what files are available and use adjacent files to cover for any missing files.

It is anticipated that a sound creator will pick and choose which wave files are used based on what recordings are available, and that a released enginespec will not have all sound files present - particularly the higher speed ones, which are likely to be irrelevant for most locos, but are provided just in case...

 

Notes, Footnotes & References

[edit | edit source]

Config.txt files are endemic and ever present in Trainz assets, for no asset can be defined without this type of Computer Science container. The keyword-value_of_key pairing must always be kept in mind in editing or creating Trainz content. The TrainzBaseSpec contains values and containers which are most common in asset defining config.txt files.  

Notes

 

Footnotes

 

References

logo
Fundamentals for Trainz Trainees
TOC | BeginningsFun | AM&C | Creation | InBook Refs ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers