Sunteți pe pagina 1din 13

Audio pipeline v1.

9
FMod is sound engine that can greatly enhance the audio compartment of our sim.
It is also very difficult and complicated to start with. That's why the AC dev team has pre-
pared and shares with the modding community a full blown Fmod project with additional in-
structions on how to work with it.

This document explains how to build a sound bank, starting from an FMod Studio
project example. Reading of the official FMod Manual and knowledge about the basic
functions of FMod Studio are required.

The FMod Studio version used is: v 1.08.12

FMod Studio works with Events and their Parameters. Some are mandatory for As-
setto Corsa in order to make the sound bank work, some are optional and depend of the
car type. For example, a Lotus 98T has no doors, horn and so on, so the related Events
can be omitted.

The project example brought to you includes all the Events supported in Assetto
Corsa, so you can make practice and experiment different methods to achieve the same
result.

The first thing to remember is that some Events work as "global", because they are
common for every car, original and modded ones. In order to make the sound set as much
customizable as possible. Many events are car specific, such as the skid sound, brake
whistle, wind and tyre rolling noise, transmission, turbo, rev limiter, traction control and so
on. Just as an example, you have the freedom to assign a different tyre squealing sample
depending of the car.
There are several ways and techniques in FMod that allow you
to achieve the same results; some are better, some are easier. It's up
to you to find the way that meets your tastes and needs, but above all,
keep it simple!
In the side picture, you can see all the global events made by our
Sound Designer.
The events are divided in three folders, for better reading and organi-
zation. Taking surfaces as an example, you can easily understand that
kerb, grass, extraturf and sand are global sounds that are applied to
all the cars in the game, even the ones made by 3rd party / modders.

The showrooms deserves a separate discussion: modders will be able


to add their own soundtrack for a new showroom. We'll see how to
achieve this, at the end of this guideline.

IMPORTANT: Please take extreme care of the names syntax and


folder structure, an error will make the game crash trying to load the
related sound bank.

The following table contains the whole list of Events, with related Parameters and short de-
scription. Rows filled with green color indicate the optional Events.

Event Name Parameters Description Range

engine_ext exterior engine sound

rpms engine rpms 0 .. as needed

throttle gas pedal position 0 .. 1

Distance (built-in) 0 .. as needed

Event cone angle


0 .. 180
(built-in)

engine_int interior engine sound

rpms engine rpms 0.. as needed

throttle gas pedal position 0 .. 1

bodywork car body sound

susp_travel_speed suspension travel speed 0 .. 1

gear_ext exterior gearshift sound

state down / up 0/1

gear_int interior gearshift sound

state down / up 0/1

wind wind noise

speed car speed 0 .. as needed

air_pressure air pressure on the car 0.8 .. 1.5


Event Name Parameters Description Range

wheel tyre rolling noise

brake brake pedal position 0 .. 1

speed car speed 0 .. as needed

inflation tyre inflation (puncture) 0 .. 1

tyre skid sound for game-


skid_int
play views
tyre skid soud for track
skid_ext
camera views (F3)

gear_grind sound when miss shift

backfire_ext exterior backfire

throttle gas pedal position 0 .. 1

backfire_int interior backfire

throttle gas pedal position 0 .. 1

horn car horn

door car doors

state close / open 0/1

tractioncontrol_ext exterior TC sound

decay

tractioncontrol_int interior TC sound

decay

transmission transmission sound

drivetrain_speed drivetrain speed 0 .. as needed

throttle gas pedal position 0 .. 1

turbo turbo sound

boost boost (in bar) 0 .. as needed

bov blow off valve pressure 0 .. 1

limiter rev limiter sound

decay

Please note: FMod's built-in parameters are always optional and are well explained in the
official FMod manual.
SOUND EMITTERS POSITION
In the following picture, each emitter position related to the car is described. The Tatuus
FA01 is taken as example:
engine_int (front position)
engine_ext (front position)

wheel wheel
skid_int skid_int
skid_ext skid_ext
surface surface

(center of gravity)
horn
bodywork
wind

wheel wheel
skid_int skid_int
skid_ext skid_ext
surface surface

backfire_int (0,5 meters behind the rear axle) (0,5 meters ahead of the rear axle)
backfire_ext (0,5 meters behind the rear axle) engine_int
engine_ext
gear_int
gear_ext
limiter
tractioncontrol_int
tractioncontrol_ext
transmission
turbo
Before proceeding with the project, please define the engine position through the
related parameter located in tatuusfa1\data\sounds.ini file.

[ENGINE]
POSITION=rear ; front / rear

The above is required in order to set the correct emitter position regarding the en-
gine sounds. Important note about the “rear” engine emitter position: as reported in the pic-
ture above, it is located 0,5 meters ahead of the rear axle, in order to cover reasonably
both cases of mid-engine and rear-engine vehicles.

Let's start working on the FMod Studio project. The ex-


ample in the SDK provides the Tatuus FA01 project, with trans-
mission and turbo noises emphasized on purpose and with fic-
tional backfires, so you can experiment all the events available
in Assetto Corsa (exception made for the gear grinding, as this
car has a semi-automatic gearbox).

In the Event list there's a parent folder named cars that is


mandatory in order to make the sound bank working once built.

It is necessary that the car's events folder is equal to the car


folder name located in Assetto Corsa/content/cars path.

For a better understanding, we suggest to start from the interior


engine samples. The operation is very easy: each sample is
triggered in the rpms parameter and needs an autopitch auto-
mation related to their own natural rpm reference. Volume be-
tween engine load and coast is made by a throttle volume
curve.

The other events basically work in the same way. Experiment


with the provided example project, the operation is very intu-
itive.

Please DON'T TOUCH priorities and polyphony of the events. Wrong settings could
end in disappearing or stuttering sound.
The following picture shows how the engine_int event is structured. There are two
tracks, named "fa01 load" and "fa01 coast". The first one contains the sound samples
when the gas pedal is pressed, the second one when the gas pedal is off.
As reported in the first legend, samples are triggered in the rpms parameter, in the
timeline you can see the rpms range. We suggest to set a range double than the real rpm
limit of the car, in order to hear the sound even when overrevving. The crossfade between
load and coast conditions is made by the volume curves in the throttle parameter.

TRACK CAMERAS SOUNDS


A detailed mention is necessary when using track cameras (F3 view): the dis-
tance attenuation range of some exterior sounds is multiplied by a value named DIS-
TANCE_SCALE, expressed in meters, located in the following path:

Assetto Corsa/system/cfg/camera_track.ini

[CAMERA_SETTINGS]
DISTANCE_SCALE=7 ; PLEASE DON’T CHANGE IT
UPWARD_OFFSET=0
CAMERA_WOBBLING_SPEED=0.001
CAMERA_WOBBLING_STRENGTH=0.04 located

This is for gameplay purposes: imagine you're racing against 10 opponents with their own
engine_ext playing. If the distance scale of engine_ext is too short (e.g. from 1 to 20 me-
ters), the sound will be not audible from the track cameras. If it's too large (e.g. from 1 to
750 meters), opponents will be audible from far away while you're racing against them.
With this "trick" you can find a good compromise about exterior sounds volume, in game -
play cases (driving among a pack of opponents) and watching a replay with many cars in-
volved.

The events that interact with the multiplier above are the following:
• engine_ext
• backfire_ext
• tractioncontrol_ext
• skid_ext
• limiter
• wheel
• wind

Note: the DISTANCE_SCALE multiplier is a global parameter, so its value is not


configurable per car.

Note: the above multiplier works only in track cameras and free camera view (F3-
F7) and only with the Events reported above. For any other exterior sound event,
please use the built-in distance scale and attenuation curves of the FMod deck.

This means that if you're using the car cameras (as said before, the F1 views and other
"car attached" cameras), the multiplier is switched off (technically, it's always set to 1 by
code) and you can manage the distance scale and volume attenuation of the above events
using the original 3d panner.

Back to the engine_ext and its 3d panner (picture above) of the example project, the maxi-
mum volume is reached at 6 meters and the minimum is set at 350 meters, for gameplay
cameras (F1 or F6).

Switching to track/free cameras (F3 or F7), those values are multiplied by the above DIS -
TANCE_SCALE parameter, so the resulting distance range is:

6 x 7 = 42
350 x 7 = 2450

This means that switching to track cameras view, the maximum volume is reached
when the sound emitter (the car engine) is at 42 meters far (and below) from the sound lis -
tener (the camera position). Following the same reasoning, the volume goes to the mini-
mum (e.g. the event channel is released) when the car is 2450 meters far.
TURBO
Turbo interaction between sound and physics didn’t change since the previous ver-
sion.

PARAMETERS IN sounds.ini
For technical reasons and easier sound management, some events get external in-
teraction with sounds.ini file located in Assetto Corsa/content/cars/car_name/data folder.

The whole [SKID] section is deprecated and is not needed anymore.

[SKIDS]
ENTRY_POINT=0.35 ; 0 .. 1
MIX_VOLUME=0.7 ; 0 .. 1
PITCH_BASE=0.58 ; deprecated
PITCH_GAIN=0.17 ; deprecated

[BACKFIRE]
MAXGAS=0.4 ; 0 .. 1
MINRPM=3500
MAXRPM=15000
TRIGGERGAS=0.8 ; 0 .. 1

[ENGINE]
POSITION=rear ; front / rear

*********************** PARAMETERS EXPLANATION ***********************

[SKIDS]
ENTRY_POINT: ;related to the tyre load. Lowering the value will make the skid
sound audible even with a minimum tyre load

MIX_VOLUME: ;overall sample volume

[BACKFIRE]
MAXGAS: ;backfires are not played if input gas is > maxgas
MINRPM and MAXRPM: ;range within which the backfires are audible
TRIGGERGAS: ;trigger point for backfires, related to throttle input

[ENGINE] ;optional: if not present, the engine emitter is on the CoG


POSITION: ;sound emitter position (refer to emitters position picture above)
BUILDING THE SOUND BANK

ADVISE: PLEASE DON’T MODIFY THE EXISTING


SOUND SET EXAMPLE IN THE PROJECT, BUT CREATE
A NEW FOLDER UNDER “CARS” EVENT FOLDER.
RIGHT CLICK ON “tatuusfa1” folder, select “duplicated”
and start your work on the new generated folder.
This will make different “GUIDs.txt” strings, so modders
will not overwrite sounds each other as happened in the
previous version due of the same “GUIDs.txt” strings.

In order to make your project working in game, it is


necessary to create and build a sound bank. The
creation of a bank, as reported in the FMod manual,
is very simple: select all the events of your new car,
open the context menu with right click, select "As-
sign to Bank", then "New Bank" and confirm.

Remember that the bank needs to have the same


name of the car folder.

In the “Banks” tab, the result will be the following:


The next step is setting the proper Project Platform: go in the “Edit” menu and se-
lect “Preferences”. Check that the “Desktop” platform is configured like the picture below:

Open the File menu and select "Export GUIDs...". The result file "GUIDs.txt" is lo-
cated in the "Build" subfolder of the FMod project.

Now is time to build the sound bank: open the File menu (or right click on the re -
lated car bank in the “Banks” tab) and select "Build..." and the building process will start.
The bank file will land in the "Build/Desktop" subfolder of the FMod project.

Please note: a .strings.bank file is also generated, but it is not needed unless you
need to use the FMod profiler in order to monitor channels.
EDITING THE GUIDs.txt
The generated “GUIDs.txt” contains ALL the events, the mixing groups and other settings
of the FMod project, but only the ones related to your car (plus the “bus” lines) are needed.
Please open the file with a text editor and remove the unneeded lines. At the end, it should
appear like this:

As you can see, all the lines related to “showroom”, “surfaces”, “collisions” and so on were
removed because it is supposed that they are not modified by the modder. Done that,
please save the file.

Copy both files (the modified "GUIDs.txt" and "your_car.bank") in the related "sfx" folder of
the car and check that the new sound works in game.
MIXER
Note: please keep the original mixer structure for your au-
dio project, otherwise sound will not work in game. Don't
remove any of the existing mixer groups and don't
change their name.

Fmod's mixing is very powerful, but at the same time it


can be painful as the project grows up and becomes
complicated. Try to keep it as simple as possible. We al-
ready provide the necessary Mixer Groups in the exam-
ple project. As advised above, DON'T CHANGE THEM.

Looking the picture on the side, it is straight-forward that


you can change every single group volume by just se-
lecting it and tweak the related volume slider. This is very
useful if your project contains multiple cars. According to
this design, an interesting idea is to distinguish wheel
and wind noise between open and closed cockpit/wheels
cars. Since the provided one is an open car, its wind and
wheel events volumes are managed in the appropriate
mixer groups. If you are building a closed cockpit car,
you can assign its “wheel” and “wind” events to the
proper “grp_wheel_closed” and “grp_wind_closed” mix-
ing groups, in order to manage both volumes separately.

Surfaces, showroom and other “common” events are out


of any group (so they are in the "Master Group").

When you make your project, please double check that


the events are routed in the right mixer group as reported
in picture. This is very important.
REVERB
In the new Fmod project we removed the “snapshot” reverb, because it led to
episodes of bad implementation by some modders, making the whole sound stage sound-
ing like in a church using the track cameras. We reworked the whole code and when you
drive your car in a reverb zone, now the reverb is made by exterior sounds only (as ex -
pected in real life). Of course, skilled modders can add snapshots to their own project if
needed. Please refer to the Fmod official manual for further info.

VCAs
As reported in the official FMod manual: "VCAs are an efficient way of grouping
sounds for the purposes of volume control and exist in parallel with the normal signal
chain (..) The most common use situation for VCAs is as master controls within a game
project main menu setup. Sound Effects, Dialogue and Music are excellent examples of
typical VCA grouping in a game project.
VCAs can also be very useful for general project balancing and level mixing as they pro-
vide a quick way of grouping and adjust sound Events without affecting the signal chain in
any way".
We left some VCAs just as example, but the project stucture is very simple so they
are not needed at all and you can use group volumes as well.

CUSTOM SHOWROOMS SOUNDTRACKS


The procedure is exactly the same of building a car bank. As reported in the first
picture, remember to create an event folder named "showrooms" and a new event with the
same name of the showroom folder in the Assetto Corsa game folder. Put the soundtrack
in the timeline and set a region loop, then proceed to build the GUIDs and bank files.

Note: for showroom banks, please set the format to Vorbis.

S-ar putea să vă placă și