Documentation/Engine/Sound/SoundWorld

From SCS Modding Wiki
< Documentation‎ | Engine‎ | Sound
Revision as of 09:15, 18 March 2021 by Lubos.scs (talk | contribs) (Created page with "There are several types of sounds and sound effects in the sound system of the world: * 3d sound (in the world) * ambient sound * reverb effect * 3d sound on the object (prefa...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

There are several types of sounds and sound effects in the sound system of the world:

  • 3d sound (in the world)
  • ambient sound
  • reverb effect
  • 3d sound on the object (prefab)
  • animation (mover)

Sound layer in the Editor

We now have a special layer for sounds on the map (up to version 1.40). The sound layer editor is just a special mode of the map editor, which can be activated using the command line:

eurotrucks.exe -nosingle -edit -sound

There is only one object that can be placed on the map in the sound layer: "sound item". However, this object works in 3 different modes:

  • 3d sound - Displays a circular area of sound whose size is determined by the audibility limit.
  • Ambient area - Represents a user-defined area that is the source of a specified ambient sound.
  • Reverb area - Represents a user-defined area that is the source of the reverb effect.

Sound configuration for the sound layer

There are 3 configuration files (in the /base/def/wold folder):

  • sound_item_data.sii
Contains a 3d sound definition with these parameters:
sound_item_data : sound.<id token of the sound item>
{
	name: "user friendly name (editor only) in format 'sound group name/sound name' "
	sound_path: "path to the sound event"
	max_dist: maximum sound distance (should be equal to or greater than the maximum audibility of the FMOD event)
	item_color: editor item color in RGBA format (0xAABBGGRR)
}
The sound is triggered on if the actor camera is in the range of the 'sound item' object. The audibility of the sound is given only by the setting of the 3D event in FMOD.
  • sound_item_ambient.sii
Contains an ambient area definition with these parameters:
sound_item_data : ambient.<id token of the ambient sound>
{
	name: "user friendly name (editor only) in format 'sound group name/sound name' "
	sound_path: "path to the sound event"
	max_dist: maximum ambient sound distance
	item_color: editor item color in RGBA format (0xAABBGGRR)
	reverb: reverb.<id token of the reverb effect - Default reverb effect for the area.>
}
The sound is triggered when the actor camera is near the area.
The area on the map represents the 'full audibility' area of the ambient sound. The sound is automatically fade in/out beyond the edge of the area depending on the 'max distance' parameter.
The default reverb effect is applied only if there is no other reverb defined in the area.
  • sound_item_reverb.sii
Contains a reverb area definition with these parameters:
sound_item_reverb : reverb.<id token of the reverb effect>
{
	name: "user friendly name (editor only)"
	max_dist: maximum effect distance
	item_color: editor item color in RGBA format (0xAABBGGRR)
	ceiling: true/false If true the effect is activate only if camera is under the 'sound item' object (eg under a bridge, tunnel).
	decay_time: Decay Time: Reverberation decay time at low-frequencies in milliseconds.  Ranges from 100.0 to 20000.0. Default is 1500.
	early_delay: Early Delay: Delay time of first reflection in milliseconds.  Ranges from 0.0 to 300.0.  Default is 20.
	late_delay: Reverb Delay: Late reverberation delay time relative to first reflection in milliseconds.  Ranges from 0.0 to 100.0.  Default is 40.
	hf_reference: HF Reference: Reference frequency for high-frequency decay in Hz.  Ranges from 20.0 to 20000.0. Default is 5000.
	hf_decay_ratio: Decay HF Ratio: High-frequency decay time relative to decay time in percent.  Ranges from 10.0 to 100.0. Default is 50.
	diffusion: Diffusion: Reverberation diffusion (echo density) in percent.  Ranges from 0.0 to 100.0.  Default is 100.
	density: Density: Reverberation density (modal density) in percent.  Ranges from 0.0 to 100.0.  Default is 100.
	low_shelf_frequency: Low Shelf Frequency: Transition frequency of low-shelf filter in Hz.  Ranges from 20.0 to 1000.0. Default is 250.
	low_shelf_gain: Low Shelf Gain: Gain of low-shelf filter in dB.  Ranges from -36.0 to 12.0.  Default is 0.
	high_cut: High Cut: Cutoff frequency of low-pass filter in Hz.  Ranges from 20.0 to 20000.0. Default is 20000.
	early_late_mix: Early/Late Mix: Blend ratio of late reverb to early reflections in percent.  Ranges from 0.0 to 100.0.  Default is 50.
	wet_level: Wet Level: Reverb signal level in dB.  Ranges from -80.0 to 20.0.  Default is -6.
	dry_level: Dry Level: Dry signal level in dB.  Ranges from -80.0 to 20.0.  Default is 0.
}
The effect is activated when the actor's camera enters to the defined area. (Now independent on max distance.)
But the parameters of the reverb effect are adjusted slidingly over time.

Remark: Please do not modify this files if you want to add a new entry. Create in this directory a new file "<base_name>.<idofyourmod>.sii" where <base_name> is name of base file without the extension (e.g. "city" for "/def/city.sii") and <idofyourmod> is some string which is unlikely to conflict with other mod.