Hacker News new | ask | show | jobs
by jka 2208 days ago
You might be interested in https://www.calla.chat/ ( https://github.com/capnmidnight/Calla ) which supports spatialized audio based on participant location on a top-down map.

Edit: in some ways, this might be totally off-base since it does involve a game and participant self-arrangement. Hopefully it's somewhat relevant, though!

1 comments

I could be wrong, but based on the README this looks like it just sets speaker volume based on position - which is neat, but is not quite positional audio.
I wondered about that too, and found https://github.com/capnmidnight/Calla/commit/abc851b49bd1801... before commenting which seemed to indicate that there's at least stereo positioning. It's possible I'm mistaken though.
Oh interesting, it looks like you're right! They do appear to be using a StereoPannerNode rather than the full 3D PannerNode[0], but that is more than just speaker attenuation.

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

That's an old commit. It's had spatialized audio for the last month, at least.

I'm actually going to put a feature back in to let you select the audio "spatialization" model, because some folks have had trouble with PannerNode not working right. I used to have a selection between volume scaling, StereoPannerNode, and PannerNode. Been a little too busy at the day job to do it lately.