> For the complete documentation index, see [llms.txt](https://bonsai-docs.gitbook.io/bonsai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bonsai-docs.gitbook.io/bonsai-docs/bonsai-radio/configuration/audio-configuration.md).

# Audio Configuration

## Audio Configuration

Bonsai Radio includes several audio settings that control how the radio sounds both inside and outside vehicles.

All audio settings can be found near the top of:

```
config.lua
```

***

## Vehicle Volume

```lua
Config.VehicleVolume = {
    enabled = true,
    default = 0.75,
    minimum = 0.0,
    maximum = 1.0,
    step = 0.05,
    upKey = 172,
    downKey = 173
}
```

Controls the shared vehicle radio volume.

The selected volume is synchronized between the driver, passengers and nearby players.

### enabled

Enables the custom vehicle volume system.

### default

The default volume when entering a vehicle.

### minimum

The lowest selectable volume.

### maximum

The highest selectable volume.

### step

How much the volume changes each time the player presses the volume keys.

### upKey

The GTA/FiveM control used to increase the volume.

Default:

```
Arrow Up
```

### downKey

The GTA/FiveM control used to decrease the volume.

Default:

```
Arrow Down
```

***

## Car Cabin Sound

```lua
Config.CarCabinSound = {
    ...
}
```

Controls how the radio sounds **inside the vehicle**.

This processing simulates music playing through the vehicle's speakers rather than playing directly through the game.

### enabled

Enables or disables the cabin audio processing.

***

### highPassHz

Cuts very low frequencies.

Increasing this value reduces deep bass.

***

### lowPassHz

Cuts high frequencies.

Lower values create a more muffled sound.

Higher values create a brighter sound.

***

### bassGainDb

Controls the bass boost.

Positive values increase bass.

Negative values reduce bass.

***

### bassFrequencyHz

Controls which frequencies are affected by the bass filter.

***

### cabinGainDb

Controls the simulated cabin resonance.

Higher values create a stronger "inside the car" sound.

***

### cabinFrequencyHz

The centre frequency used for the cabin resonance effect.

***

### Compressor

The compressor keeps the radio sounding balanced.

Available settings:

```lua
compressorThresholdDb
compressorKneeDb
compressorRatio
compressorAttack
compressorRelease
```

Most server owners won't need to change these values.

***

### dryLevel

Controls the amount of the original audio.

Higher values produce a cleaner sound.

***

### wetLevel

Controls the amount of cabin reflections and reverb.

Higher values create a stronger enclosed vehicle effect.

***

### reflectionDelayMs

Delay before the first cabin reflection.

***

### reflectionLevel

Volume of the reflected sound.

***

### preDelayMs

Delay before the reverb begins.

***

### reverbDuration

Controls how long the reverb lasts.

***

### reverbDecay

Controls how quickly the reverb fades away.

***

### reverbLevel

Controls the volume of the reverb effect.

***

## World Audio Processing

```lua
Config.WorldAudioProcessing = {
    ...
}
```

Controls how the radio sounds **outside** the vehicle.

Unlike `CarCabinSound`, this processing is only applied to nearby players listening from outside.

***

### enabled

Enables exterior audio processing.

***

### transitionMs

Controls how smoothly the audio changes when:

* Doors open
* Doors close
* Windows break
* Convertible roofs open or close

***

### sealed

```lua
sealed = {
    ...
}
```

The audio profile used when the vehicle is fully closed.

This creates the muffled sound heard through closed doors and windows.

The following settings can be adjusted:

* highPassHz
* lowPassHz
* bassGainDb
* bassFrequencyHz
* compressorThresholdDb
* compressorKneeDb
* compressorRatio
* compressorAttack
* compressorRelease
* volumeMultiplier

***

### open

```lua
open = {
    ...
}
```

The audio profile used when the vehicle is open.

For example:

* Windows down
* Doors open
* Convertible roof open

These settings are identical to the sealed profile but allow much more high-frequency detail.

***

### openings

```lua
openings = {
    windowWeight,
    doorWeight,
    convertibleWeight
}
```

Controls how much each opening affects the final sound.

#### windowWeight

How much broken or lowered windows contribute.

***

#### doorWeight

How much open passenger doors contribute.

The hood and trunk are ignored.

***

#### convertibleWeight

Controls the effect of convertible roofs.

Motorcycles and bicycles are always treated as fully open.

***

## World Audio

```lua
Config.WorldAudio = {
    ...
}
```

Controls the positional audio heard outside the vehicle.

***

### enabled

Enables or disables world audio.

When disabled, only vehicle occupants hear the radio.

***

### requiresEngine

```lua
requiresEngine = false
```

Controls whether outside audio requires the engine to be running.

| Value   | Description                                            |
| ------- | ------------------------------------------------------ |
| `true`  | Exterior audio only plays while the engine is running. |
| `false` | Exterior audio always works.                           |

***

### maxDistance

Maximum distance players can hear the vehicle radio.

Measured in metres.

***

### fullVolumeDistance

The distance where volume reduction begins.

Players closer than this distance hear the radio at full volume.

***

### outsideVolume

Controls the overall exterior volume before distance falloff and audio processing.

***

### updateInterval

How often world audio updates while vehicles or players are moving.

Measured in milliseconds.

***

### stationaryUpdateInterval

Update interval while nothing is moving.

A higher value reduces unnecessary updates and improves performance.

***

### movementThreshold

How far a player or vehicle must move before the script considers the scene to be moving.

Measured in metres.

***

### maxEmitters

Maximum number of nearby vehicle radios processed at the same time.

```lua
maxEmitters = 10
```

Setting:

```lua
0
```

removes the limit.

***

## Radio Controls

The following settings control how players operate the radio.

```lua
Config.WheelKey
Config.NextKey
Config.PreviousKey
Config.KeyboardNextKey
Config.KeyboardPreviousKey
Config.SelectionDelay
```

### WheelKey

Opens the radio wheel.

Default:

```
Q
```

***

### NextKey

Switches to the next station.

Default:

```
Mouse Wheel Down
```

***

### PreviousKey

Switches to the previous station.

Default:

```
Mouse Wheel Up
```

***

### KeyboardNextKey

Keyboard shortcut for the next station.

Default:

```
Right Arrow
```

***

### KeyboardPreviousKey

Keyboard shortcut for the previous station.

Default:

```
Left Arrow
```

***

### SelectionDelay

The delay between station selections.

Measured in milliseconds.

Increasing this value prevents players from rapidly cycling through stations.

***

## Audio Developer Panel

```lua
Config.AudioDeveloperPanel
```

The Audio Developer Panel allows live audio tuning while in-game.

Once you're happy with the sound, simply copy the generated values back into `config.lua`.

This panel is intended for development and should normally remain disabled on production servers.

***

## Recommended Settings

For most servers, we recommend leaving the audio settings unchanged unless you have a specific reason to adjust them.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bonsai-docs.gitbook.io/bonsai-docs/bonsai-radio/configuration/audio-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
