pub struct ITDSpectrogramParams { /* private fields */ }Expand description
Parameters for computing Interaural Time Difference (ITD) spectrograms.
ITD represents the time difference between when a sound reaches the left and right ears. It is the primary cue for sound localization at low frequencies (typically below 1500 Hz), where the wavelength is large enough that phase differences are unambiguous.
§Fields
spectrogram_params- Base STFT parameters (FFT size, hop length, window, etc.)start_freq- Lower frequency bound for ITD analysis (Hz)end_freq- Upper frequency bound for ITD analysis (Hz)magphase_power- Power to raise magnitude-phase product to
Implementations§
Source§impl ITDSpectrogramParams
impl ITDSpectrogramParams
Sourcepub fn new(
spec_params: SpectrogramParams,
start_freq: f64,
stop_freq: f64,
magphase_power: Option<NonZeroUsize>,
) -> SpectrogramResult<Self>
pub fn new( spec_params: SpectrogramParams, start_freq: f64, stop_freq: f64, magphase_power: Option<NonZeroUsize>, ) -> SpectrogramResult<Self>
Create new ITD spectrogram parameters.
§Arguments
spec_params- Base spectrogram parametersstart_freq- Lower frequency bound in Hz (must be positive)stop_freq- Upper frequency bound in Hz (must be > start_freq and < Nyquist)magphase_power- Optional power for magnitude-phase product (defaults to 1)
§Errors
Returns SpectrogramError::InvalidInput if:
- Frequencies are not positive
- Start frequency >= stop frequency
- Stop frequency > Nyquist frequency (sample_rate / 2)
- Sample rate is not positive
Trait Implementations§
Source§impl Clone for ITDSpectrogramParams
impl Clone for ITDSpectrogramParams
Source§fn clone(&self) -> ITDSpectrogramParams
fn clone(&self) -> ITDSpectrogramParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ITDSpectrogramParams
impl Debug for ITDSpectrogramParams
Source§impl<'de> Deserialize<'de> for ITDSpectrogramParams
impl<'de> Deserialize<'de> for ITDSpectrogramParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ITDSpectrogramParams
impl RefUnwindSafe for ITDSpectrogramParams
impl Send for ITDSpectrogramParams
impl Sync for ITDSpectrogramParams
impl Unpin for ITDSpectrogramParams
impl UnsafeUnpin for ITDSpectrogramParams
impl UnwindSafe for ITDSpectrogramParams
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
Mutably borrows from an owned value. Read more