polarch / JSAmbisonics

A JS library for first-order ambisonic (FOA) and higher-order ambisonic (HOA) processing for browsers, using Web Audio.
BSD 3-Clause "New" or "Revised" License
152 stars 25 forks source link

JSAmbisonics vs Omnitone #8

Closed jwerle closed 7 years ago

jwerle commented 7 years ago

Hi!

Great project! I'm interested in reading about some benefits to using this library over Omnitone. Any thoughts?

polarch commented 7 years ago

Hi jwerle,

This library was published before Omnitone if I remember correctly, and it was already enabled for higher-order ambisonics processing. It is was one small part of my doctorate (the rest being very high-resolution spatial audio rendering techniques, not suitable for browsers) . I haven't really tried Omnitone, but from what I saw in the description is the bare minimum of a binaural ambisonic processing pipeline.

About advantages: First-order processing is important for the main reason that practical and affordable spherical recording of sound scenes can deliver only first-order at the moment, and that's what most people will be able to find. Higher-order recording microphone arrays may become popular in the future, but at the moment they are confined mostly in research and are very expensive (you can hear some recording samples in the library's demos, using one such array, the Eigenmike). So most recorded material will most likely be first-order and we need good binaural decoders for it.

However, first-order is not adequate to deliver very sharp binaural cues, it spreads perceived directionality in wide region around the direction that a source is coming from (similar to a blurring filter on an image, to make a visual parallel). Higher-orders fix this issue. Hence for my opinion, synthesized or produced spatial sound scenes should always be using at least 3rd-order. Higher-orders inctroduce theoretical complexity though, the simple rotation formulas of first-order material etc. are not adequate. That's the reason that I coded a separate JS spherical harmonic library that deals with these issues for arbitrary orders (Spherical harmonics are the basis on which the ambisonic format is based). You can hear the effect of the order on sharpness on the HOA online examples.

Other than that, there are a number of features that make the library quite complete:

And there are more coming :-). There will be a publication/presentation in an audio conference this week, that presents the maths and implementation choices in detail. I will include that information on the project's page when it is out.

By the way, this is not a competition, it is good that there are more than one web ambisonic libraries out there in my opinion, especially from major players like Google! And I'm sure the Omnitone project will catch up soon to these developments!

Sorry for the long read, I hope that answers the question, don't hesitate to ask for more clarifications.

polarch commented 7 years ago

By the way I realized you are one of the Omnitone developers, if you would like to integrate any of these features in the Omnitone and you need clarifications, or you think we can collaborate on that, let me know..

jwerle commented 7 years ago

Sorry for the delay. Thanks for the detailed response! We're exploring this library for https://github.com/littlstar/axis2/tree/dev

polarch commented 7 years ago

Nice work! If you try to integrate and you have any questions let me know. You can check also one of the examples of integrating the library with spherical video playback on a mobile device (using THREE.js, what you guys have seems much more advanced!)

You may also find interesting a project of friends here in Finland, Vizor.io, for creating interactive VR content on the Web, in which we are also integrating ambisonics support using JSAmbisonics:

vizor.io

and

https://github.com/vizorvr/vizor