pub struct SsirConfig {Show 13 fields
pub sample_rate: f64,
pub direct_sound_window_ms: (f64, f64),
pub ler_window_ms: f64,
pub energy_threshold: f64,
pub doa_threshold_deg: f64,
pub toa_threshold_ms: f64,
pub min_segment_ms: f64,
pub mixing_time_ms: Option<f64>,
pub onset_window_ms: f64,
pub final_segment_ms: f64,
pub min_peak_distance_ms: f64,
pub doa_bandpass_hz: (f64, f64),
pub doa_bandpass_order: u32,
}Expand description
Configuration for SSIR (Spatial Segmentation of Impulse Response) analysis.
Default values correspond to the SSIR-Mk2 configuration from Pawlak & Lee (Applied Acoustics 249, 2026), Table 1.
Fields§
§sample_rate: f64Sample rate in Hz
direct_sound_window_ms: (f64, f64)Direct sound window: (pre, post) in ms relative to detected onset. Reflections within this window are excluded from detection. Default: (0.5, 3.5) — the direct sound typically occupies ~4ms.
ler_window_ms: f64Local Energy Ratio analysis window length in ms. The RIR is divided into consecutive windows of this length. Default: 1.0 ms (48 samples @ 48kHz).
energy_threshold: f64Energy threshold as a multiple of the per-window median energy. A sample is considered a reflection candidate if its energy exceeds this multiple of the window’s median energy. Default: 3.0
doa_threshold_deg: f64Minimum angular distance (degrees) between consecutive reflections for them to be considered distinct events. Pairs below this threshold are merged. Default: 9.0 degrees. Only used with multi-channel (SRIR) input.
toa_threshold_ms: f64Minimum time-of-arrival difference (ms) between consecutive reflections. Pairs closer than this are merged regardless of DOA. Default: 0.5 ms.
min_segment_ms: f64Minimum segment duration (ms) for early reflections. Segments shorter than this are merged with the preceding segment. Default: 0.5 ms.
mixing_time_ms: Option<f64>Mixing time in ms (boundary between early reflections and reverberant tail). If None, estimated automatically from the Schroeder decay curve. Default: None (auto-estimate, typical values: 30-50ms for small rooms).
onset_window_ms: f64Pre-onset window length (ms) for refining segment boundaries. For each detected reflection, the onset is searched within [TOA - onset_window_ms, TOA]. Default: 0.5 ms.
final_segment_ms: f64Duration (ms) of the optional final segment after the last detected event. Default: 2.0 ms.
min_peak_distance_ms: f64Minimum peak distance (ms) for direct sound onset detection. Peaks closer than this are suppressed when searching for the direct sound. Default: 0.1 ms (5 samples @ 48kHz).
doa_bandpass_hz: (f64, f64)Band-limiting frequency range (Hz) for DOA estimation from B-format channels.
The pseudo-intensity vector method is most reliable within a frequency band where spatial aliasing is low and wavelengths are short enough for directional resolution. Low frequencies have poor spatial resolution; high frequencies may alias depending on the microphone array.
Default: (500.0, 4000.0) — a commonly used range for first-order Ambisonics.
doa_bandpass_order: u32Butterworth filter order for DOA band-limiting.
Applied as a zero-phase (filtfilt) bandpass, so the effective order is doubled. Default: 4 (effective 8th-order after forward-reverse filtering).
Implementations§
Trait Implementations§
Source§impl Clone for SsirConfig
impl Clone for SsirConfig
Source§fn clone(&self) -> SsirConfig
fn clone(&self) -> SsirConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SsirConfig
impl Debug for SsirConfig
Auto Trait Implementations§
impl Freeze for SsirConfig
impl RefUnwindSafe for SsirConfig
impl Send for SsirConfig
impl Sync for SsirConfig
impl Unpin for SsirConfig
impl UnsafeUnpin for SsirConfig
impl UnwindSafe for SsirConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more