SoundStage is the central manager for your project. It collects Speaker instances, handles the Ambisonic encoding (Spherical Harmonics), and renders the final output.
Parameters
The rendering mode.
'binaural': Decodes to stereo using HRIRs (Head-Related Impulse Responses) for headphone listening.'ambisonic': Exports raw B-format/Ambisonic channels.
The Ambisonic order. Higher orders provide better spatial resolution but require more processing power.
Methods
add_speaker
Adds a speaker to the scene.
All speakers added to a stage must share the same sample rate.
render
Processes all effects, encodes spatial data, and writes the final audio file.
The file path where the rendered audio (
.wav) will be saved.Optional path to a custom
.sofa file (HRTF dataset). If None, a default dataset is used based on the sample rate.