Hello, I’m doing a fairly large project involving virtual reality and 3D sound. I’m trying to use the binaural decoder in the 3D example within the ofHOA addon and whenever I attempt to use this function I get no sound. Is there something more I need to do more than simply un-commenting that example?
@cabral1349 , I’ve noticed you’re fairly active on this site. Is there something I’m missing with this?
Hi, normaly this example should work out of the box just by changing the commented line.
I’ve tested it here and I’ve ran into the same problem as you. This is probably due to some change in the way the library handles the binaural decoder, since the 2Dexample also no longer works.
I’m no longer working with the HOA team, but I’ll look into it.
It seems that the library now uses the function processBlock(const T** inputs, T** outputs) to perform the binaural decoding. I’ve not figured out how to make it work in oF. I’ll meet Pierre Guillot, one of the maintainers, friday october 9th. If you don’t receive an answer from github until then I’ll ask him directly
@Garrett_Burnett I’ve posted a working example of binaural 2D. It’s slightly different from the other examples, but I think you’ll understand it. I changed a bit the coding style, preffering a less raw pointer approach.
Feel free to ask any questions!
it’s been a pleasure =)
What is clicky about the sound? Here it’s working fine… maybe it’s just the ofxHoa built-in oscillator. It’s not a very good oscillator, it’s there just for demonstration purposes.
Please try it out with ofxStk or other audio sources and tell me if you got good results.
One last thing I’ve just been told: you can use the setCropSize(int i ) function to change the resolution of the binaural convolution. The maximum size is 512, and by setting it to 256 I have a much lighter process without a loss in quality that I can perceive (my cpu usage dropped to 26%)
I’ve pushed this changes to the repo.
@cabral1349 Thanks so much for your help. I understand so much more now. Any chance you’d be able to show a binaural example of multiple 3D sources? I’m having issues with binaural on the current 3D sources project.
I don’t know if I’ll have the time to do an example anytime soon, but here are a few considerations:
It will work like the Binaural 2D example, but you should have a Decoder::Binaural<Hoa3d, float> instead of a Hoa2d one.
Our binaural models only work at 44.1khz because we don’t provide de hrir filters for other sample rates.
3D binaural is not very reliable, when the sound goes up people here all sorts of different things.
That said, when I made the addon we didn’t have a semisphere of speakers to test the ofxHoaCoordinates in 3D. So even though I think they work properly, they were only tested with the binaural decoder.
Whenever I have the time again I’ll rework the examples to clarify those things and also test the 3D example in a semisphere (now that I’m no longer working there they have one…)