The Auditory Modeling Toolbox

Applies to version: 0.10.0

View the code

Go to function

ENZNER2008 - Calculate HRIR set using the method of Enzner et al. (2008)

Usage

[hrir_data,hrir_angles,fs] = enzner2008(mu,delta_phi,...)

Input parameters

x reference signal (excitation signal used for the measurements)
y recorded binaural signal
P structure with parameters
--X_DOT_mu : NLMS stepzize, e.g., 0.75 or 1
--X_DOT_delta_phi
: azimuthal resolution (delta_phi) in degree to store
hrir,e.g., 0.1 or 1

.h_length : length of the impulse responses in samples, e.g., 256 (or 308 for single channel perfect sweeps)

.adapt : overhead at the end and the beginnig, depends on the recording.
No. of symmetrically overlapping samples of the recorded ear signals arround phi = 180 deg, used as adaptation buffer before HRIR data will be stored, also used to shift the algorithm's input signals to enshure causality, e.g, .adapt = 20000 for the given examples
.sys_latency : system latency, No. of samples to shift the input signals against
each other (ensure causality), e.g. 30 if using a reference recording or -290 if using loudspeaker driving signals(playback signals) whereupon the loudspeaker distance is approx. 2 m (fs = 44100)

Output parameters

hrir_data
sampled HRIR data at the azimuth-resolution delta_phi with the structure:

hrir_data(filter coefficients, left/right, no. of channels, azimuthal index)

filter coefficients: see h_length

left/right: 1 = left, 2 = right

no. of channels: allways 1 (single channel NLMS-algorithm)

azimuthal index: corresponding to an azimuth phi. The rotational direction during the
recording of the ear signals is counterclockwise! (1 = -180 deg, 2 = -180 deg + delta_phi, end = 180 deg - delta_phi )
hrir_angles vector with azimuthal angles corresponding to the azimuthal index of hrir_data
errorsig error signal (???)

enzner2008 calculates a set of HRIRs using the normalized LMS-algorithm. A test signal in mono, e.g., white noise, perfect sweeps, or a reference recording at the position in the middle of the listeners head is used as the input of the algorithm, whereas the other input of the algorithm is given by the corresponding spatially-continuous (i.e., dynamical) binaural recording.

This recording contains the measured ear signals along the trajectory of interest, e.g., the horizontal plane, plus some symmetric overhead. The overhead is used to ensure capturing of all data of interest, to give the algorithm a scope to adapt and to be able to shift the signals against each other to ensure causality (see sys_latency). The binaural recording of the ear signals has to begin/end at the rear of the subject. Thus the first recorded sample number subsequent to the required overhead (see adapt) corresponds to an azimuth of phi = 180° (rear).

From a given set of example files, the HRIR data will be calculated. Per default the measured ear signals (stimulus: white noise) and the corresponding reference recording will be used for the computation. If you want to use the loudspeaker driving signals or a perfect sweep data set, please uncomment only the case of interest in the section "changeable parameters" in lines 74-104. In this section you can also adjust the used filter length.

The computation is performed continuously for each sample, in compliance with a continuous-azimuth HRIR representation. The storage of the HRIR data is sampled with an arbitrary azimuth-spacing delta_phi. The HRIR data will be written into the array hrir_data.

References: