-
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
Maintaining stereo when connecting channels #808
Comments
I did some further experimentation with a sample that was allready heavily panned (left-right stereo test) to confirm that stereo was infact lost and not just the pan of previous channels, and yes, all stereo information is gone, everything that goes through a Tone.Channel is mono (If I connect the Tone.Player directly toDestination the sample is panned correctly). I also tried to connect specific outputs to specific inputs between channels like this: channelToChannel.connect(masterChannel, 0, 0); But trying to connect from any other output than 0 just gives me "Uncaught DOMException", and trying to connect to any other input than 0 gives me: "Uncaught DOMException: Failed to execute 'connect' on 'AudioNode': input index (1) exceeds number of inputs (1)." |
I believe this is the same issue as #609. The solution is to explicitly pass in |
That did the trick! Thank you for the help, and sorry for the inconvenience. |
Stereo seems to be lost when connecting a Tone.Channel to another Tone.Channel. I´ve created a small example with two oscillators, each connected to a channel that is hard panned left. One of the those channels goes directly toDestination, and this one functions correctly.
The other one is connected to another Tone.Channel, (with no pan) that goes toDestination, and the pan on this one is lost.
Live example:
https://christoffergylin.com/groovebox/channelStereoTest.html
Code:
let channelToDestination = new Tone.Channel().toDestination();
channelToDestination.pan.value = -1;
let channelToChannel = new Tone.Channel();
channelToChannel.pan.value = -1;
let masterChannel = new Tone.Channel().toDestination();
let oscDestination = new Tone.Oscillator('C3', 'square');
let oscChannel = new Tone.Oscillator('C3', 'square');
oscChannel.connect(channelToChannel);
channelToChannel.connect(masterChannel);
oscDestination.connect(channelToDestination);
I tried using split from the first channel, and then sending just one of the splitted channels into the second channel. If I then have full pan in one direction, I get full volume in both speakers, and if I pan the other direction the volume goes down in both speakers. So it seems that that one split signal is going to both the left and right input on the second channel, and without the split, both outputs from channel 1 is probably going to both inputs on channel 2.
The text was updated successfully, but these errors were encountered: