Procedural Engine Sound
Procedural Engine Sound synthesis is achieved through use of the Graph Editor. The Graph Editor is a pre-release feature of Trainz. It has been discussed publicly in the TrainzDev forums and is summarised on this page, however users should understand that no release schedule has been provided for this feature. All discussions and details are speculative in nature and may not accurately reflect the final form of this feature.
This feature is only usable within the Graph Editor for now, however as development continues it will obviously be possible to use the result from within the game environment as well.
To create a sound synthesiser graph, select an existing Engine Sound asset and open it in the Graph Editor. The following steps allow you to create an extremely trivial synthesiser:
- Create a new "Sample" node near the top left of the graph panel.
- Edit the "WAV File" property on the "Sample" node to "idle 1.wav" (it is assumed that your Engine Sound asset already contains this file).
- Create a new "Constant" node near the top right of the graph panel.
- Edit the "Constant" property of the "Constant" node to "1.0".
- Add a "Sampler" node in the center of the graph panel.
- Connect the "Sample" node output to the left input of the "Sampler" node. This determines the input waveform for the sampler.
- Connect the "Constant" node output to the right input of the "Sampler" node. This determines the playback rate for the sampler.
- Add an "Output" node at the bottom of the graph panel.
- Connect the "Sampler" node output to the "Output" node input.
At this point, you should begin to hear the idle sound playing. You can adjust the "constant" value to vary the playback rate of the sample. You should adjust your system volume (outside Trainz) to a comfortable level since you're going to be hearing a lot of repeating (and sometimes uncomfortable) sounds while editing the graph. You can also temporarily disconnect the sound output by clicking on the input connector of the "Output" node for some peace and quiet while making changes. Any changes you make to the graph will take effect immediately.
Since there are no true external inputs in the editing environment, you can simulate any inputs (such as throttle notch, or train velocity) by creating "Constant" nodes and adjusting their values on demand.