<Sound FileName="HangarDoor.wav" Loop="Yes" MinDistance="20" MaxDistance="500"/>
  • FileName=”XXX.wav”: String denoting the file in the “sound” subfolder of the SimObject container.
  • Loop=”XXX”: String {Yes,No}. Flag to set the sound the be played in a loop or not.
  • MinDistance=”XX”: Integer, DirectSound parameter. The distance from the model’s origin at which the sounds starts to attenuate in meters.
  • MaxDistance=”XX”: Integer, DirectSound parameter. The distance from the model’s origin at which the sound is muted when moving further away.
  • NONE

The Sound node is used as a subnode of the TriggerableAnimation node. The engine supports a forward animation sound and a reverse animation sound: Just provide a second Sound subnode with a different wav file. The first sound is used as forward animation sound, the second sound as the reverse animation sound. If you only provide one sound, it will be used for both directions.

<TriggerableAnimation ... >
   <Sound FileName="Forward.wav" Loop="Yes" MinDistance="20" MaxDistance="500"/>
   <Sound FileName="Reverse.wav" Loop="Yes" MinDistance="20" MaxDistance="500"/></TriggerableAnimation>

The sound is placed as an omnidirectional source at the model’s origin. It is emitting as soon as the animation is started. It can be played in a loop or just once. In any case, it will stop when the animation reaches the end keyframe.

The DirectSound parameters somewhat control the power capability of the sound. Example: if the MinDistance is set to “20”, then the sound is at maximum volume from 0 to 20m from the origin, and then start to attenuate (double distance = half volume). So if the user is at 40m the sound is at half volume, at 80m at quarter volume etc. If the user travels beyond the MaxDistance, the sound will mute, whatever the volume will be at the MaxDistance (sound may still be audible, depending on the MinDistance factor).

As this definition of power is directly taken from the DirectSound API, it is best to play around with the parameters to find a suitable solution in FSX.