p5.touchgui
p5.touchgui copied to clipboard
OSC /buttonBank example sending incorrect OSC message names
Hello @L05 ,
I got the OSC /buttonBank example working to send OSC messages to Sonic Pi.
However, the OSC message names only go from "button0" to "button3" in each respective column no matter which row you are clicking (4-8, 9-12, 13-16)
I did find the problem which is in the sendOsc( ) function on line 45
sendOsc('/button' + i, b[i][j].val);
It was an easy fix. I just replaced 'i' with the .label method for each button in the 2D array
sendOsc('/button' + b[i][j].label, b[i][j].val);
Works fine now! (I apologize that Im not super savvy with Github or I would tried to make the change myself)