Sam Gentle.com

VRoom

vroom!

I was hunting through my Code directory and I found this neat demo I made last year for a WebRTC hack day. It's called VRoom and it's an experiment with audio spatialization and environmental effects. It uses a PannerNode in HRTF mode to pan the sound and apply extra processing to make it sound more directional.

There are maybe a few cleverer ways to do environmental effects. Hard Mode would be to actually do full audio raytracing, but that's probably overkill for most things. Instead, I think it might be sufficient to just use two ConvolverNodes; one based on a distance query to cover reflective noises (like echoes on concrete) and one based on an intersection query to cover refractive noises (replacing the current distance-scaling effect).

It's pretty crazy when you think about just how much there is in the Web Audio API. And all the new web APIs for that matter. There's not much difference between the web and a complete OS anymore.