@retrojoystick
I think it's high time a spatial audio framework was put to use in accessible web design.
In a perfect world, haptic CSS, using a vibration api, would be a thing that @Apple doesn't block in Safari.
Anyway, here's a js audio framework that works, universally.
---
A=new AudioContext;
P=(f,x,o=A.createOscillator(),p=A.createStereoPanner(),g=A.createGain())=>{
o.connect(g).connect(p).connect(A.destination);
p.pan.value=x/innerWidth*2-1;
o.frequency.value=f;
g.gain.value=.1;
o.start();o.stop(A.currentTime+.2)}
onmouseover=e=>A.state=='running'&&(h=e.target.dataset.hz)&&P(h,e.clientX)
onclick=()=>A.resume()
---
frontend code example:
<!-- Just add data-hz="frequency" -->
<button data-hz="200">Left Bass</button>
<button data-hz="440">Center Mid</button>
<button data-hz="880">Right High</button>
Have fun!