Docs / Reference / Content formats
Sounds
A sound.cfg lists a vehicle's or object's sounds and when they play. It lives in the
sound\ folder, named by [sound] in the .bus, .ovh or .sco.
[loopsound]
[email protected]
44100
engine_n
600
1
[conditionSingle]
engine_n
200
3
[sound]
door_close.wav
1
[trigger]
ev_doorclose_0| Keyword | Parameters |
|---|---|
[sound] |
File, volume. A number instead of a file plays the file a trigger hands over (announcements) |
[loopsound] |
File, sample rate, pitch variable, its reference value, volume |
[next_random] n a b |
The next entry is used only when the vehicle's random number n lies in [a, b) |
[3d] x y z range |
Positioned sound with a range |
[dir] x y z |
Direction |
[noloop] |
Play once when the conditions start to hold |
[important], [checkloading], [onlyone] |
Flags |
[viewpoint] n |
Where it is heard: 1 the player's bus from outside, 2 from its cab, 4 other vehicles (a mask; none: everywhere) |
[volcurve] variable + [pnt] x y |
Volume curve over a variable (linear, held at the ends) |
[conditionSingle], [conditionInt] |
Variable, value, then relation |
[conditionBool] |
Variable, value (equality) |
[trigger] name |
Play when this trigger fires |
Relations: 0 <>, 1 =, 2 <, 3 >, 4 <=, 5 >=. So engine_n 200 3 means "the engine
runs" and velocity 2 2 means "standing".
How an entry plays:
- With a
[trigger]it plays once each time the trigger fires, from the start and never looped, without looking at its conditions. - Without a trigger it loops for as long as its conditions hold and it is audible (horn, rain,
compressor).
[sound]and[loopsound]both loop by default. [noloop]makes it play once when its conditions start to hold.- A
[loopsound]plays at|pitch variable| · rate / referenceHz and is silent below 100 Hz. - A
[3d]sound fades withmin(range / distance, 1). A sound without[3d]is heard at the same level everywhere. - The rear section of an articulated bus has its own
[sound]and plays it on the shared scripts' triggers and variables.
[3d]sounds carry no speaker of their own: they are heard from where the sound object stands, not from the whole bus.On a device opened with six channels and the option 5.1 sound (five speakers) on (
audio_surround=1), each sound is placed on the five speakers it faces - front left/right 30° to either side of the view, centre ahead, back left/right 110° - and shares with its neighbour only when it lies between two of them.The sub-woofer gets nothing of it: the receiver's bass management feeds it. Off (the default, and on two speakers whatever the option),
[sound_stereo]pans the sound across the pair as OMSI 2 does.
Outside sounds heard in the cab. The player's bus's outside entries ([viewpoint] without 2) come in at
Snd_OutsideVol of their volume, as in OMSI.
Traffic heard from the cab is at
0.2 + Snd_OutsideVol. openOMSI also filters the treble out of the bus's outside sounds: a
low-pass at about 500 Hz with everything shut, opening up to the full range at
Snd_OutsideVol 0.95.
Walking through a door, cab and street sounds are mixed by how far inside the bus the eyes are (0.4 m in: all cab).
Radio variables. OMSI plays no music itself. Snd_Radio (the cassette player of the stock
buses), SndExt_Radio, SndVol_Radio and SndExt_RadioPlaylist (the Sound Extension plugin)
are variables that plugins read. openOMSI plays internet stations for them; see
Radio and the map's radio.cfg format there.
Something wrong or missing? Fix it on GitHub or open an issue.