Registering new sounds to buses.

Das Forum befindet sich im reduzierten Betrieb. Die Addon- und Supportforen bleiben weiterhin verfügbar.
Bitte beachte, dass OMSI nicht mehr weiterentwickelt wird. Ein Teil der Entwickler widmet sich inzwischen der Entwicklung eines neuen Simulators. Weitere Informationen zum LOTUS-Simulator findest Du hier.
  • Hello,



    I was wondering if it's possible to add (not replace) new sounds to a bus in omsi and was thinking how to do so.



    The sound which I am interested in adding is a turbo whine from gear shifting.



    An example of the Turbo sound:


    [Externes Medium: https://youtu.be/wbR2wqcoNuI]


    Getting the sound is no issue as I have a proper recorded one from a real bus.



    If anyone can help me out with a few tips on how to register new sounds I would very much appreciate it!

  • Bene05

    Hat das Thema freigeschaltet
  • Hello,


    There's unfortunately no centralized, all-encompassing documentation resource on how all facets of sound configuration work, but rather bits and pieces, most of which in German, scattered around the boards and wiki, as well as comments in the sound_xxx.cfg files of the standard OMSI MAN SD vehicles.


    As a disclaimer, I hardly ever mess with sounds, so I'm myself not well-versed on the subject at all. All I can do is help dig up and consolidate some starting points for you, originally written by others. Take what I write with a grain salt and try out yourself what works and what doesn't.


    So first of all, sounds are configured in the sound.cfg file referenced via the [sound] and [sound_ai] directives found in each .bus-file.


    Within each sound configuration file, one can declare an arbitrary number of sounds. The only runtime limit is the value assigned to the "Max. number of sounds" setting of the game.


    Within the .cfg-files, each sound is represented by a [sound] or [loopsound] directive. The former are by default played distinctively, while the latter are by default played iteratively ("looped"), and can be parameterized with a sample rate and pitch.


    Further configuration available per sound-entry includes:

    • [3d] and [viewpoint], for specifying the sound's "origin", range, and perspective(s) (inside, outside, unfocused vehicle, or combinations thereof) it applies to.
    • [noloop], for, uhm... I've no idea -- preventing looping altogether? Or preventing the next playback iteration from beginning prior to the current one having ended?
    • [conditionSingle] and [trigger], for respectively either actively triggering playback from the .cfg, based on vehicle state (script or OMSI variables), or providing a callback mechanism for scripts to trigger playback with, when deemed appropriate.
    • [volcurve], for fine-tuning sound volume (supposedly also pitch?) based on piecewise-linear translation of vehicle state (script or OMSI variables
    • [next_random], for, I honestly have no idea.


    Most of the directives outlined above are covered in more detail in this thread. For scripting primitives, see here.