CCG/Kind: EngineSound

From TrainzOnline
< CCG
Revision as of 19:22, 13 September 2018 by Matthiasgose (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

KIND: ENGINESOUND

These are the locomotive engine sounds, referenced by the enginesound tag in a traincar config.txt

With the inclusion of steam in TRS, we have added additional features for engine sound support.

For diesel and electric loco's the sound is generally as-per the UTC release (described here).

Steam sound requirements are described following the diesel sound section.

ENGINESOUND - DIESEL AND ELECTRIC

Diesel enginesound Directory Structure

CCG enginesound diesel dir.jpg

Note: Diesel enginesound files (.wav) must be located in the same subfolder as the config.txt. You must ensure all custom engine sound files are named the same as those described in the example on the left.


Note: For general information on soundfiles and soundscripts for other uses see XXXXXXX



Config,txt (Diesel enginesound)

 kuid              <kuid:56113:1243>
 trainz-build            2.5
 category-class    "ZS"
 category-region   "US"
 category-era      "1980s;1990s;2000s"
 username          "testEngineSound Diesel"
 kind                    "enginesound"
 description         "Test Engine Sounds for  diesel or electric."
 thumbnails {
 0{
 image                  "thumb.jpg"
 width                    240
 height                  180
        }
 }

Sound functions for electric locomotives

Functions to better represent electric locomotive sounds have been implemented. The options are set in the config.txt file for the enginesound Kind.

For an electric locomotive, the sound may be considered a speeding up of one wave form, different from diesel or steam locomotives where different sound files are used in "steps".

The sound used is a single .wav file called engine_loop.wav and must be placed in the directory with the config.txt file. TC automatically loads the file of this name.

Normally the .wav file used is the base sound (the sound used at zero km per hour). With electric engines there should be no sound at zero speed, and the use of the isfading tag scales the volume, reducing the sound as the speed reduces to zero.

kind               "enginesound"
kuid               <kuid:523:100052>
username           "MN M7 enginesound"
speedup            4
isfading           1
isramping          0

To distinguish between usage for diesel or electric the following tag is used.

speedup This is the speed up factor.

1 = play the sound file at twice speed when the engine speed is at maximum,
2 = (default) play the sound file three times the speed when the engine speed is at maximum,
4 = play the sound file five times the speed when the engine speed is at maximum. From the above, the playing speed is seen to be the original speed plus the factor (eg 1 plus 4 = 5 times speed).

Other values may be used in the above tag.

To fade the engine sound when the locomotive decelerates or stops, the following tag is used.

isfading 1= sound fades to zero when speed is reduced, and plays no sound at zero km per hour.


isramping "0 = using a single .wav file, winds up the sound, or play the sound file faster, based on the traincar speed and tag values, used for electric locomotives,

1 = use different sound files for each "step" throttle notch, for steam and diesel locomotives.


Playing speed for the electric sound file is linked to the maximum locomotive speed set in the enginespec file, the maxpeed tag.

ENGINESOUND – STEAM

Custom steam sounds can be created for TRS. The following is a general break down of the required sounds needed and a brief description of how the sounds are used by TRS. These sound files described can be downloaded in zip format from this location: http://www.auran.com/TRS2004/downloads/contentcreation/TRS2004_Steam_Sound.zip

Steam sounds must be located in the default enginesound directory.

These files are the steam engine idling sounds played after the steam engine is stationary for 1, 2 and 3 minutes

· loco_stationary_fast.wav (after 1min)

· loco_stationary_med.wav (after 2mins)

· loco_stationary_slow.wav (after 3mins)


Note: Silent .wav files may be used for the above, for locomotives that do not use an air compressor, for example most UK locomotives.


Piston stoke sounds, played every 180 degrees revolution of the piston wheel played in sequence and repeated up to about 40 kph.

· piston_stroke1.wav

· piston_stroke2.wav

· piston_stroke3.wav

· piston_stroke4.wav


From 40 kph upwards, the following sound loop is cross-faded as the piston sounds die off. In TRS2004 the loop is pitched shifted (through code) relative to the locomotive's velocity. In TRS2006 the pitch shift is not currently functional.

· steam_loop.wav.


The general hiss from the smoke stack:

· smoke_stack_hiss.wav


Steam enginesound Directory Structure

CCG enginesound steam dir1.jpg


IMPORTANT Note 1: You must ensure all custom sound files for steam trains are named the same as those described above.

IMPORTANT Note 2: The Steam loco driving bogey is connected to the piston and physics system by adding the following tag to the bogey's config.txt: direct-drive 1

(See PB_15_bogey2 Config.txt below)

This tag MUST be included for piston and steam sounds to work.


Config.txt

kuid              		<kuid:56113:1243>
trainz-build 		2.5
category-class 		"ZS"
category-region 	"US"
category-era     	"1980s;1990s;2000s"
username          	"testEngineSound (Steam)"
kind              	"enginesound"
description      	"Test Steam Engine Sounds, based on the PB15."
thumbnails 
 {
      0
          {
          image		"thumb.jpg"
          width  		240
          height		180
          }
 }


PB_15_bogey2 Config.txt

kind 		"bogey"
kuid 		<kuid:44179:50003>
animdist 		 3.816
category-class		 "AS"
category-region	 "AU"
category-era		 "1920s;1930s;1940s;1950s;1960s"
direct-drive 		1


Return to CCG Index

Content Creator's Guide

Personal tools