Skip to content

Locomotive sounds (sounds.ref)

The file data/<series>/sounds.ref maps cabin and machine sounds to wav files. Each row names a base file. Next to it the simulator looks up _start, _loop and _stop variants — you do not list those in sounds.ref.

Where files live

What Path
Series sound table data/<series>/sounds.ref
Shared sounds (button, brake valve, …) sound/sounds.ref
Series wav files sound/<series>/…

Columns are tab-separated; FileName includes the .wav extension:

;Id FileName    Looped  Volume  Size    RefDist Rolloff Zone    Muffled Reverb
horn    \sound\er9e\horn.wav    true    1   5   10  0.6 train   1   outside
compressor  \sound\chs7\compr.wav   true    0.9 3.5 7   1   machineroom 1   none

For looping sounds (horn, compressor, fans) set Looped=true.

_start / _loop / _stop variants

If FileName is sound\er9e\horn.wav, the simulator looks in the content folders for:

File Role
horn_start.wav attack / spin-up
horn_loop.wav sustain (used instead of horn.wav when present)
horn_stop.wav release / rundown
horn.wav loop when _loop is missing

Same rule for compr.wav → compr_start.wav, compr_stop.wav.

Which playback profile runs depends on the duration of _start, not on the sound id.

Two profiles

The threshold is 3 seconds of _start.

Signal (horn, whistle)

_start is short (ER9E horn ≈ 0.5 s).

The simulator stitches start and loop into one buffer: the attack plays once, then only the middle loops. The join has no gap and no overlapping voices.

Action What you hear
Press _start, then the loop
Hold loop
Release loop cuts; _stop at full level, plays to the end of its wav
Press again while stop is still playing stop cuts; start again from the beginning at full level

How to author the wavs:

  • the end of _start matches the start of the loop in level and phase;
  • the end of the loop matches its beginning (otherwise a click on each cycle);
  • put the horn decay in _stop; the engine does not fade it;
  • Looped=true.

Motor (compressor, fans)

_start is long (ChS7: compressor ≈ 15 s, fans ≈ 20–56 s).

Start and loop stay separate voices. On and off are joined with a short crossfade (~0.5 s) so a long spin-up or rundown does not click.

Action What you hear
Turn on the whole _start, then the loop
Running loop
Turn off loop crossfades into _stop for ~0.5 s, then _stop plays its own envelope to the end
Turn on during rundown stop fades out, start fades in (reverse crossfade)

How to author the wavs:

  • put the full spin-up in _start;
  • put the steady drone in the base file or _loop;
  • put the long rundown in _stop (tens of seconds is fine);
  • Looped=true.

Examples

ER9E horn — signal:

horn    \sound\er9e\horn.wav    true    …

Files: horn_start.wav, horn_loop.wav, horn_stop.wav.

ChS7 compressor — motor:

compressor  \sound\chs7\compr.wav   true    …

Files: compr_start.wav, compr.wav, compr_stop.wav.

Common mistakes

  • Looped=false on a horn — the middle does not loop.
  • Horn _start longer than 3 s — the motor profile runs (crossfade on release).
  • Compressor _start shorter than 3 s — it is stitched like a horn; the long spin-up jumps into the loop.
  • Silence at the end of _start or the start of the loop — a gap at the join.
  • Horn _stop already decays and also starts quiet — the stop is almost inaudible (signal plays stop at full level immediately).