The Auditory Modeling Toolbox

Applies to version: 0.10.0

View the code

Go to function

ITDESTIMATOR - Estimate ITD from a binaural signal

Usage

itd = itdestimator(data,mode,threshlvl,lowpass,butterpoly,upper_cutfreq)

Input parameters

data
SOFA object or IR matrix with dimensions:
emitter x receiver x time
fs sampling rate, used only if data provided as matrix
mode

(optional) Select one estimation methods ('Threshold' (default),'Cen_e2','MaxIACCr', 'MaxIACCe', 'CenIACCr','CenIACCe', 'CenIACC2e', 'PhminXcor','IRGD')

For details concerning estimation methods see: 'http://asa.scitation.org/doi/10.1121/1.4996457'

lowpass (optional) Bandwidth considered. 'lp' for lowpass (default), 'bb' for broadband
peak (optional) Method to find the max, used in Threshold mode only. 'hp' for max (default), 'fb' for findpeak
threshlvl (optional) Set threshold level for 'Threshold' mode in dB. Default is -10 dB.
butterpoly (optional) Select the order of the polynom applied in the butterworth filter. ( 2 =< i =< 10 ) Default is 10.
upper_cutfreq (optional) Set frequency of lowpass cutoff in Hz. Default is 3000 Hz.
lower_cutfreq (optional) Set frequency of highpass cutoff in Hz, only used in IRGD mode. Default is 1000 Hz.

Output parameters

itd interaural time difference in seconds
toa detected activation onsets for left and right channels
IACC interaural cross-correlation coefficient Available on when xcorr is used (modes: 'MaxIACCr', 'MaxIACCe', 'CenIACCr','CenIACCe', 'CenIACC2e')

Purpose: Estimates the ITD based on biaural impulse responses. Several different estimaton methods can be chosen. MaxIAACe is recommended.

Requirements:

  1. SOFA API from http://sourceforge.net/projects/sofacoustics for Matlab (in e.g. thirdparty/SOFA)

Examples:

Obj = SOFAload(fullfile(SOFAdbPath,'baumgartner2017','hrtf b_nh15.sofa')); toa_diff = itdestimator(Obj,'MaxIACCe','lp','upper_cutfreq',3000)

With these settings the estimator uses the MaxIAAce method and applies a lowpass with a cut off frequency of 3 kHz.

The output array is structured as the SOFA Data.IR If you would like to select for example only data on the horizontal plane you could:

plane_idx = find( Obj.SourcePosition(:,2) == 0 ); plane_angle = Obj.SourcePosition(plane_idx,1);