Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using spaudiopy to generate spherical harmonics for resonanceaudio for another hrtf dataset #31

Open
brightening-eyes opened this issue Jun 11, 2024 · 2 comments

Comments

@brightening-eyes
Copy link

hello,
I would like to use another hrtf dataset in resonanceaudio other than its default one.
can you guide me on how would I use spaudiopy to read and create spherical harmonics for resonanceaudio?
it has some matlab scripts, but its just for its default dataset.
for example for mit kemar, data, how can I process it into spherical harmonic wavs?
thanks.

@chris-hld
Copy link
Owner

I am not familiar with that SDK. Is it possible to use the SOFA file format for loading HRTFs? Then it would be quite straight forward to load other HRTFs.
Maybe someone more familiar with the resonance SDK could chime in here?

@trsonic
Copy link

trsonic commented Dec 12, 2024

Hey, this sounds like something I'm familiar with.

Resonance Audio HRIRs are embedded into the source code (see hrtf_assets.h).

The source code can be generated using generate_hrtf_assets.py. It takes SH-decomposed HRIRs saved as multichannel .wav files. The filters need to be ACN/SN3D compliant. Only 1st, 2nd and 3rd order filters are supported. Resonance Audio assumes head symmetry, therefore only left ear data should be provided.

So to replace the original filters.... load a .sofa file, calculate MagLS filters (probably the most reasonable choice), sort out normalisation, save left ear data into a multichannel .wav file (48 kHz / 16 bit). Proceed with the Python workflow, replace the source files and recompile the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants