Difference between revisions of "Documentation/Engine/Sound"
(→Sound documentation) |
|||
(14 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
The FMOD® Studio 2.01.05 version is currently in use (from 1.39 version). | The FMOD® Studio 2.01.05 version is currently in use (from 1.39 version). | ||
− | ''See FMOD documentation ([http://www.fmod.com www.fmod.com]) to better | + | ''See FMOD documentation ([http://www.fmod.com www.fmod.com]) to get a better understanding of the sound system.'' |
== Sound and Sound Bank(s) == | == 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 | + | 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 built by FMOD Studio.<br> |
− | 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. | + | FMOD Studio builds the "[bank name].bank" file for each bank in the sound project. It is a collection of the Events and Parameters used for the sound playing in the game. |
== Master Bank == | == Master Bank == | ||
− | Master Bank is primary sound bank of the sound system. There are no Events in the bank. | + | Master Bank is the primary sound bank of the sound system. There are no Events in the bank. |
'''The Master Bank defines:''' | '''The Master Bank defines:''' | ||
Line 25: | Line 25: | ||
* The sound buses<br>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 one of the buses registered in the Master Bank. Users 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. | * The sound buses<br>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 one of the buses registered in the Master Bank. Users 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<br>The project mixer consists of a number of interconnected buses. Connection between the audio buses describe the sound event flow through the sound system. | * Mixer and Routing<br>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<br>An event contains and is primarily composed of tracks and parameters. Some parameters are defined in the master. | + | * Global Parameters<br>An event contains and is primarily composed of tracks and parameters. Some parameters are defined in the master. These 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 so: '''Never change the Master Bank!''' | The Master Bank is a fundamental building block of the sound system so: '''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. | + | Only if you are absolutely sure what you are doing and you are rewriting all the sounds of the game you can change it. |
== Sound definition == | == 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'''.<br> | + | A common sound in game is the '''Event''' in the FMOD Studio project. Each object (bank, bus, event, parameter, etc.) used by the FMOD system has a unique identifier - '''GUID'''.<br> |
(''GUID is something like this: {1315eda7-1829-4dd8-9d1a-176f65637ab2}'') | (''GUID is something like this: {1315eda7-1829-4dd8-9d1a-176f65637ab2}'') | ||
− | The sound system | + | The sound system uses GUIDs internally for the processing objects. It's very important. If you delete an object in the sound project (bus, event, etc.) and create a new object even with the same name, it will be a different object because the object has a different GUID. |
FMOD Studio exports GUIDs to the txt file. | FMOD Studio exports GUIDs to the txt file. | ||
Line 45: | Line 45: | ||
The game uses two ways to define usage of sound object: | The game uses two ways to define usage of sound object: | ||
# Direct 'sound id':<br>"Sound id" is string in format "[bank filename]#[event name]". Where [bank filename] is file of the bank relative to the game "base" folder and [event name] is name of the event in the FMOD Studio project.<br>Example: ''"/sound/ui/ui.bank#click"'' | # Direct 'sound id':<br>"Sound id" is string in format "[bank filename]#[event name]". Where [bank filename] is file of the bank relative to the game "base" folder and [event name] is name of the event in the FMOD Studio project.<br>Example: ''"/sound/ui/ui.bank#click"'' | ||
− | # Sound reference file:<br>Sound reference file is used as link for the sound specification. It uses simple path to the soundref file (e.g. ''"/sound/ui/ui_click.soundref"''). | + | # Sound reference file:<br>Sound reference file is used as link for the sound specification. It uses a simple path to the soundref file (e.g. ''"/sound/ui/ui_click.soundref"''). |
== Sound reference file == | == Sound reference file == | ||
− | We prefer and we | + | We prefer and we recommend to use sound reference files. |
* There are more possibilities to configure sound. | * There are more possibilities to configure sound. | ||
* It is easier to change / modding individual sounds. | * It is easier to change / modding individual sounds. | ||
− | |||
− | Soundref file is text file (with UTF-8 encoding) | + | '''Sound reference file structure:''' |
+ | |||
+ | Soundref file is a text file (with UTF-8 encoding). | ||
+ | * Its contents are a 'sound id' on one line with following format: source="[bank filename]#[event name]". | ||
+ | * There is possibility in the file to change 3D placement of the sound relative to the default position. Format is as follows, on a separate line: "position_offset=-left/+right;-down/+up;-front/+back" (in meters). | ||
+ | <br>Example of content of the file ''"ui_click.soundref": | ||
+ | <code>source="/sound/ui/ui.bank#click"''</code> | ||
== Sound documentation == | == Sound documentation == | ||
Line 62: | Line 67: | ||
* (WIP) Global parameters | * (WIP) Global parameters | ||
* [[Documentation/Engine/Sound/TruckEngine|Sounds - Truck Engine]] | * [[Documentation/Engine/Sound/TruckEngine|Sounds - Truck Engine]] | ||
− | * | + | * [[Documentation/Engine/Sound/TruckTransmission|Sounds - Truck Transmission and Retarder]] |
− | * ( | + | * [[Documentation/Engine/Sound/TruckChassis|Sounds - Truck Chassis]] |
− | * | + | * [[Documentation/Engine/Sound/TruckCabin|Sounds - Truck Cabin (horns and noises)]] |
+ | * [[Documentation/Engine/Sound/TruckCabinFiltering|Sounds - Truck Cabin Filtering (in/out, windows)]] | ||
+ | * [[Documentation/Engine/Sound/TruckRemote|Sounds - Remote Truck (multiplayer)]] | ||
* (WIP) Sounds - Truck Interior | * (WIP) Sounds - Truck Interior | ||
− | * | + | * [[Documentation/Engine/Sound/Tires|Sounds - Tires]] |
* (WIP) Sounds - Collisions | * (WIP) Sounds - Collisions | ||
* (WIP) Sounds - Traffic | * (WIP) Sounds - Traffic | ||
− | * | + | * [[Documentation/Engine/Sound/SoundWorld|Sounds - World]] |
* (WIP) Sounds - Game UI and Music | * (WIP) Sounds - Game UI and Music | ||
* [[Documentation/Engine/Sound/Modding|Modding sounds]] | * [[Documentation/Engine/Sound/Modding|Modding sounds]] | ||
* [[Documentation/Engine/Sound/Downloads|Downloads (templates, samples)]] | * [[Documentation/Engine/Sound/Downloads|Downloads (templates, samples)]] |
Revision as of 13:13, 2 August 2023
Contents
Note: The sound system and current pages are in 'work in progress' state. We will 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.01.05 version is currently in use (from 1.39 version).
See FMOD documentation (www.fmod.com) to get a better understanding 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 built by FMOD Studio.
FMOD Studio builds the "[bank name].bank" file for each bank in the sound project. It is a collection of the Events and Parameters used for the sound playing in the game.
Master Bank
Master Bank is the primary sound bank of the sound system. There are no 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 one of the buses registered in the Master Bank. Users 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. These 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 so: Never change the Master Bank!
Only if you are 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 the FMOD system has a unique identifier - GUID.
(GUID is something like this: {1315eda7-1829-4dd8-9d1a-176f65637ab2})
The sound system uses GUIDs internally for the processing objects. It's very important. If you delete an object in the sound project (bus, event, etc.) and create a new object even with the same name, it will be a different object because the object has a different GUID.
FMOD Studio exports GUIDs to the txt file.
- Use FMOD Studio menu command: File / Export GUIDs...
- There is new file GUIDS.txt in the "build" subfolder of the project main folder.
- The file has to be renamed to "[bank filename].guids" and has to be placed next to "bank" file. It's a "dictionary" between names of the objects in the bank and their GUIDs.
The game uses two ways to define usage of sound object:
- Direct 'sound id':
"Sound id" is string in format "[bank filename]#[event name]". Where [bank filename] is file of the bank relative to the game "base" folder and [event name] is name of the event in the FMOD Studio project.
Example: "/sound/ui/ui.bank#click" - Sound reference file:
Sound reference file is used as link for the sound specification. It uses a simple path to the soundref file (e.g. "/sound/ui/ui_click.soundref").
Sound reference file
We prefer and we recommend to use sound reference files.
- There are more possibilities to configure sound.
- It is easier to change / modding individual sounds.
Sound reference file structure:
Soundref file is a text file (with UTF-8 encoding).
- Its contents are a 'sound id' on one line with following format: source="[bank filename]#[event name]".
- There is possibility in the file to change 3D placement of the sound relative to the default position. Format is as follows, on a separate line: "position_offset=-left/+right;-down/+up;-front/+back" (in meters).
Example 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
- Sounds - Truck Transmission and Retarder
- Sounds - Truck Chassis
- Sounds - Truck Cabin (horns and noises)
- Sounds - Truck Cabin Filtering (in/out, windows)
- Sounds - Remote Truck (multiplayer)
- (WIP) Sounds - Truck Interior
- Sounds - Tires
- (WIP) Sounds - Collisions
- (WIP) Sounds - Traffic
- Sounds - World
- (WIP) Sounds - Game UI and Music
- Modding sounds
- Downloads (templates, samples)