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.
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):
Elevation | ≤ 50∘ | 60∘ | 70∘ | 80∘ | 90∘ |
---|---|---|---|---|---|
Number of earprints | 72 | 36 | 24 | 12 | 1 |
OFFLINE PROCEDURES
- Difusse field equalization for headphone reproduction
- Regularize grid: spacing 5∘ in azimuth, 10∘ in elevation, and 10 cm in distance.
- Missing locations were interpolated:
- Distances: linear interpolation (LERP)
- Azimuths: spherical LERP (SLERP)
- 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:
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 and M. Cohen. Real-time head-related impulse response filtering with distance control. In Proc. 135 Audio Eng. Soc. Int. Conv., New York, Oct 2013.