I’m working on creating a binaural plugin in JUCE and need a way to easily parse HRTFs based on the desired azimuth, elevation, and distance. The way that seems standardized by AES is using SOFA (Spatially Oriented Format for Acoustics) conventions. I was easily able to use this in MATLAB just by importing some folders and it allowed my to quickly find what HRTFs I wanted using the “find” functionality.
However, it seems much more difficult to integrate this into C++. I found an API at this link GitHub - sofacoustics/API_Cpp from the SOFA conventions page but have never worked with APIs before. Hence, I am at a loss for how to actually integrate this into my JUCE project. All I am looking for is a way to read an HRTF from a .sofa file that I made in MATLAB. Any help is appreciated!
sofacoustic’s upstream repo (which you linked to) is strangely not populated, I don’t know the story behind that. So consider that a dead upstream, libsofa is the new upstream.
If you don’t have experience using APIs, this is not maybe the easiest one to start with. Find some example usage if you can, this is probably the best API usage example contained to the repo itself (according to the docs):