SoundStage
Spatial sound for Blender animations, computed from the scene and rendered offline.
Website: agents-robots.github.io/soundstage
One frame of a drone shot with 2200 sound sources. Each light dot is a flying car that is heard directly; the speaker symbols mark some of the other sources and their distance from the camera.
You put sounds on objects in a Blender scene: an engine hum on a ship, a door slam at frame 240, a beacon beeping every two seconds. SoundStage follows the camera through the animation and renders one stereo audio file in which every sound sits where the picture shows it. Close sounds are louder, sounds on the left come from the left, passing objects shift in pitch (Doppler), distant ones arrive late, as they would in air, and a source behind a building is muffled. The file starts exactly on the first frame, so it drops straight onto the video editor's timeline (made for DaVinci Resolve) next to the rendered frames.
- Based on scientific research. Every effect is a published acoustic model, and each is checked by measurement in the rendered sound (The science).
- Scales to thousands of sound sources. A street of 10 000 cars with 20 000 sources renders in about three minutes (How long it takes).
Why
In a video editor, spatial sound is drawn by hand: a volume curve and a pan curve per object, a pitch bend per pass-by, and all of it again after each camera cut. The Blender scene already holds what those curves describe: where every object and the camera are on every frame, the lens, and what stands in between. SoundStage reads it from there, so when the camera path or the cut changes, one more run makes the sound fit the picture again. The same scene and the same samples give the same file, bit for bit.
Blender scene (speakers or tags) ──▶ bake (camera + object paths) ──▶ render ──▶ stereo WAV ──▶ Resolve
SoundStage is a command-line tool, not an add-on: headless Blender bakes the scene, the engine renders it. The .blend file is only read.
How to use it
There are three ways to say which object makes which sound. They can be mixed in one scene, and all end in the same two commands.
1. By hand, in Blender
Blender's own Speaker objects are the sources, and the scene's active camera is the microphone.
- Add → Speaker and parent it to the object that makes the sound.
- Object Data → Sound: open a sound file (mono for spatial sound). The speaker plays the file once at each of its NLA sound strips.
- Volume, Pitch, Distance and Cone of the speaker carry over. For a loop, such as an engine, add
a custom property
sfx_speakerto the speaker:{"mode": "loop", "group": "engines"}. - Animate as usual. If timeline markers switch between cameras, the sound cuts with the picture.
- Bake and render, then put the WAV on the editor's timeline at the first frame:
soundstage bake shot.blend --out audio/bake # camera, speakers, what hides them
soundstage render audio/bake/scene.json -o audio/shot.wav --report --plot --set reverb=city_streets
Details: usage, speakers.
2. In the script that builds the scene
If Python scripts generate the scenes, the same scripts tag the sounds, one line per sound. The tags are saved with the scene, so rebuilding the scene rebuilds its sound:
from soundstage.blender import tag
tag.add_sound(ship, "engine_hum.wav", ref_distance=20, offset=(0, -12, 0), group="engines")
tag.add_sound(beacon, "beep.wav", mode="once", frame=list(range(1, 601, 60)))
tag.add_sound(crate, "impact.wav", mode="once", frame=180, sync_to_picture=True)
For an existing .blend, the same lines go into a separate file that the bake applies
(soundstage bake shot.blend --run sounds.py --out audio/bake); the .blend stays untouched.
Details: scene-builder guide, all tag keys.
3. With a coding agent
The agent guide is a step-by-step procedure for coding agents such as
Claude Code: scan the shot for its cameras and for what moves (soundstage scan), write the
tagging file, bake, render. An agent cannot listen, so every render comes with a report (loudness,
true peak, each source's distance, delay and pitch range) and a plot of every source over the
frames. The final check is by ear.
What it does
- Placement: loudness by distance (OpenAL distance models), constant-power panning with a small interaural delay and head shadow, a cue for sources behind the camera, directivity cones. Panning follows the picture: a source at the frame edge is heard at the screen edge whatever the lens, and zooms move sounds with the picture (E17).
- Propagation: sound travels at 343 m/s, so distant events are heard late; Doppler from the motion of sources and camera (exact retarded time, not an approximation); air absorption after ISO 9613-1; clean camera cuts.
- Environment: occlusion behind buildings and vehicles, baked by ray casting in Blender (quieter, duller, low frequencies bending around edges); reverb from 113 named environments (hangar, city street, forest, space station …) or an impulse response, with a send that falls with distance so distant traffic does not fill the reverb.
- Scale: thousands of sources. The loudest 64 of each group run the full chain, the rest a cheaper far field; culling skips what is inaudible within an error budget. 10 000 flying cars, each with its engine, render 60 s in under 3 minutes and 12 GB (E18).
- Output: 48 kHz float WAV aligned to the first frame, stems per group for Fairlight, a loudness report (LUFS, true peak), optional normalization and true-peak limiting, a debug plot, an MP4 preview for sync checks.
- Reproducible: the bake is headless, tags can live in scripts, renders are bit-identical for the same inputs, every model is documented with its measurements (research).
Not yet: binaural and ambisonic output, animated parameters, random variation of one-shots (roadmap).
The science
Every effect is a model from the acoustics and audio literature, and each one is measured in the rendered audio against an answer known from geometry, a standard or a preset.
Frequency over time of a propeller plane passing at 216 km/h, in the rendered sound. The dashed curves are computed from the plane's baked path and the speed of sound alone.
| Effect | Model | Measured in the render, against the known answer |
|---|---|---|
| Doppler and delay | One time-varying delay per source, driven by the geometry (Smith, Serafin, Abel, Berners 2002) | A 1 kHz tone on four vehicles stays within 0.11 % of the geometry; a blow 171.5 m away arrives after 500.09 ms (500.00) |
| Distance and air | Inverse distance law (OpenAL 1.1); ISO 9613-1 | −24.15 dB over four doublings (−24.08); −48.6 dB around 8 kHz at 686 m (−48.8) |
| Direction and the head | Constant-power panning (Pulkki 1997); Woodworth's time difference; head shadow of Brown and Duda (1998) | The near ear leads by 0.318 ms (0.321) |
| Occlusion | Open share of the first Fresnel zone per band (Tsingos and Gascuel 1997) | −13.6 dB at 1 kHz behind a house (−13.6) |
| Reverb | EFX presets as impulse responses of decaying noise (Moorer 1979; Välimäki et al. 2017) | A chapel decays in 4.64 s (4.62) |
| Loudness | ITU-R BS.1770-4, EBU R 128 | Integrated loudness within 0.06 LU of the EBU test values and of ffmpeg's meter (E14) |
The numbers are checks of the feature video (examples/showcase); the website shows more charts. Each of the 22 models has a page with its formulas, alternatives and limits, 20 experiments reproduce the measurements behind the defaults, and the sources are listed with open copies where they exist: research, papers and standards.
Try it
Requires Linux, Python 3.12+ and Blender 5.x on PATH; ffmpeg for previews.
git clone https://github.com/Agents-Robots/soundstage && cd soundstage
python3 -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/python tools/make_test_samples.py # placeholder sounds
blender -b --factory-startup --python examples/flyby.py -- --save out/flyby.blend
.venv/bin/soundstage bake out/flyby.blend --run examples/flyby_sounds.py --out out/flyby
.venv/bin/soundstage render out/flyby/scene.json -o out/flyby/mix.wav --report --plot --set reverb=city
.venv/bin/soundstage preview out/flyby/mix.wav --frames <rendered frames dir> # optional: MP4 with sound (ffmpeg)
The tool alone, without the examples, is on PyPI: pip install soundstage (or
'soundstage[plot]' for the debug plot) gives the soundstage command (scan, bake, render,
preview).
out/flyby/mix.wav is 8 seconds of a ship passing from left to right (its engine drops in pitch
as it passes), a beacon beeping on the left and a crate hitting the ground on the right, in the
reverb of a city street; mix.plot.png shows each source's distance, level, pan, delay, pitch and
visibility over the frames.
For your own animation, continue with usage: samples, speakers and tags, baking, rendering, importing into Resolve.
How long it takes
Measured on a 16-core desktop CPU (AMD Ryzen 9 3950X), for a 60-second shot in a city of 200 buildings with default settings, culling off and every source through the full chain (E15). Both steps take a fixed time plus a time per source:
| step | fixed | per source | 10 sources | 100 sources | 1000 sources |
|---|---|---|---|---|---|
| bake | 7 s | 0.38 s | 11 s | 45 s | 6.5 min |
| render | 4 s | 0.19 s | 5 s | 23 s | 3.4 min |
The per-source time is proportional to the shot length: a 120 s shot takes about twice as long.
Render memory is about 4 GB at 100 sources and 28 GB at 1000. Below 30 sources the render is
dominated by its fixed time, so the fixed costs in the tables below matter more than the factors.
Culling at its default (cull_db=-40) takes 4–9 % off the render and 3–6 % off the bake
(E16).
Thousands of sources (E18, flying cars in a canyon of
towers, 60 s). Per group, at most detail_voices (64) sources run the full chain at a time; the rest
run the far field. The render then costs a time per source plus a time per near voice, and its
memory follows the near voices, not the sources:
| per source | per near voice (at most about 2 × detail_voices at once) |
10 000 cars, default | |
|---|---|---|---|
| render | 15 ms | 0.17–0.21 s, 23–34 MB | 2.9 min, 12 GB |
| bake | 0.14–0.17 s | 25 min |
The bake gives the sources ranked beyond 2 × detail_voices the direct path only for their
visibility; with every path it took 91 min for the same 10 000 cars. --set detail_voices=null
renders every source through the full chain (0.22 s and 25 MB per car here; 2000 cars took 7.4 min
and 52 GB).
Render options, most expensive first (effect relative to the defaults, at 100 sources):
| change | effect |
|---|---|
doppler_factor ≠ 1 (scene or source) or sync_to_picture on a one-shot with several triggers |
every trigger renders as a separate voice over the whole shot: 2.5× with culling off in a mix with 20 % one-shots of 10–20 triggers each; culling skips the silent parts of those voices, which leaves about 1.3× |
--stems or --report (either or both) |
about 1.5 s per group (+6 s with four groups), nearly independent of the number of sources |
--set reverb=<name> |
+10 %; long reverbs (hangar, 10 s) add 2 s more |
--set cull_db=null (culling off) |
+4 to +10 % |
--limit |
+1.2 s |
--plot |
+0.6 s |
panner=amplitude instead of the default hybrid |
−11 % |
| sources not occluded (no visibility baked) | −12 % |
head_shadow=0 |
−8 % |
air_absorption=0, itd_scale=0, pan law, --normalize, --pcm24 |
0–4 % |
--quality high |
−18 % (−26 % at 1000 sources); slightly slower below 30 sources |
--set cull_db=-20 instead of −40 |
−21 to −40 % (more with more sources), error 20 dB below each group |
Bake settings:
| change | effect |
|---|---|
| objects in the scene, animated or not | Blender's frame step costs 0.7 ms at 1000 objects, 9 ms at 4000 and 35 ms at 16 000, and the bake steps about 8000 times for a 60 s shot: 16 000 objects add 4.5 minutes, even with one source |
occlusion_rate (default 10 Hz) |
per-source time ≈ 0.1 s + 0.03 s per Hz: 0 Hz is 0.35×, 40 Hz is 2.9× |
substeps (default 4) |
1 is 0.7×, 8 is 1.4×, 16 is 2.3× |
pad_seconds (default 3) |
proportional to the baked length: 10 s is 1.24× |
| sources instanced by geometry nodes | +7 s |
occluder_min_size, sources in collection instances |
no measurable effect |
To estimate a combination, add the fixed costs and multiply the per-source factors. In the tests this was within 17 % of the measured time.
Documentation
- Usage: speakers and tags, baking, rendering, importing into Resolve
- Scene-builder guide: sound in scripts that build scenes
- Agent guide: add sound to an existing animation, step by step
- Requirements and roadmap
- Architecture and the specifications: tagging, scene format, signal model, command line
- Research: survey of existing tools, one page per acoustic model with its choices, reproducible experiments, papers; and the decision records
- AGENTS.md for coding agents working on this repo, CONTRIBUTING.md for people
- The website is the folder site/, deployed by a workflow on every push to
main
Status
Phases 0 to 3 of the roadmap are implemented (baseline, placement, physics, environment and mixing); Phase 4 items (culling, the far field, screen-relative panning) are added as shots need them. The unit tests run on every push; the end-to-end tests need Blender. Work is tracked in this repository's issues.
Licence
GPL-3.0-or-later (LICENSE). The Blender side runs inside Blender, which is GPL; the
engine is under the same licence. The reverb presets in soundstage/engine/data/efx_presets.json are
converted from OpenAL Soft's efx-presets.h (LGPL), whose terms allow their use under the GPL.
Metadata
Release files for soundstage 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| soundstage-0.1.1.tar.gz | 181.3 kB | With provenance | Details for soundstage-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| soundstage-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for soundstage-0.1.1-py3-none-any.whl |
Total release size: 332.4 kB
Release files / soundstage-0.1.1.tar.gz
| Download URL | soundstage-0.1.1.tar.gz |
|---|---|
| Size | 181.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae27686290a8fc9a75683b9b8e832beb01bc9f787cfbb68b256e345c9ab28892
|
|
BLAKE2b-256 checksum How to use checksums |
7c2edb481d3500ad7dbca0f5970975aef45d3ed836213596643a82dbca4137ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / soundstage-0.1.1-py3-none-any.whl
| Download URL | soundstage-0.1.1-py3-none-any.whl |
|---|---|
| Size | 151.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
060e9a2e977332f8076bc4febd92595e4563600cbab67bb0fbfb640b82197f3c
|
|
BLAKE2b-256 checksum How to use checksums |
9e628ddc16c68bdf7f69d1262949369d2ac7d3e1b1a5d0ae644a1b051d095af4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for soundstage 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for soundstage-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.