Skip to content

feat(binaural): fit the PRTF model's tracks to the embedded KEMAR set (S2-17) - #352

Merged
mgth merged 1 commit into
mainfrom
feat/binaural-prtf-kemar-fit
Sep 2, 2026
Merged

feat(binaural): fit the PRTF model's tracks to the embedded KEMAR set (S2-17)#352
mgth merged 1 commit into
mainfrom
feat/binaural-prtf-kemar-fit

Conversation

@mgth

@mgth mgth commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Series 2, lot 3, S2-17 — PRTF fitted on the embedded KEMAR.

The Spagnol PRTF model's parameters (two concha resonances, three elevation notches) were a population average read off the SITIS 2011 figures, as linear ramps in elevation. Against the embedded KEMAR set in the median plane they were further from it than no pinna colouration at all.

  • KEMAR_TRACKS: per 10° of elevation (−50°…+90°), the resonance envelope's first peak and its level around 12 kHz, and three notch tracks (centre, depth, width) of the ear-averaged KEMAR response over the analytic head shadow — what the PRTF multiplies. Rows interpolate linearly; a notch absent on one side of a gap fades in place instead of sweeping.
  • The extraction is reproducible: print_kemar_prtf_tracks (ignored test, -- --ignored --nocapture) prints the table from the embedded set — twelfth-octave magnitude, an upper envelope by three passes of clamped half-octave smoothing, the residual's minima assigned to the tracks by continuity (a jump past 2 kHz starts a track that was absent).
  • Filters, depth, freq_scale, the per-ear shading and the runtime cost are unchanged. MeasuredHrirData::nearest_measurement (module-private) exposes a measurement for the analysis.

Measurement

Mean absolute error of the model's pinna response against KEMAR's, 3–16 kHz, over the 15 rows:

model error
fitted tracks 2.44 dB
previous ramps 9.86 dB
no pinna (bare head shadow) 8.35 dB

Tests

  • kemar_fit_tracks_the_median_plane (fit < 0.6 × ramps and < 0.5 × flat, prints [measure]), prtf_varies_smoothly_with_elevation (a 1° step moves < 2 % of the response's energy). Existing PRTF tests unchanged and green.
  • cargo test -p renderer --lib: 383 passed, 3 ignored. Golden unchanged (KEMAR).

Listening

prtf source: elevation of height objects, and the timbre against saf — the fit is KEMAR's own pinna, so prtf at 100 % should now sit close to saf in the median plane while staying individualisable with the notch frequency scale.

🤖 Generated with Claude Code

@mgth
mgth force-pushed the feat/binaural-prtf-kemar-fit branch 2 times, most recently from f020f5c to f8e0ca4 Compare September 2, 2026 17:37
S2-17. The Spagnol PRTF model's parameters — two concha resonances and
three elevation notches — were a population average read off the SITIS
2011 paper's figures, as linear ramps in elevation. Measured against the
embedded KEMAR set in the median plane they were further from it than no
pinna colouration at all (9.86 dB mean absolute error over 3–16 kHz
against 8.35 dB for the bare head shadow).

The parameters are now a table fitted to that set: per 10° of elevation
from −50° to +90°, the resonance envelope's first peak and its level
around 12 kHz, and three notch tracks (centre, depth, width) of the
ear-averaged KEMAR response over the analytic head shadow — what the
PRTF multiplies. The extraction lives in this file's tests as the
`print_kemar_prtf_tracks` instrumentation (twelfth-octave magnitude, an
upper envelope by three passes of clamped half-octave smoothing, the
residual's minima assigned to the tracks by continuity, a jump past
2 kHz starting a track that was absent instead of sweeping one), and its
output is pasted as `KEMAR_TRACKS`. Rows interpolate linearly; a notch
absent on one side of a gap fades in place. The filters, `depth` and
`freq_scale` are unchanged; the model is now "KEMAR average" rather than
"figures average". Mean absolute error against KEMAR: 2.44 dB.

`MeasuredHrirData::nearest_measurement` exposes a measurement and its
direction to the module for that analysis.

Tests: the fit beats the ramps and the bare head by the margins above
(`kemar_fit_tracks_the_median_plane`, prints the figures); one degree of
elevation never changes the response by more than 2 % of its energy
(`prtf_varies_smoothly_with_elevation`). Golden unchanged (KEMAR).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mgth
mgth force-pushed the feat/binaural-prtf-kemar-fit branch from f8e0ca4 to 8b09c47 Compare September 2, 2026 17:43
@mgth
mgth merged commit c6f651e into main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant