Documentation/Engine/Sound

From SCS Modding Wiki
< Documentation‎ | Engine
Revision as of 13:58, 6 March 2020 by Lubos.scs (talk | contribs) (Sound documentation)

Jump to navigation Jump to search

WARNING !

The sound system and current pages are in 'work in progress' state. We continuously update content of the site and the audio data structures.


FMOD®

The FMOD® system is now (from 1.37 version) used as a core sound engine in the game.
The FMOD® Studio 2.00.07 version is currently in use.

See FMOD documentation (www.fmod.com) to better understand of the sound system.

Sound and Sound Bank(s)

Each sound is represented by the sound Event. An Event is an instanceable sound unit of the FMOD Studio project.
All sounds/events are provided by sound banks. The final sound banks are builded by FMOD Studio.

FMOD Studio builds the "[bank name].bank" file for each bank in the sound project.
It is collection of the Events and Parameters used for the sound playing in the game.

Master Bank

Master Bank is primary sound bank of the sound system.
There are not any Events in the bank.

The Master Bank defines:

  • The sound buses
    Events in FMOD Studio do not exist in a vacuum. Their output is routed into the project mixer.
    The Events have to be routed to the some bus registered at the Master Bank.
    User can set the sound volume and mute state in the application settings for each bus which is used as a routing target for sound events.

  • Mixer and Routing
    The project mixer consists of a number of interconnected buses. Connection between the audio buses describe the sound event flow through the sound system.

  • Global Parameters
    An event contains and is primarily composed of tracks and parameters.
    Some parameters are defined in the master. This parameters are global and can be used for Automation and Modulation of events across all banks.


The Master Bank is a fundamental building block of the sound system.
Never change the Master Bank!
Only if you absolutely sure what you are doing and you are rewriting all the sounds of the game you can change it.

Sound definition

A common sound in game is the Event in the FMOD Studio project.
Each object (bank, bus, event, parameter, etc.) used by FMOD system has unique identifier - GUID.
(GUID is something like this: {1315eda7-1829-4dd8-9d1a-176f65637ab2})

The sound system use GUIDs internally for the processing objects.
It's very important. If you delete object in the sound project (bus, event, etc.) and create new object even with the same name it will be different object because the object has a different GUID.

FMOD Studio exports GUIDs to the txt file.

  1. Use FMOD Studio menu command: File / Export GUIDs...
  2. There is new file GUIDS.txt in the "build" subfolder of the project main folder.
  3. The file has to be renamed to "[bank filename].guids" and has to be placed next to "bank" file.

This file is "dictionary" between names of the objects in the bank and their GUIDs.

Sound definition
The game use two ways how to define using of sound object:

  1. Direct sound id
    "Sound id" i string in format "[bank filename]#[event name]".
    [bank filename] is file of the bank relative to the game "base" folder.
    [event name] is name of the event in the FMOD Studio project.
    Sample: "/sound/ui/ui.bank#click"
  2. Sound reference file
    Sound reference file is used as indirection for the sound specification.
    It is simple path to the soundref file (sample: "/sound/ui/ui_click.soundref").
    Soundref file is text file (UTF-8) contents 'sound id' on the separate line at the format: source="[bank filename]#[event name]".
    Sample of content of the file "ui_click.soundref": source="/sound/ui/ui.bank#click"

Sound documentation

  • Audio buses, routing and mixer
  • (WIP) Global parameters
  • Sounds - Truck Engine
  • (WIP) Sounds - Truck Retarder
  • (WIP) Sounds - Truck Effects
  • (WIP) Sounds - Truck Noise
  • (WIP) Sounds - Truck Interior
  • (WIP) Sounds - Tires
  • (WIP) Sounds - Collisions
  • (WIP) Sounds - Traffic
  • (WIP) Sounds - World
  • (WIP) Sounds - Game UI and Music
  • Modding sounds