Skip to content

HRTF Player

Hrtf Player

Overview

A tool for visualizing data from SOFA files containing HRTF (Head-Related Transfer Function) and auditioning it by listening to actual sounds. It is useful in spatial audio (3D audio) production and research for intuitively understanding HRTF data characteristics or testing if they match your own ears.

☕ Coffee Break: The Mystery of Hearing Sounds from 'Behind' with Earphones

Stereo earphones only have speakers on the 'left' and 'right', so why do sounds in modern games and VR seem to come from 'behind' or 'above' you?

Actually, our 'earlobes (pinnae)' have a very complex shape. When a sound comes from behind versus from the front, the way it bounces and reflects off this complex earlobe (changing the sound quality) is subtly different. From years of experience, the brain has learned, 'Ah, when the sound is muffled in this specific way, it means it's coming from behind.' HRTF (Head-Related Transfer Function) is the recorded data of these reflection patterns of the earlobes and head—'when it comes from the front, the sound quality changes like this,' and 'when from behind, it changes like that.' If you 'multiply' normal sounds by this HRTF data and play it through earphones, your brain is tricked into thinking, 'It's ringing from behind!' The HRTF Player is a tool to peek inside the contents of that magical data.

Features and UI

Main Plot (Heatmap)

The graph occupying most of the screen displays HRTF characteristics based on the sound source position (Azimuth and Elevation).

  • X-axis (Azimuth): Horizontal angle. 0° is the front, -90° is left, 90° is right, and 180/-180° is directly behind.
  • Y-axis (Elevation): Vertical angle. 0° is horizontal, 90° is directly above, and -90° is directly below.
  • Color: Represents the value of the selected metric (such as ITD or ILD).
  • Click Interaction: Clicking anywhere on the graph plays a test sound with the HRTF corresponding to that position (one-shot audition).

Controls (Basic Operations)

  • Load SOFA: Load a SOFA file (.sofa, .nc) you want to analyze or audition.
  • Metric: Select the analytical data to display on the heatmap.
    • ITD (µs): Interaural Time Difference. Displays the time difference between sound reaching the left and right ears.
    • ILD (dB): Interaural Level Difference. Displays the difference in sound level between left and right ears due to head shadowing.
    • High-band Energy: Strength of high-frequency components (8kHz to 16kHz). Provides clues for perceiving "above and below" sound positioning.
    • Envelope Peak: Peak time of the delay. Similar to ITD, but looks at characteristics closer to group delay.
  • Sound: Choose the type of test sound used for click auditions.
    • Click: A brief impulse sound. Useful for sharply confirming reflections and localization.
    • White Noise: 50ms white noise. A "hissing" sound that makes it easy to check changes in frequency response.
    • Band Noise: 8kHz–16kHz band noise. Specialized for confirming high-frequency localization (up/down).
  • Swap L/R: Swaps the left and right output channels.

Rotation Mode (Continuous Playback / Rotation)

Allows loading a music file and simulating a sound source rotating around you.

  • Load Music: Load a music file (.wav, .mp3, etc.) for auditioning.
    • Limit: There is a file size limit of 500 million total samples (approx. 1 hour 26 mins for 48kHz Stereo).
  • Play Rotation / Stop: Starts and stops rotation playback.
  • Mode: Select the rotation pattern.
    • Horizontal: Rotates horizontally around you.
    • Vertical: Rotates vertically (up and down).
    • Manual: No automatic rotation. You can move the sound source position in real-time by dragging on the graph with your mouse.
  • Speed: Sets the speed of automatic rotation (degrees per second).

Usage Examples

Checking HRTF Data Characteristics

When you obtain a new SOFA file, use this to verify if the data was measured correctly.

  1. Set Metric to ITD.
  2. Observe the graph to see if the color changes smoothly from left (-90°) to right (90°).
  3. Switch to High-band Energy.
  4. If colors change in a striped pattern along the median plane (Azimuth 0°) as Elevation changes (spectral cues), it indicates that up/down localization information is included.

Selecting an HRTF That Suits You

Use this when looking for a suitable HRTF from a general-purpose database rather than a personalized profile.

  1. Load music, set Mode to Horizontal, and play.
  2. Listen with your eyes closed and check if the sound feels like it's "rotating outside your head" rather than "playing inside your head."
  3. Switch to Vertical and confirm if the sound clearly moves up and down.
  4. If an HRTF doesn't suit your ears, vertical movement may only sound like a change in tone, or the sound might localize inside your head.