Hacker News new | past | comments | ask | show | jobs | submit login

Thanks! I'm confused about what this is, exactly, from the description:

> Songbird is a JavaScript API that supports real-time spatial audio encoding for the Web using Higher-Order Ambisonics (HOA). This is accomplished by attached audio input to a Source which has associated spatial object parameters. Source objects are attached to a Songbird instance, which models the listener as well as the room environment the listener and sources are in. Binaurally-rendered ambisonic output is generated using Omnitone, and raw ambisonic output is exposed as well.

My confusion is that The Web Audio API [1] also supports real-time spatial audio for the Web [2]. It looks like Ambisonics is a format that encodes spatial audio into a fixed set of audio channels, rather than just playing audio into PannerNodes directly.

Some questions: (1) Is Songbird indeed an alternative to the PannerNode API like I'm suspecting? (2) If so, why would you want to downmix your audio into a set of intermediate channels, rather than play each source directly into a PannerNode? (3) Is there any advantage to using Omnitone, which I suspect does the HRTFs, rather than using a PannerNode and its HRTFs directly?

[1] https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_A...

[2] https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_A...




Hi Toomin,

Thanks for your interest! Let me try to clarify and answer your questions:

1. Songbird is indeed an enhanced alternative to PannerNode.

2. It internally works with ambisonics, but outputs stereo (we use Omnitone internally to render the multichannel audio down into a stereo track).

The general reason people use ambisonics instead of direct HRTF rendering is because ambisonics allows for head rotation prior to rendering, so the user can easily turn their head, etc. without you having to adjust all the incoming sources' hrtfs.

The reason we feel Songbird is an upgrade to PannerNode is three-fold:

One, you can control the quality of the localization/spatialization effect by adjusting ambisonicOrder (1st to 3rd, atm).

Two, PannerNode is costly... 2 convolutions per source, while songbird is a fixed number of convolutions irregardless of the number of sources, so it ends up allowing you to get more for less.

Three, PannerNode doesn't support any sort of room modelling and Songbird produces spatialized (ambisonic) room reflections and reverberation.

Hope this helps clarify things! :)

Cheers, Drew


That's exactly the information I needed! Thank you! It would be great to have this on the homepage.


Noted! Will add a better explanation to the README. :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: