davircarvalho / Individualized_HRTF_Synthesis

Synthesis of individualized HRTFs based on Neural Networks, Principal Component Analysis and anthropometry
GNU General Public License v3.0
62 stars 7 forks source link

[Feature request] Uniform layout/elevations #7

Closed ThreeDeeJay closed 2 years ago

ThreeDeeJay commented 2 years ago

I'd love to use these HRTFs in OpenAL Soft, but the SOFA to MHR converter requires uniform elevations:

The EAC_48kHz.sofa file doesn't contain a usable uniform layout. The elevations go -57.00, -30.00, -15.00, +0.00, +15.00, +30.00, +45.00, +60.00, +75.00, where it's missing the top +90 degree response, and the bottom -57 degree response doesn't reflect position of the +60 degree response (though that might not be too important; it should just drop the -57 degree responses and synthesize the -45, -60, -75, and -90 responses, if +90 existed).

Someone pointed out that the MATLAB app allows interpolating points, so it would be nice to have an option in the app to specify elevation density

Another issue here (though it wouldn't have prevented the mhr from being made), is that there aren't that many elevations. While the number of azimuths is somewhat dense (72 at each elevation, 5 degrees apart), the number of elevations is pretty sparse (ignoring the misplaced and missing elevations, they're 15 degrees apart). This could be an issue for certain ambisonic uses, since there could be a fair amount of height error.

davircarvalho commented 2 years ago

Hello,

Please check the latest commit for custom grid output, I hope that satisfies your request. I'll soon update the standalone too.

I see that it also asks for delay field and HRTFs to be aligned, I could look into that, but i can't promise when. let me know if that is really relevant.

Cheers.

ThreeDeeJay commented 2 years ago

Fair enough, I can wait. By the way, I tried setting up MATLAB GitHub actions to see if it can compile the project on every push and upload to GitHub automatically:

Starting in R2022b, the MATLAB® build tool provides a standard programming interface to create and run software-build tasks in a uniform and efficient way. For example, you can create tasks that identify code issues, run tests, and package a toolbox in a single build file in your project root folder, and then invoke the build tool to run these tasks. For more information, see Overview of MATLAB Build Tool.

but if I understand it correctly, it requires a buildfile.m script containing commands to run, and I'm not really that familiar with MATLAB so maybe you could check it out and see if it's worth setting this up. 🤔

Use the Run MATLAB Build action to run a build using the MATLAB build tool. You can use this action to run the tasks specified in a file named buildfile.m in the root of your repository.

ThreeDeeJay commented 2 years ago

I still haven't managed to convert EAC SOFAs to OpenAL Soft's MHR format as I reported in the mentioned issue above, but the Non-uniform elevations error doesn't happen anymore with the custom grid so I'll go ahead and close this issue and report back if I run into other issues. Thanks for taking time to fix this issue and compiling a new build! 👍