Home » Software » HRIR with distance control

HRIR with distance control


We present an application capable of control the azimuth, elevation, and distance of sound objects in real-time. This 3D spatialization is done by computing the interpolation of a maximum of four HRIRs, depending on the virtual location, in real-time. 

Discrete impulse response locations. Original and interpolated kernels are denoted by ◦ and ×, respec- tively.
Discrete impulse response locations. Original and interpolated kernels are denoted by ◦ and ×, respectively.

BACKGROUND

  • Spatial audio cues are important in virtual environments to increase realism.
  • Convolving sound sources with a binaural head-related impulse response (HRIR) is a popular technique to spatialize them.
  • HRIR measurements are usually captured at a fixed distance, limiting the locations to points on a spherical surface.
  • HRIR datasets including recordings at different distances have become available.

MATERIAL

We used the database published in [1], 6344 locations recorded at 65.536 kHz (1024 taps):

Earprints in the original database
Elevation ≤ 50º 60º 70º 80º 90º
Number of earprints 72 36 24 12 1
Diffuse field average and its inverse used for diffuse field equalization. Note that the original recordings are high-pass filtered with a cutoff frequency of 70 Hz.
Diffuse field average and its inverse used for diffuse field equalization. Note that the original recordings are high-pass filtered with a cutoff frequency of 70 Hz.

OFFLINE PROCEDURES

  • Diffuse field equalization for headphone reproduction
  • Regularize grid: spacing 5º in azimuth, 10º in elevation, and 10 cm in distance.
  • Missing locations were linearly interpolated (LERP)
  • Only the right hemisphere HRIRs  were stored in a SQLite database for the real-time application.
  • Create a Pure-data object named hrir˜.

ONLINE PROCESSES

  • Up to four HRIRs are selected for interpolation.
  • Convolution is computed for every DSP block in Pd (64 samples by default).
  • Constant-power cross-fading with the output of the previous block
  • Fresh interpolations are performed only if the location of the virtual source is changed.
  • Users can specify the number of taps to be used in the interpolation as an argument of the hrir~ object. This number of taps must be a power of two.

RESULTS

  • Left outlet outputs the convolved signal for the left ear
  • Right outlet outputs the convolved signal for the right ear
  • Adjustable number of taps via HRIR˜ argument

Linear interpolations used in HRIR˜. Eight circumscribing measurements are regarded as a cube:

0simplex
0-simplex
1simplex
1-simplex
2simplex
2-simplex
3simplex
3-simplex

 

 

 

 

 

REFERENCES

[1] Tianshu Qu, Zheng Xiao, Mei Gong, Ying Huang, Xiaodong Li, and Xihong Wu. Distance-Dependent Head-Related Transfer Functions Measured With High Spatial Resolution Using a Spark Gap. IEEE Trans. on Audio, Speech & Language Processing, 17(6): 1124–1132, 2009.

[2] J. Villegas. Locating virtual sound sources at arbitrary distances in real-time binaural reproduction. Virtual Reality, 19(3):201–212, Oct 2015.