facebookresearch / BinauralSDM

This repository contains a set of tools to render Binaural Room Impulse Responses (BRIR) using the Spatial Decomposition Method (SDM).The implementation features a series of improvements presented in Amengual et al. 2020, such as quantization of the direction of arrival (DOA) estimates to improve the spectral properties of the rendered BRIRs, or RTMod and RTMod+AP equalization for the late reverberation.The repository also contains the necessary files to 3D print an array holder of optimized topology for the estimation of DOA information.
Creative Commons Attribution 4.0 International
46 stars 6 forks source link

Feature: Add BRIR SOFA export #5

Closed HaHeho closed 2 years ago

HaHeho commented 2 years ago

The export of separate WAV-files per direction was practical for our real-time rendering method, but it is probably not very practical for other people. ;)

Adding some functionality to write and validate a SOFA-file containing the rendered multi-directional BRIRs (a version with direct sound + early reflections only and one with the full BRIRs); isn't much effort to add.

svamengualgari commented 2 years ago

That's a good suggestion. Any ideas on readily available tools that could handle the convolution of the SOFA files? I think the 6 DoF convolver from the SPARTA plug-ins might work with them, but I haven't tried it.

HaHeho commented 2 years ago

I don't really know. I have asked Leo and he said he doesn't know a plugin either. So I assume there is something about that use case which wouldn't work with https://leomccormack.github.io/sparta-site/docs/plugins/sparta-suite/#6dofconv.

Maybe a SOFA BRIR rendering plugin with arbitrary 3DOF resolution could be made out of the former somewhat easily? Someone should totally make a plugin which covers this use case!! That could be a very handy tool for all kinds of listening tests, where any kind of processing can be evaluated without any channel limitation when pre-rendered a high-resolution BRIR grid. 💯

HaHeho commented 2 years ago

An initial export of a SOFA file was implemented in 3c5a489e550d9283c503a95519fbb31ea8efa108.

The generated SOFA file uses the convention SingleRoomSRIR, which should be used over SimpleBRIR according to being deprecated in AES69-2020 (SOFA 2.0).

HaHeho commented 2 years ago

Closing this since after merging it is available now in the main branch.

The exported SOFA files can be loaded with the Matlab API, but this has not been verified in other way yet (due to no convenient renderer being currently available, as discussed above).