-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug with chained panners #609
Comments
I looked into this a little and it's related to chrisguttandin/standardized-audio-context#647. It might require a parameter being passed into the constructor indicating that the source signal is stereo instead of mono until Safari implements the StereoPannerNode natively. This isn't ideal, but also might be a bit of an edge case where multiple StereoPanners are chained together. Will investigate a little more into other options. |
Hi @maximedupre, I played a bit with your example. I think I don't fully understand what you want to achieve in the end but is this getting any closer? https://stackblitz.com/edit/tone-js-issue-609?file=index.ts This would route the sound through the Panners in parallel. |
Hey @chrisguttandin, What I'm trying to show in the example is a case I have in my DAW application, where one track is being panned and where the master is also being panned. I don't expect the master to override the panning of the track, instead I would like them to add up in some way. The link you posted does not show any difference from my original link, you might have the fork the example. |
Thanks for the explanation. So in your case it work if you can set the channelCount of a Panner yourself, right? You could set it depending on the source of an individual channel for the channel's Panner. And you could set it to stereo for the Panner on the master. Does that make sense? |
Yes, I have no problem setting the I'm sure @tambien can answer this better than I can. |
I've added an option to set the channelCount to 2, which you'll have to do on the second chained panner in order to have your desired behavior. const panner1 = new Panner({
channelCount: 2,
}).toDestination();
const panner0 = new Panner(-1).connect(panner1);
const sig = new Signal(1).connect(panner0); |
It's hard to say if this is a bug, or if I'm lacking knowledge on common audio effects.
https://stackblitz.com/edit/tone-js-issue-609?file=index.ts
To me, this should output sound only in my right speaker.
If the current behaviour is the expected behaviour, what should I replace the first panner with to accomplish what I am trying to do? 2 Panners (one extreme left, one extreme right), routed to a CrossFade, routed to the second panner?
Cheers!
The text was updated successfully, but these errors were encountered: