The hrtf measurements were done by Bill Gardner and Keith Martin at MIT, here's a pointer to the home page of the measurements (a postscript copy of the article. Take a look if you want the details (or wish to see a picture of Kemar the dummy). The hrtf data lives in /usr/ccrma/snd/nando/hrtf. The "diffuse" subdirectory (which is the one being used by the instrument). Each subdirectory inside "diffuse" contains data for a particular elevation (that is, the elev40 subdirectory holds all the hrtf data sets corresponding to +40 degrees of elevation. Inside that directory you will find the actual impulse responses for a collection of azimut angles. Each impulse response is a stereo soundfile (without header) that includes the responses for both ears. If you want to take a look at how the impulse response looks open the .dat file in snd, you will be prompted to enter some information regarding the file as it has no header: Fill the panel with chans: 2 (stereo) and "16 bit big-endian". You will get two channels showing with the impulse response for the left and right ears.

The data in the directory structure is parsed and loaded into lisp by the function load-hrtf-data, which is called automatically the first time you try to use the instrument. Same thing happens with the fir filter coefficients that are use to do crosstalk cancellation in the case of loudspeaker reproduction.

The instrument accepts the following parameters:

start-time [mandatory parameter]

start time in seconds in the output soundfile

amplitude [mandatory parameter]

amplitude multiplier

file [mandatory parameter]

path name of the soundfile to be processed

elevation

elevation angle in degrees. The dataset includes point for elevations that go from a minimum of -40 degreed to a maximum of +90 degrees.

azimut

azimut angle in degrees.

reverb-amount

global reverberation amount. The enclosing with-sound has to specifiy a reverb instrument for this to work.

headphones

The default value is "t", which will not include the crosstalk cancellation fir filter. If you want to listen through loudspeakers set this to "nil".

Here is a very simple example of a percussive sound being convolved with the impulse responses for some azimut angles:

(with-sound(:channels 2 :statistics t)
(loop
for time from 0 by 0.3
for az from 0 by 5 below 181 do
(hrtf time
0.25
"/usr/ccrma/snd/nando/hrtf/knife-11.snd"
:azimut az :headphones t)))

The instrument will select the impulse response that is closest to the elevation and azimut angles specified. It will not try to interpolate between impulse responses (although I've tested this myself and seems to work).

Here is another HRTF database, and an article about the way the measurements were conducted. This database includes measurements for 45 real subjects and the Kemar artificial head with two different sized pineas.