music.hrir¶
- music.hrir(elevation=0, azimuth=90, directory=None)[source]¶
The impulse responses measured nearest to one direction.
- Parameters:
- elevationscalar
Degrees above the horizontal, from -40 to 90. Rounded to the nearest measured elevation, which are ten degrees apart.
- azimuthscalar
Degrees, measured from the ear axis as
localize()andlocalize_linear()measure them (onlylocalize2()measures from straight ahead): 0 is to the right, 90 straight ahead, 180 to the left and 270 behind. Rounded to the nearest measured azimuth, which are between five and thirty degrees apart depending on the elevation.- directory
path,optional Where the measurements are. Defaults to
hrtf_dir().
- Returns:
- elevation, azimuth
integers The direction actually measured, which is what the responses are for. Read them rather than assuming you got what you asked for.
- left, right
ndarray 512 samples each, at 44.1 kHz, scaled to [-1, 1).
- elevation, azimuth
- Raises:
FileNotFoundErrorIf the measurements are not there. Run
setup_hrtf().ValueErrorIf the elevation is outside the measured range.
- Parameters:
- Return type:
See also
localize_hrtfconvolves a sound with the pair.
setup_hrtffetches the measurements.
available_azimuthswhat was measured at an elevation.
Notes
The measurements are at a fixed distance of 1.4 metres, so they carry no distance cue: scale the result yourself for anything nearer or further.
Examples
>>> elevation, azimuth, left, right = hrir(0, 90) >>> left.shape (512,)