Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.37k stars 976 forks source link

Panner Node Not Working As Intended #1140

Closed jonobr1 closed 1 year ago

jonobr1 commented 1 year ago

Describe the bug

I expect the Tone.Panner node to route audio to the left speaker or the right speaker based on the Tone.Panner.pan.value between -1 and 1. It changes, but audio is heard from both speakers at all times.

To Reproduce

Head to this Codepen: https://codepen.io/jonobr1/pen/JjZbyQX Hit play and then change the slider with your mouse.

Expected behavior Expect the audio to pan from left to right, but audio is heard from all speakers at all times.

What I've tried I tried checking out the Mixer example and it also has the same issue when soloing and adjusting the Pan: https://tonejs.github.io/examples/mixer

Additional context This is on MacOS 13.0 (22A380) Chrome, Safari, and Firefox as well as iOS 16 on Mobile Safari. I can't tell, but this could be an issue with the Web Audio API itself.

jonobr1 commented 1 year ago

Sorry, I was using the wrong Panner!