KIND Enginesound: Difference between revisions

From TrainzOnline
Jump to navigationJump to search
Pev (talk | contribs)
ramp durations added to samples
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[KIND Enginesound]] assets are locomotive enginesounds.  
[[KIND Enginesound]] assets are locomotive enginesounds.


There are three types - Diesel, Electric, and Steam.
There is only one enginesound asset type, which may be used for Steam, Diesel or Electric locomotives.


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).
Most modern diesel/electric engine sounds use the "ramping sound" configuration, which plays a looped sound file matched to the standard 8 throttle notches. Transition sounds can also be provided for changing up/down a throttle notch.


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).
Trainz also supports a non-ramped configuration, which plays a single engine sound loop and applies a frequency shift based on train speed.


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.
Steam engine sounds play a number of individual 'chuff' files at low speed, then switch to a series of frequency shifted loop sounds at higher speeds.
 
NOTE: As engine sounds are positional, all files should be 'mono' (i.e. single channel). If stereo files are provided then positional effects may not work, or the sound may not play at all.


Random note: How does Trainz know that a specific enginesound is a 'steam' enginesound? Because it's tagged for use on a steam loco...


==KIND Hierarchy==
==KIND Hierarchy==
===Parent Classes===
===Parent Classes===
* ''none.''
* [[KIND TrainzBaseSpec]]
===Child Classes===
===Child Classes===
* ''none.''
* ''none.''
Line 20: Line 21:


  kind "enginesound"
  kind "enginesound"
isramping 1
engine-sound-ramp-duration 1.5
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
  speedup 2.2
  speedup 2.2
isramping 1
  isfading 0
  isfading 0
  number-slow-sounds 4
  number-slow-sounds 4
  number-cylinders 2
  number-cylinders 2
  number-power-strokes 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


====isramping====
:Type: Boolean
:Desc: Specifies whether the asset uses the 'ramping' sound style (default true). When enabled, the enginesound must provide 8 "Idle X.wav" files, one for each throttle notch.
====engine-sound-ramp-duration====
:New tag for trainz-build 3.6
:Type: Decimal.
:Desc: Sets the default duration of the transition sounds used to change between notches. If the individual ramp-up/down tags are not provided, or have insufficient values, this value will be used for the unspecified lengths.
====engine-sound-ramp-up-durations====
:New tag for trainz-build 3.6
:Type: Float list (normally 8 values)
:Desc: Sets the duration (in seconds) of each throttle notch transition sound, from "start.wav", through to "up 7 - 8.wav".
:Note: If a specific transition sound is not provided, the duration should be entered as 0.
====engine-sound-ramp-down-durations====
:New tag for trainz-build 3.6
:Type: Float list (normally 8 values)
:Desc: Sets the duration (in seconds) of each throttle notch transition sound, from "stop.wav", through to "down 8 - 7.wav".
:Note: If a specific transition sound is not provided, the duration should be entered as 0.


====speedup====
====speedup====
:Type: Decimal
:Type: Decimal
:Desc: 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.
:Desc: Used only when isramping is false. This controls the rate of frequency change for the sound loop based on speed. 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====
:Type: Boolean
:Desc: 'Ramping' diesel enginesounds have transition sounds between each level state.


====isfading====
====isfading====
:Type: Boolean
:Type: Boolean
:Desc: 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.
:Desc: Used only when isramping is false. If true, the engine sound loops volume will fade in (i.e. get louder) as loco speed increases.


====number-slow-sounds====
====number-slow-sounds====
:Type: Integer
:Type: Integer
:Desc: Number of 'chuff' sounds available in a steam enginesound.
:Desc: Specifies the number of 'chuff' sounds in a steam enginesound. These will be played in sequence as the loco crawls forward at low speed.


====number-cylinders====
====number-cylinders====
:Type: Integer
:Type: Integer
:Desc: Number of cylinders in the locomotive the steam sound was recorded from.
:Desc: Number of cylinders in the locomotive for a steam enginesound. This controls the rate of the low speed chuff sounds, and the frequency shift rate for the loop sounds.


====number-power-strokes====
====number-power-strokes====
:Type: Integer
:Type: Integer
:Desc: Number of power strokes in the locomotive the steam enginesound was recorded from (should generally be left at the default, 2).
:Desc: Number of power strokes in the locomotive for a steam enginesound (should generally be left at the default, 2). This controls the rate of the low speed chuff sounds, and the frequency shift rate for the loop sounds.
 
====engine-sound-ramp-up-durations====
:New tag for trainz-build 3.6
: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
:Desc: 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====
:New tag for trainz-build 3.6
: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
 
:Desc: 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.
:Refer to [[TS12 Doppler]] for usage examples.
====engine-sound-ramp-duration====
:New tag for trainz-build 3.6
:Type: Decimal. Default value: 1.5
:Desc: 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==
==Example Config.txt==
====Diesel====
====Diesel====
Sample [[config.txt file]] for a diesel type 'enginesound' asset, with the Standard Tags excluded for brevity:
Sample [[config.txt file]] for a diesel type 'enginesound' asset, with the standard tags excluded for brevity:


  kind "enginesound"
  kind "enginesound"
  isramping 1
  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-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
  engine-sound-ramp-down-durations 12.286,7.086,4.241,4.861,3.017,2.245,2.278,5.119


====Electric====
====Electric====
Sample [[config.txt file]] for an electric type 'enginesound' asset, with the Standard Tags excluded for brevity:
Sample [[config.txt file]] for an electric type 'enginesound' asset, with the standard tags excluded for brevity:


  kind "enginesound"
  kind "enginesound"
Line 96: Line 92:
  isfading 0
  isfading 0
  speedup 4.0
  speedup 4.0


====Steam====
====Steam====
Sample [[config.txt file]] for a steam type 'enginesound' asset, with the Standard Tags excluded for brevity:
Sample [[config.txt file]] for a steam type 'enginesound' asset, with the standard tags excluded for brevity:


  kind "enginesound"
  kind "enginesound"
Line 105: Line 100:
  number-cylinders 2
  number-cylinders 2
  number-power-strokes 2
  number-power-strokes 2


==Wave file naming==
==Wave file naming==
====Diesel====
 
In a 'fading' diesel enginesound, the following sound files are used:
====Ramping====
In a 'ramping' diesel/electric enginesound, the following 'idle' sound files are expected:


{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
Line 137: Line 134:
|}
|}


In a 'ramping' diesel enginesound, the following ''additional'' sound files are also used:
 
The following transition sounds are also supported, but any individual file can be omitted if no transition is required/desired.


{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
Line 191: Line 189:




====Non-ramping====


====Electric====
In a non ramping engine sound only one file is used: engine_loop.wav.


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


====Steam====


 
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'.
====Steam====


{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
Line 209: Line 207:
|}
|}


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'.
 
The low speed 'chuff' sounds are named "piston_strokeX.wav", where X is an index from 1 to the value specified by the 'number-slow-sounds' tag.
 
For example, if number-slow-sounds is set to '4' (the default).


{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
Line 222: Line 223:
|}
|}


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


{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
The following loops are played as the loco picks up speed. They are frequency shifted to match the wheel rotation speed, so the audible 'chuffs' within the loop maintain synchronisation with the drive bogie animation. They also vary in volume based on the regulator setting of the locomotive.
|-
 
! smoke_stack_hiss.wav
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.


This is a background hiss noise that appears to be played continually.
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...


{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
Line 284: Line 285:
|}
|}


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.
Earlier assets may instead provide a single steam loop sound, titled "steam_loop.wav". If only this file is present, modern Trainz code will use it with a default of 50RPM, in order to maintain compatibility.
 


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.
The following file is also played continually in the background. It's volume will vary based on train speed.


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.
{| border=1 cellpadding=2 cellspacing=0 style="text-align: left;"
|-
! smoke_stack_hiss.wav
|}


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...


==Downloads==
==Downloads==
Line 297: Line 301:


==Categories==
==Categories==
[[Category:Asset KIND]]
[[Category:Asset KIND|E]]

Latest revision as of 09:40, 17 September 2026

KIND Enginesound assets are locomotive enginesounds.

There is only one enginesound asset type, which may be used for Steam, Diesel or Electric locomotives.

Most modern diesel/electric engine sounds use the "ramping sound" configuration, which plays a looped sound file matched to the standard 8 throttle notches. Transition sounds can also be provided for changing up/down a throttle notch.

Trainz also supports a non-ramped configuration, which plays a single engine sound loop and applies a frequency shift based on train speed.

Steam engine sounds play a number of individual 'chuff' files at low speed, then switch to a series of frequency shifted loop sounds at higher speeds.

NOTE: As engine sounds are positional, all files should be 'mono' (i.e. single channel). If stereo files are provided then positional effects may not work, or the sound may not play at all.


KIND Hierarchy

Parent Classes

Child Classes

  • none.

Supported Tags

kind "enginesound"
isramping 1
engine-sound-ramp-duration 1.5
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
speedup 2.2
isfading 0
number-slow-sounds 4
number-cylinders 2
number-power-strokes 2


isramping

Type: Boolean
Desc: Specifies whether the asset uses the 'ramping' sound style (default true). When enabled, the enginesound must provide 8 "Idle X.wav" files, one for each throttle notch.

engine-sound-ramp-duration

New tag for trainz-build 3.6
Type: Decimal.
Desc: Sets the default duration of the transition sounds used to change between notches. If the individual ramp-up/down tags are not provided, or have insufficient values, this value will be used for the unspecified lengths.

engine-sound-ramp-up-durations

New tag for trainz-build 3.6
Type: Float list (normally 8 values)
Desc: Sets the duration (in seconds) of each throttle notch transition sound, from "start.wav", through to "up 7 - 8.wav".
Note: If a specific transition sound is not provided, the duration should be entered as 0.

engine-sound-ramp-down-durations

New tag for trainz-build 3.6
Type: Float list (normally 8 values)
Desc: Sets the duration (in seconds) of each throttle notch transition sound, from "stop.wav", through to "down 8 - 7.wav".
Note: If a specific transition sound is not provided, the duration should be entered as 0.

speedup

Type: Decimal
Desc: Used only when isramping is false. This controls the rate of frequency change for the sound loop based on speed. 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.

isfading

Type: Boolean
Desc: Used only when isramping is false. If true, the engine sound loops volume will fade in (i.e. get louder) as loco speed increases.

number-slow-sounds

Type: Integer
Desc: Specifies the number of 'chuff' sounds in a steam enginesound. These will be played in sequence as the loco crawls forward at low speed.

number-cylinders

Type: Integer
Desc: Number of cylinders in the locomotive for a steam enginesound. This controls the rate of the low speed chuff sounds, and the frequency shift rate for the loop sounds.

number-power-strokes

Type: Integer
Desc: Number of power strokes in the locomotive for a steam enginesound (should generally be left at the default, 2). This controls the rate of the low speed chuff sounds, and the frequency shift rate for the loop sounds.
Refer to TS12 Doppler for usage examples.


Example Config.txt

Diesel

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

kind "enginesound"
isramping 1
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

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

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

Ramping

In a 'ramping' diesel/electric enginesound, the following 'idle' sound files are expected:

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


The following transition sounds are also supported, but any individual file can be omitted if no transition is required/desired.

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


Non-ramping

In a non ramping engine sound only one file is used: engine_loop.wav.


Steam

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'.

loco_stationary_fast.wav
loco_stationary_med.wav
loco_stationary_slow.wav


The low speed 'chuff' sounds are named "piston_strokeX.wav", where X is an index from 1 to the value specified by the 'number-slow-sounds' tag.

For example, if number-slow-sounds is set to '4' (the default).

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


The following loops are played as the loco picks up speed. They are frequency shifted to match the wheel rotation speed, so the audible 'chuffs' within the loop maintain synchronisation with the drive bogie animation. They also vary in volume based on the regulator setting of the locomotive.

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...

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

Earlier assets may instead provide a single steam loop sound, titled "steam_loop.wav". If only this file is present, modern Trainz code will use it with a default of 50RPM, in order to maintain compatibility.


The following file is also played continually in the background. It's volume will vary based on train speed.

smoke_stack_hiss.wav


Downloads

Attach sample files here?


Categories