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.
Parameters
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.The base cutoff frequency (in Hz) for the distance-dependent low-pass filter. This simulates air absorption as the object moves further away.
Controls how aggressively the cutoff frequency drops as distance increases.
A scalar multiplier for distance calculations. Kept primarily for compatibility.
Methods
add_effect
Registers a spatial Effect to occur over a specific time range.
A tuple
(start_seconds, end_seconds) defining when the effect is active.A dictionary defining the effect parameters.Required keys for ‘move’:
type: Can be any effect fromEffects.start: Tuple(azimuth, elevation, distance).end: Tuple(azimuth, elevation, distance).