Skip to main content

Module hrtf

Module hrtf 

Source
Expand description

HRTF — analytic + KemarLite embedded tables (zero-heap hot path).

Full measured KEMAR datasets are optional cold assets; default hot path uses KemarLite (8-azimuth ITD/ILD samples) with analytic Woodworth/Rayleigh fallback delegated to etalon_signal::audio.

Structs§

BinauralGains
Binaural staging gains + ITD for stereo worklet.

Enums§

HrtfProfile
HRTF synthesis profile (hot path).

Constants§

DEFAULT_HEAD_RADIUS_M
Standard anthropometric spherical-head radius in meters (8.75 cm).
DEFAULT_SPEED_OF_SOUND_M_S
Standard speed of sound in dry air at 20 °C in m/s.

Functions§

binaural_analytic
Analytic binaural gains — azimuth ∈ [-π, π], elevation ∈ [-π/2, π/2].
binaural_from_position
Dispatch binaural model from active HrtfProfile.
binaural_kemar_lite
KemarLite binaural — interpolated embedded ITD/ILD tables.
binaural_render
Render a mono source at source (world space) into a binaural pair.
convolve_fir
Direct linear (FIR) convolution: y[i] = Σ_j signal[j]·h[i-j].
head_relative_position
Rotate source position into head frame (listener at origin, yaw around Y), delegated to etalon_signal::audio::head_relative_position.
hrtf_profile
The currently selected process-global HRTF profile.
pinna_elevation_notch_hz
Anthropometric pinna concha primary spectral notch center frequency in Hz for vertical elevation_rad $\in [-\pi/2, \pi/2]$ (Hebrank & Wright / Lopez-Poveda model).
room_damp_from_manifold
Manifold w biases room absorption (higher w → softer highs).
set_hrtf_profile
Select the process-global HRTF profile used by the hot path (Analytic or KemarLite; default KemarLite).
spherical_ild_db
Spherical-head Rayleigh / Brown-Duda diffraction Interaural Level Difference (ILD) in dB as a function of horizontal azimuth_rad and frequency_hz.
synthesize_hrir
Synthesize left/right HRIRs from gains, delegated to etalon_signal::audio::synthesize_hrir_into.
woodworth_itd_seconds
Woodworth / Rayleigh spherical-head Interaural Time Difference (ITD) in seconds: $$\text{ITD}(\theta) = \operatorname{sign}(\theta) \cdot \frac{a}{c}\left(\phi + \sin\phi\right)$$ where $\phi = \arcsin(\sin|\theta|) \in [0, \pi/2]$ is the lateral angle from the median plane, $a$ is head_radius_m ($> 0$), and $c$ is speed_of_sound_m_s ($> 0$).