Difference between revisions of "Sound"

Difference between revisions of "Sound"

From BeamNG
(Ambient Sounds)
(Ambient Sounds)
Line 233: Line 233:
{| class="wikitable sortable"
{| class="wikitable sortable"
|+ Sortable table
! scope="col" | Alphabetic
! Fruit  !! Price
! scope="col" | Numeric
! scope="col" | Date
! scope="col" class="unsortable" | Unsortable
| d || 20 || 2008-11-24 || This
| Apples  || £0.95
| b || 8 || 2004-03-01 || column
| Oranges || £0.85
| a || 6 || 1979-07-23 || cannot
| Pears  || £1.15
| c || 4 || 1492-12-08 || be
| Purple mangosteen || £1.05
| e || 0 || 1601-08-13 || sorted.

Revision as of 09:16, 24 August 2017

Since version 0.10.0 we are using FMOD as the main audio engine in our game.

Vehicle Sounds

Accompanied by the sound update you're able to create sound sets per engine instead of per vehicle.


Thus we introduced another jbeam section called soundConfig. This section needs to be in your engine jbeam and will give you control over several parameters which determine the behaviour of your sound files in-game.

Following an example of a soundConfig section:

    "soundConfig": "soundConfig",
    "soundConfig": {
        "sampleName": "V8_2",
        "mainGain": -18,
        "maxLoadMix": 0.6,
        "minLoadMix": 0,
        "eqLowGain": -5,
        "eqLowFreq": 150,
        "eqLowWidth": 0,
        "eqHighGain": -5,
        "eqHighFreq": 6000,
        "eqHighWidth": 0,
        "eqFundamentalGain": -15,

Here are some of the parameters which you can define in such a section and a short explanation of them:


Creates the link between this sound config and the sfxBlend2D file. We'll talk about the blend file in the next section.


Defines the volume of the sound. The value of the parameter is between -30 and +10 with dB as the unit. The default value is 0dB. One perceives the difference from 0dB to +10dB as double the volume. Also a difference of +/- 2db is just about to be a volume change.

eqLowGain, eqLowFreq, eqLowWidth, eqHighGain, eqHighFreq and eqHighWidth:

eqLow and eqHigh allow for more custom engine sound modifications. The target frequency can be set with eqLowFreq and eqHighFreq. This is where the sound change will happen. eqLowGain and eqHighGain define the amount of boost or reduction for that target frequency. Those two parameters can be positive or negative with a range from -30dB to +30dB. The bandwidth can be set with eqLowWidth and eqHighWidth. The higher that value, the more narrow the band is. Low values also influence frequency content that is slightly below and above the target frequency.

lowCutFreq and highCutFreq:

Can be used to remove the low frequencies/bass of the engine sound. In audio terms, this parameter defines the cutoff frequency of a high pass filter. The higher the value, the more audio content below this threshold gets reduced. For example, if eqLowFreq is set to 100, all frequencies below 100Hz get reduced. The default value of 20Hz has no audible effect. Resonable values for this parameter can reach from 20Hz to 200Hz.

This is the counterpart of lowCutFreq. With this parameter, the high frequencies of the engine sound can be reduced. It defines the cutoff frequency of a low pass filter. The lower the value, the more content above this threshold gets reduced and the more muffled the engine sounds. Reasonable values can reach from 5000Hz up to 20000Hz.

eqFundamentalGain and eqFundamentalWidth:

eqFundamentalGain can be used to lower or boost the fundamental frequency of the engine sound. The fundamental frequency is essentially the loudest part of the engine sound and perceived as a dominant and sometimes annoying boom or drone for low RPM values. This parameter automatically targets the fundamental frequency of the vehicle and changes dynamically depending on the vehicles RPM.

Parameter's default values:

Parameter Default value
mainGain 0
lowCutFreq 20
highCutFreq 10000
eqLowFreq 500
eqLowGain 0
eqLowWidth 0
eqHighFreq 2000
eqHighGain 0
eqHighWidth 0
eqFundamentalGain 0
eqFundamentalWidth 1


Additionally you need to have a sfxBlend2d.json file which contains information about all the sound files you would like to use for your custom engine sound.

The file needs to be located in the following directory to work properly: \art\sound\blends\

These files do have naming conventions. The pre-tag of the filename corresponds to the sampleName of the soundConfig that you've created.

According to the example above it should be: V8_2.sfxBlend2D.json

And this is how it looks like:

    "header" : {
        "version" : 1
    "eventName" : "event:>Engine>default",
    "samples" : 
            ["art/sound/engine/V8_2/859.flac", 859],
            ["art/sound/engine/V8_2/919.flac", 919],
            ["art/sound/engine/V8_2/984.flac", 984],
            ["art/sound/engine/V8_2/1052.flac", 1052],
            ["art/sound/engine/V8_2/1126.flac", 1126],
            ["art/sound/engine/V8_2/1205.flac", 1205],
            ["art/sound/engine/V8_2/1289.flac", 1289],
            ["art/sound/engine/V8_2/1380.flac", 1380],
            ["art/sound/engine/V8_2/1476.flac", 1476],
            ["art/sound/engine/V8_2/1579.flac", 1579],
            ["art/sound/engine/V8_2/1690.flac", 1690],
            ["art/sound/engine/V8_2/1808.flac", 1808],
            ["art/sound/engine/V8_2/1935.flac", 1935],
            ["art/sound/engine/V8_2/2070.flac", 2070],
            ["art/sound/engine/V8_2/2215.flac", 2215],
            ["art/sound/engine/V8_2/2370.flac", 2370],
            ["art/sound/engine/V8_2/2536.flac", 2536],
            ["art/sound/engine/V8_2/2714.flac", 2714],
            ["art/sound/engine/V8_2/2904.flac", 2904],
            ["art/sound/engine/V8_2/3107.flac", 3107],
            ["art/sound/engine/V8_2/3324.flac", 3324],
            ["art/sound/engine/V8_2/3557.flac", 3557],
            ["art/sound/engine/V8_2/3806.flac", 3806],
            ["art/sound/engine/V8_2/4073.flac", 4073],
            ["art/sound/engine/V8_2/4358.flac", 4358],
            ["art/sound/engine/V8_2/4663.flac", 4663],
            ["art/sound/engine/V8_2/4989.flac", 4989],
            ["art/sound/engine/V8_2/5338.flac", 5338],
            ["art/sound/engine/V8_2/5712.flac", 5712],
            ["art/sound/engine/V8_2/6112.flac", 6112],
            ["art/sound/engine/V8_2/6540.flac", 6540]
            ["art/sound/engine/V8_2/859_P.flac", 859],
            ["art/sound/engine/V8_2/919_P.flac", 919],
            ["art/sound/engine/V8_2/984_P.flac", 984],
            ["art/sound/engine/V8_2/1052_P.flac", 1052],
            ["art/sound/engine/V8_2/1126_P.flac", 1126],
            ["art/sound/engine/V8_2/1205_P.flac", 1205],
            ["art/sound/engine/V8_2/1289_P.flac", 1289],
            ["art/sound/engine/V8_2/1380_P.flac", 1380],
            ["art/sound/engine/V8_2/1476_P.flac", 1476],
            ["art/sound/engine/V8_2/1579_P.flac", 1579],
            ["art/sound/engine/V8_2/1690_P.flac", 1690],
            ["art/sound/engine/V8_2/1808_P.flac", 1808],
            ["art/sound/engine/V8_2/1935_P.flac", 1935],
            ["art/sound/engine/V8_2/2070_P.flac", 2070],
            ["art/sound/engine/V8_2/2215_P.flac", 2215],
            ["art/sound/engine/V8_2/2370_P.flac", 2370],
            ["art/sound/engine/V8_2/2536_P.flac", 2536],
            ["art/sound/engine/V8_2/2714_P.flac", 2714],
            ["art/sound/engine/V8_2/2904_P.flac", 2904],
            ["art/sound/engine/V8_2/3107_P.flac", 3107],
            ["art/sound/engine/V8_2/3324_P.flac", 3324],
            ["art/sound/engine/V8_2/3557_P.flac", 3557],
            ["art/sound/engine/V8_2/3806_P.flac", 3806],
            ["art/sound/engine/V8_2/4073_P.flac", 4073],
            ["art/sound/engine/V8_2/4358_P.flac", 4358],
            ["art/sound/engine/V8_2/4663_P.flac", 4663],
            ["art/sound/engine/V8_2/4989_P.flac", 4989],
            ["art/sound/engine/V8_2/5338_P.flac", 5338],
            ["art/sound/engine/V8_2/5712_P.flac", 5712],
            ["art/sound/engine/V8_2/6112_P.flac", 6112],
            ["art/sound/engine/V8_2/6540_P.flac", 6540]


Please keep it as is. In case the system gets updated, this will help to create compatibility-modes for former versions.


Same here, please keep it as is for the time being. One might be able to modify this later on to apply different kind of filters to the set of sounds, for example for front-engine or rear-engine cars.


Two arrays of sound samples are in here. The first array contains off-load samples, the second one contains on-load samples. On the one hand you have to define the path of the sample, on the other hand you have to define the desired rpm of the file. The audio engine will linearly blend the sound samples corresponding to the actual rpm of the current vehicle.

Usually the sound sample files are located in /art/sound/engine/%engineSoundName%/

Ambient Sounds

Ambient Sounds


Fruit Price
Apples £0.95
Oranges £0.85
Pears £1.15
Purple mangosteen £1.05