3D Audio HRTF Patch using the KEMAR Database

Reuben H-M's icon

Hi everyone,

Apologies in advance for the state of the attached patch. I used Max quite a lot while studying my bachelor’s degree, but have not used it much since (4 years). Sorry for any silly questions I may ask also. I am trying to use the KEMAR database (compact database from this link, only contains the right ear as two different pinnae sizes were used for each ear: http://sound.media.mit.edu/resources/KEMAR.html) for 3D audio (with head tracking information taken from Unity and the Oculus Rift, see: ‘udpreceive’ object).

My main issues are with:
•    How to store the different HRTF files from the database so the correct one can be chosen. In the patch you can see that I have tried to use the two sliders to select the appropriate file from the database (azimuth and elevation), but as far as I can tell there is no way to read the filenames rather than the indexes from ‘polybuffer~’.
•    Another issue with doing it this way is that the database is not symmetric (or in numerical order), for example there is only one different azimuth for 90º elevation, but there is 37 different azimuths at 0º (varies depending on the elevation). Therefore it is possible to select 90º elevation and 180º azimuth, which does not exist.

The other method I tried in order to resolve the previous issues was to use ‘jit.matrix~’:
•    I am not sure if this is possible but I thought a resolution (to the data not being symmetric) could have been to store the HRTFs in separate matrices for each elevation (with separate read folders for each, see ‘p readfoldersjitmatricies’ subpatch and then store these matrices within another matrix containing all of them. Although, how this object actually functions is confusing me slightly.

The ‘multiconvolve~’ object was used also which can be found in the following link: https://github.com/meta-meta/MaxPatches/tree/master/_externals/HIRT_v1.1.

Any help with any of these problems or suggestions of other methods I could try would be massively appreciated.

Reuben H-M's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Song Li's icon

I am also doing some thing about that. Did you have resolved the problem?
Please tell me

Roman Thilenius's icon

why not use buffer~.