Skip to main content
The Speaker class represents a single audio source within your Soundstage. It handles loading audio files, converting them to mono for processing, and managing time-based spatial Effects.
from ambisonicPy import Speaker
my_speaker = Speaker(track)

Parameters

track
string
required
The file path to the audio track. This is loaded via soundfile. The class will automatically create a mono mix (mono_track) for processing while retaining the raw data.
lp_base
float
default:"10000.0"
The base cutoff frequency (in Hz) for the distance-dependent low-pass filter. This simulates air absorption as the object moves further away.
lp_rolloff
float
default:"1.0"
Controls how aggressively the cutoff frequency drops as distance increases.
distance_rolloff
float
default:"1.0"
A scalar multiplier for distance calculations. Kept primarily for compatibility.

Methods

add_effect

Registers a spatial Effect to occur over a specific time range.
speaker.add_effect(time_range, effect)
time_range
tuple
required
A tuple (start_seconds, end_seconds) defining when the effect is active.
effect
dict
required
A dictionary defining the effect parameters.Required keys for ‘move’:
  • type: Can be any effect from Effects.
  • start: Tuple (azimuth, elevation, distance).
  • end: Tuple (azimuth, elevation, distance).
Note: Angles are in radians. Elevation is for “front”.

clear_effects

Resets the speaker to its initial state.
speaker.clear_effects()