Skip to main content

compute_itd_spectrogram

Function compute_itd_spectrogram 

Source
pub fn compute_itd_spectrogram(
    audio: [&NonEmptySlice<f64>; 2],
    params: &ITDSpectrogramParams,
    plan: &mut StftPlan,
) -> SpectrogramResult<ItdSpectrogram>
Expand description

Compute the Interaural Time Difference (ITD) spectrogram for a stereo audio signal.

The ITD spectrogram shows how the time delay between left and right ear signals varies across frequency and time. This is computed from the phase difference between channels, weighted by the magnitude product and normalized by frequency.

§Arguments

  • audio - Array of two audio channels [left, right] as non-empty slices
  • params - ITD spectrogram parameters
  • plan - Mutable STFT plan for efficient computation (reused across calls)

§Returns

An ItdSpectrogram containing ITD values in seconds with associated frequency and time axes.