-
Notifications
You must be signed in to change notification settings - Fork 127
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
Pan slider outputs different values on change event #192
Comments
Hi @lazzarello I can't reproduce this. Can you share some code? |
Here ya go. Open the console and click the button. The value of pan.L is undefined while it is defined within the slider's change event. I may not have articulated my point correctly above. https://codepen.io/lazzarello/pen/XWdXBqe My goal is to make a general purpose mixer channel with one volume slider and one pan slider. I'm thinking the volume output value will be something like |
The Pan documentation only specifies event-object != Pan object. Options:
I would probably recommend option 2. |
Thanks, this makes sense. I'm not sure how to use the values of L and R but I made my own simple panning algorithm. |
The pan slider has a property
Pan.value
that outputs the value of the slider from -1 to 1. ThePan.on('change', function(v() {})
event outputs an object with{value, L, R}
keys butPan.L
is undefined.I was expecting the L and R keys to be defined so I could use them to multiply a volume slider's value to go to two channels. I suspect there is another algorithm to do this with the -1,1 range but the L/R was the most intuitive.
The text was updated successfully, but these errors were encountered: