ambisonictoolkit / atk-reaper

Ambisonic Toolkit as a set of JSFX plugins for the REAPER DAW.
Other
74 stars 10 forks source link

SOFA/AES-69 import for binaural decoder? #43

Closed tumbleandyaw closed 8 years ago

tumbleandyaw commented 8 years ago

Is this something that could be a possibility in a future update or would this be a significant undertaking? Thanks for all the great work !

joslloand commented 8 years ago

Hello @tumbleandyaw

Thanks for the query.

My reading of SOFA is that one of the goals of the project is to provide a common interface to a variety of published HRIR libraries. A GitHub repo of their work for MATLAB/Octave is found here. And here, we can see their support of a range of HRIRs, including the Listen and CIPIC projects.

It is useful to know that the ATK's binaural decoders are not virtual loudspeaker decoders. That is, we don't just load HRIRs and treat them as virtual speakers. Instead, we use design optimized 1st-order decoders from (a large subset of) measured HRIRs found in the Listen and CIPIC collections. You can read some of the details at atk-kernels.

The ATK's binaural decoders exist as FIR kernels which combine both the decoding process and the binaural rendering in one FIR filter set. For each ear, there is a kernel for each spherical harmonic:

All this filter design is done offline as part of the atk-kernels project. There are many benefits in working in the spherical harmonic domain. Among other things, it means the amount of convolution we need to do in real-time is actually minimal. (Only 8 convolutions.) Also, it means we can do detailed design outside-real-time. (All the frequency and spatial domain optimizations described here.)

It would be possible to generate binaural decoders (atk-kernels) using the various HRIR libraries supported by SOFA. And/or, it would be possible to modify our kernel design code (currently not published... though that's intended at some point!) to read HRIRs stored in the SOFA format.

Also, it would be possible for SOFA to support HRIRs stored in the spherical harmonic domain.

The short answer... (after all this!)... is that directly loading HRIRs in SOFA format isn't a good solution in terms of decoder design. If SOFA ends up supporting spherical harmonic domain encoding, that would be possible. (Though, there are still design issues in terms of the Ambisonics choices that would need to be made.)

In the long(-er) run, we're intending to implement a more generalized binaural decoder model using some fancier DSP analysis/synthesis tricks. The intention is that the 'subjects' will be directly tied to head size, rather than 'individual'.

Just had a look at your web page & YouTube page.

Curious, had you been using any of the HRIRs found in the SOFA set and wished you could use them with the ATK?