Sounds tool

  • This article covers the Sounds-Tool, part of the Content-Tools. It is used to import sound data.

    1 Overview

    Using the Sounds-Tool you can import sound files (only) in Wave format (*.wav), group them and export them as content elements.

    These content elements (Groups) are known as Sound sources

    These sound sources are, like all other content, packaged in a container and imported into LOTUS. You can then use and couple these sound sources in the Object & Vehicle Tool, even multiple times.

    2 Logical Sound Source Structure

    A scenery object or vehicle can use any number of sound sources. Because of this it is important to think beforehand about what sounds should be grouped into a sound source.

    The sounds within a sound source have no individual 3D coordinates; the sound source itself is placed inside the object in 3D. That means that only sounds that belong together and that have a similar spatial origin should be grouped into a sound source. Apart from that it makes sense to also only group sounds that are technically related to each other in a sound source.

    3 Where to place the sound sources?

    Because the sound sources data (*.lsd) is very independent from the remained of the vehicle data, we strongly encourage you to place these files in their own directory. This way they will be packed into a separate container.

    Attention: The Object & Vehicle-Tool can only use sound sources that are already finished and packaged in a container in one of the LOTUS Content folders!

    This means that after working on a sound, before started work (again) on a vehicle/object, you always need to click on "Save & pack" (Ctrl+P) and afterwards you need to restart the Content Tool!

    4 Variable mapping

    To ensure sound sources can be used for different object you can use the so-called variable mapping:

    The different parameters of the sound sources, e.g. the volume or playback speed, are provided with so called Mapping-IDs; these are strings that identify the associated parameter. You can also look at it this way: An ID is a "Dummy Variable". When placing the sound source in the Object & Vehicle-Tool the real variable can be mapped to this dummy variable.

    The advantage of this method is that different objects with very different scripts can all share the same sound source (as long as all needed variables are available). One object can also use multiple instances of the same sound set: a metro car with 6 doors can use an available door sound source 6 times, one for each door, and use the relevant variables for each sound set. This saves both work and loading time.

    5 Sound Parameter

    Every sound is configured using several parameters to prepare it for use in LOTUS.

    5.1 Variable that controls playing (1 = Play, -1 = Stop)

    This field can also remain empty. If you couple an integer variable, this variable controls the playback of the sound. The script can set this variable to either 1 or -1. After all relevant sounds read this updated variable it is reset to 0.

    If the variable is set to 1, the playback of the sound is started. If this is not a looped sound then the playback of the sound will start from the beginning, even if the sound was already playing.

    If the variable is set to -1, the playback of the sound will stop, irrespective of whether it is a looped sound or not.

    5.2 Master volume

    Initial volume for playback. A 1 indicates the sound will be played back at the original volume.

    5.3 Volume curves

    Every sound can be provided with one, multiple or no volume curves. Every volume curve influences the playback volume of the sound, depending on the variable of the associated variable.

    The calculation is as follows:

    For every volume curve the associated variable is read and used as input into the function. The output of the function is read and stored. At the end all stored outputs are multiplied to get the final result.

    If no sound curves are provided, the playback volume is constant.

    5.4 Distance from which the volume should decrease

    The maximum distance from the sound source in meters, at which the sound is still played with the original volume. If the user goes further away from the sound source, the volume continuously decreases. The bigger this value is, the further away this sound can be heard.

    5.5 Variable that controls the playing speed and pitch and Variable value at normal pitch (reference value)

    The Pitch variable changes the playback speed ("Pitch") of the sound.

    If this variable is equal to the reference value, the sound is played back as normal. If the variable is double the reference value then the sound is played back at double speed. In general: the playback speed is the value of the variable divided by the reference value.

    5.6 Play in loop until control variable is set to -1

    Controls what happens when the playback of a sound is completed. If this box is checked then the playback will seamlessly restart from the beginning, otherwise the playback stops.

    The sound can also have a different starting behaviour, depending on these settings. If the sound is looped then the playback start from a random point in the sound file. Setting the Play-Variable to 1 while the sound is playing has no effect. If the sound is not looped playback always starts from the beginning, also when the Play-Variable is set to 1 while the sound is still playing.

    5.7 Delay for the sound to respond to changes

    If necessary you can set the "inertia" for the volume control. This makes sure that the sound volume no longer switches instantly (thus also abruptly) to the new value. Instead the change is slowed down. The higher the number the faster this change will be. For the standard value (-1) the volume changes instantly.


    Translation kindly provided by jjasloot - Thanks a lot! :)