Audio
Sound in Renzora comes from objects in your scene. Give an object an Audio Player, choose a sound file, and it plays: a crackling campfire, a humming machine, background music. Every sound then flows through the Mixer, where you balance music against effects the way a sound engineer would.
Audio plays while you edit, in play mode, and in your exported game on Windows, Linux and macOS. Web builds play no sound yet.
Sound files
| Format | Use it for |
|---|---|
.ogg | Music and long ambient loops. Small files. |
.wav | Short sound effects. No decoding work, so they start instantly. |
.mp3 | Music, if that is what you have |
The rule of thumb: OGG for music, WAV for sound effects. The Inspector also accepts .flac files, but an exported game is not built to play them by default, so convert FLAC to OGG before you ship.
Bring sound files into your project the same way as any other asset: see Assets.
Give an object a sound
- Select the object.
- In the Inspector, click Add Component and choose Audio Player.
- Drag a sound file from the Assets panel onto the File slot.
- Turn on Autoplay if it should start by itself when the game runs.
The Audio Player's settings are grouped into sections.
Clip
| Setting | What it does |
|---|---|
| File | The sound to play |
Clip Pool: a list of sounds to pick from at random. See Variety for repeated sounds.
Playback
| Setting | What it does |
|---|---|
| Autoplay | Start playing when the game starts |
| Looping | Repeat the sound forever. Turn this on for music and ambient loops. |
| Fade In | Seconds to fade up from silence, instead of starting at full volume |
Mix
| Setting | What it does |
|---|---|
| Volume | How loud. 1 is the file's own level, up to 2. |
| Vol Jitter | A random change in volume each time it plays |
| Pitch | Above 1 is higher and faster, below 1 is lower and slower |
| Pitch Jitter | A random change in pitch each time it plays |
| Panning | Left or right in the stereo field, for sounds that are not 3D |
| Bus | Which Mixer channel it plays through: Sfx, Music, Ambient, or one you made |
Each setting has a small reset button that puts it back to its default.
Music
Music is just an Audio Player on any object (an empty entity named "Music" is tidy). Turn on Autoplay and Looping, and set Bus to Music so players can turn music down without losing the sound effects.
Variety for repeated sounds
The same footstep played fifty times in a row sounds mechanical. Two things fix it:
- Clip Pool. Drag several sounds onto the pool's Add slot. Each time the sound plays, one is picked at random, never the same one twice in a row.
- Vol Jitter and Pitch Jitter. A little randomness in each, such as
0.1and0.05, makes even one clip sound alive.
Make a sound come from a place
Turn on Spatial > Enabled and the sound comes from the object's position: louder up close, quieter far away, and from the left or right depending on where it is.
| Setting | What it does |
|---|---|
| Min Distance | Inside this distance the sound is at full volume. Set it to roughly the size of the thing making the noise: about 3 metres for a campfire, half a metre for a ticking clock. |
| Max Distance | How far away it can still be heard |
| Rolloff | How the volume falls off between the two: Logarithmic sounds natural, Linear fades evenly |
Where sound is heard from
While you edit, you hear from the viewport camera, so you can fly around a campfire and hear it move from ear to ear. In play mode and in your game, you hear from the game camera. Most games never need to change that.
Add an Audio Listener component to put the "ears" somewhere else:
- Third person. The camera trails a few metres behind the character, so the character's own footsteps sound like they are in front of you. Put the listener on the character.
- Top-down or strategy. A camera high above the action is beyond most sounds' Max Distance, so the world goes quiet as you zoom out. Put the listener nearer the ground.
- Split screen. With several cameras, the listener says which one hears.
Untick Active to switch a listener off without removing it. Use only one active listener at a time.
Sounds that are not spatial ignore the listener: they play at their own volume and panning wherever it is.
Echo and reverb
Every Audio Player has a Sends section with Reverb and Delay. These send some of the sound to a shared reverb (a sense of room or cave) and a shared echo. 0 sends nothing; 1 sends it all. A voice in a cathedral wants plenty of reverb; a menu click wants none.
The Mixer
Open the Mixer panel to see every channel side by side. Each sound plays through a bus (a channel), and every bus feeds Master, so you can turn the music down without touching the sound effects, or mute everything at once.

You start with four buses:
| Bus | For |
|---|---|
| Master | Everything. It sits apart from the others because every bus ends up here. |
| Sfx | Sound effects |
| Music | Background music |
| Ambient | Environmental loops such as wind, rain or crowds |
On each strip:
- Drag the fader to set the volume. The level in dB shows underneath.
- Turn the Pan knob, or scroll over it, to move the bus left or right. Hold
Ctrlwhile scrolling for finer steps. - M mutes the bus. S solos it, so you hear only that bus.
Pages
The tabs at the top left switch pages:
| Page | What it is for |
|---|---|
| Mixer | The channel strips |
| Routing | Where each bus sends its sound, and how much goes to the reverb and delay |
| Metering | Long level meters, to check nothing is too loud |
Laying out the board
The buttons at the right of the top bar change how the Mixer looks, never how it sounds:
| Button | What it does |
|---|---|
| Compact / Large | Narrow strips so more fit, or roomier strips with a bigger pan knob and a dB scale |
| Horizontal | Lays the channels out as rows instead of columns. Handy when the Mixer is docked in a wide, short space at the bottom of the editor. |
| Add bus | Adds a new channel |
Your own buses
Click Add bus and a new channel appears, already named and coloured. Point an Audio Player's Bus at it. Splitting sounds into buses such as "Footsteps", "Weapons" and "Voices" lets you balance whole groups at once.
Double-click a bus's name to rename it (Enter keeps it, Esc cancels). Renaming is always safe: every Audio Player using the bus keeps working, including ones in scenes you do not have open. The four built-in buses cannot be renamed.
Right-click a strip for more:
| Entry | What it does |
|---|---|
| Rename | The same as double-clicking the name |
| Colour | Pick the strip's colour, so you can spot it in a busy board |
| Input device | Feed a live microphone into this bus |
| Delete bus | Removes a bus you made. Any bus that was routed into it goes to Master instead. |
Routing
On the Routing page each bus has a row:
| Column | What it does |
|---|---|
| Output | Where this bus goes: Master, or another bus. Send "Footsteps" and "Weapons" into Sfx, and the Sfx fader controls both. |
| Reverb send / Delay send | How much of the whole bus goes to the reverb and the delay, on top of what each sound sends |
| Signal path | The full route spelled out, such as Footsteps › Sfx › Master |
The Output list only offers buses that will not create a loop. Soloing a group bus plays everything routed into it.
Metering
The Metering page shows every bus as a long meter. A white mark holds the loudest recent peak for two seconds, with its level in dB beside it. If a bus gets too loud and distorts, its CLIP light turns red and stays red until you click it, or press Reset peaks, so you do not miss a clip that happened while you were looking elsewhere.
Your mix is saved with the project
Volumes, panning, mute and solo, colours, routing, sends and your own buses are stored in the project's project.toml. They come back when you reopen the project and ship with your game.
Pressing Play runs your game separately from the editor, so a script that turns the music down during play does not change the mix saved in your project.
Volume and sound settings from a script
An options menu with volume sliders changes the mix while the game runs. In a Rust script, the mix lives in the project settings, and the helpers in renzora::audio::settings read and change it:
use renzora::audio::settings;
use renzora::{CurrentProject, ScriptCtx};
fn update(ctx: &mut ScriptCtx) {
let wanted = 0.5;
let current = ctx
.get_resource::<CurrentProject>()
.and_then(|p| settings::bus_volume(&p.config.audio, "Music"));
// Only write when the value changes: writing marks the project as changed.
if current != Some(wanted) {
if let Some(mut project) = ctx.get_resource_mut::<CurrentProject>() {
settings::set_bus_volume(&mut project.config.audio, "Music", wanted);
}
}
}
renzora::script!(update);
bus_volume,bus_mutedandmaster_volumeread a value back, so a slider can start in the right place.set_bus_volume,set_bus_mutedandset_master_volumechange it. Volume runs from0(silent) to1.5, and1is normal.- Bus names ignore upper and lower case, so
"music"works too.
In an exported game these changes last until the game quits. To remember a player's choice, keep it in your own save data and set it again when the game starts: see Saving.
Choosing the output device
A game plays through the computer's default output. A player who uses headphones or an audio interface that is not the default needs a way to choose. List the devices and pick one with AudioLink:
use bevy::prelude::*;
use renzora::audio::AudioLink;
let mut link = ctx.world().resource_mut::<AudioLink>();
let outputs = link.list_devices().outputs; // device names, for a dropdown
if let Some(first) = outputs.first() {
if let Err(e) = link.set_output_device(Some(first.as_str())) {
warn!("could not switch output: {e}");
}
}
link.set_output_device(None).ok(); // back to the system default
The choice is not saved with the project, because a device name only means something on one computer. Store the player's pick in your save data. Switching stops the sounds playing at that moment.
See Rust Scripts for writing and attaching scripts.
Tips
- Use a Clip Pool plus a little jitter for anything that repeats: footsteps, gunshots, impacts.
- Put every sound on a sensible bus from the start. Rebalancing a finished game is far easier with Sfx, Music and Ambient kept apart.
- Keep the Metering page open while you play-test a loud scene and watch for CLIP lights.
- You only need an Audio Listener when the ears belong somewhere other than the camera.