An acoustic simulation tool for optimizing speaker and listening positions in recording studios using the Reflection-Free Zone (RFZ) design approach.
This tool simulates high-frequency acoustic behavior in recording studios, helping studio designers:
- Find optimal speaker and listening positions
- Identify problematic reflections that might compromise the RFZ
- Determine which room surfaces need acoustic treatment
- Calculate Initial Time Delay (ITD) and other key acoustic parameters
- Import a 3D model of your room (in .3mf format)
- Define materials and their properties for surfaces in the room
- Run simulations to analyze reflection paths
- Export detailed annotations for visualization with psalm.
The tool focuses on frequencies above the Schroeder frequency (typically most accurate above 2x Schroeder). Low-frequency behavior requires separate consideration and treatment.
The Reflection-Free Zone (RFZ) concept allows for precise acoustic optimization while preserving a room's natural characteristics. Unlike approaches that try to eliminate all reflections, RFZ focuses on creating a controlled listening environment within a specific zone around the mixing position, while relaxing and minimizing disruption to the rest of the room.
Key aspects of RFZ design:
- Only the zone around the listening position needs to meet strict acoustic criteria
- Sound from the main speakers is carefully controlled
- Other sounds (voices, instruments) can behave naturally in the room
- Speakers are typically flush-mounted in the front wall
This selective approach allows studio designers to:
- Minimize modifications to the room's original surfaces
- Maintain a natural, pleasant acoustic environment
- Achieve professional acoustic standards within the listening zone
- Preserve usable space in the room
RFZ design requires high precision. Small changes in speaker placement, listening position, or surface treatment can significantly impact performance. Precision is especially important if we want a minimally-invasive solution for the acoustics. Traditional trial-and-error approaches are impractical because:
- Moving flush-mounted speakers is extremely costly
- Testing multiple surface treatment configurations is time-consuming
- Some changes (like speaker placement) must be decided before construction
The primary goal is to maximize the Initial Time Delay (ITD) gap - the time between when direct sound from the speakers reaches the listening position and when the first reflection arrives. This requires:
- Tracing all possible paths sound might take from the speakers to the RFZ
- Calculating the timing and intensity of each reflection
- Identifying which surfaces are causing problematic reflections
- Finding speaker and listening positions that maximize ITD
The RFZ is modeled as a hemisphere centered at the engineer's seated position (the "sweet spot"). We use a hemisphere rather than a full sphere because engineers typically work between seated and standing positions, but rarely below the seated position. The radius of this hemisphere is configurable, with an important tradeoff: larger RFZ radii tend to result in shorter ITDs, as a larger zone increases the probability of capturing reflections. This means that maximizing the size of the RFZ must be balanced against achieving the desired acoustic performance.
We use the 3MF format because:
- It preserves surface names from CAD software, which is crucial for material mapping
- It handles complex, irregular room geometries
- Most CAD tools can export to 3MF
- It maintains the connection between:
- Surface names in your CAD software
- Material definitions in your configuration
- Acoustic properties in the simulation
This tool uses ray tracing to model acoustic reflections, which is valid for frequencies above the Schroeder frequency (typically most accurate above 2x Schroeder). Below this frequency, room acoustics are dominated by modal behavior that requires different analysis methods.
While go-recording-studio handles the acoustic simulation, visualization and optimization are handled by a companion tool called psalm. This separation allows:
- Efficient simulation in Go
- Rich visualization capabilities using Python's 3D tools
- Integration with machine learning for parameter optimization
TODO: Add example visualization showing reflection paths and RFZ
Complete configuration details are documented in experiment_schema.md
. The schema includes:
- Room and material definitions
- Speaker configurations (including directivity patterns)
- Listening position parameters
- Simulation settings
For room orientation, while the tool supports configurable reference positions and normals, the most tested configuration is:
reference_position: [0, <half of front wall width>, 0.0]
reference_normal: [1, 0, 0]
- Typical simulation (500,000 rays, 100ms) runs in seconds on modern hardware
- Recommended ray counts: 100,000 - 2,000,000
- Tip: Increase ray count until results stabilize
- Single-threaded, CPU-only implementation
What is a good result?
- EBU 3276 stipulates: No reflections > -10dB within first 15ms
- For our studio we are targeting: No reflections > -20dB within first 30ms
See EBU 3276 for complete specifications.
- Physical room changes require new 3MF exports
- Speaker and listening positions can be adjusted in the YAML config
- Surface materials can be modified in the YAML config
- Surface names in the YAML must exactly match names in the 3MF
- Unmatched surfaces use the default material
- If no default is specified, brick properties are used
- ITD calculations use first reflection only
- Summary includes
avg_gain_5ms
for comparing early reflection energy between simulations - Speaker directivity patterns are configurable in the YAML
- Non-watertight models usually work fine unless you see "non-terminating ray" errors
TODO: Document summary.json format and fields TODO: Add detailed psalm workflow documentation once available
go get github.com/jdginn/go-recording-studio
- Create your room model in CAD software (tested with Autodesk Fusion)
- Name each surface that will have distinct acoustic properties
- Export as .3mf, ensuring surface names are preserved
Create a YAML configuration file defining:
- Path to your .3mf model
- Material properties
- Surface-to-material mappings
- Simulation parameters
Example configuration:
input:
mesh:
path: "room.3mf"
materials:
inline:
brick:
absorption:
{ 125: 0.05, 250: 0.04, 500: 0.02, 1000: 0.04, 2000: 0.05, 4000: 0.05 }
surface_assignments:
inline:
default: "brick"
"Front Wall": "absorber"
See experiment_schema.md
for complete configuration documentation.
go-recording-studio simulate config.yaml
The simulation produces several output files:
annotations.json
: Detailed reflection paths and pointssummary.json
: Acoustic parameters (ITD, T60, Schroeder frequency)room.stl
: Final room geometry
TODO: Add example visualization showing reflection paths and RFZ
For visualization and optimization of these results, use the psalm tool.
simulate [flags] <config>
--output-dir string Directory to store output in
--skip-speaker-in-room-check Skip checking whether speaker is inside room
--skip-add-speaker-wall Skip adding walls for speaker flush mounting
--skip-tracing Skip performing ray tracing steps
--counterfactual strings Simulate reflections with perfect reflector surfaces
.
├── main.go # Main application entry point
├── room/ # Core room simulation package
│ ├── config/ # Configuration handling
│ └── experiment/ # Experiment management
├── experiment_schema.md # Configuration documentation
└── annotations_schema.md # Output format documentation
MIT License (see LICENSE)
- Uses the fogleman/pt package for ray tracing
- Uses kong for CLI argument parsing