Does anyone know what is wrong here? I'm trying to set the CC# of the XY pad from a variable on another widget.
var x = value[0]
var y = value[1]
send('midi:OSCMIDI', '/control', getVar("send_value_x1", "ccNum"), x)
send('midi:OSCMIDI', '/control', getVar("send_value_y1", "ccNum"), y)
Says wrong number of arguments, but everything else I've tried isn't working properly.
/control needs 3 arguments (channel, cc number and value), only 2 are provided in your code. You can call console.log(getVar("send_value_x1", "ccNum")) to check what's actually returned by getVar in case there a problem there too.
I have one other question regarding these XY pads. If I turn doubletap on, how do I set default position values for both x and y as I do not want them both to be 0 when they are reset.
It's interesting that I don't get any error if I don't add last value argument, and it sends 0 by default. (debug is off though) EDIT: with debug on it shows the missing argument message.
You can use array notation [ 64, 64 ] in the default prop of the XY widget.
Yeah, it didn't give an error, just didn't work right and the argument shows when you have debug on.
Keep coming across more things with the xy pad. What if I wanted the behavior of the dot in the XY pad to jump when I press an area that's not directly on the dot in the xy pad.
For example, if the dot is in the top left corner, how can I make it so when I click on the bottom center or anywhere else on the xy pad the dot then jumps to that position.
Is there a simple way to achieve this?
EDIT: Just found out. Turn Snap on in xy settings.