How to use PAD XY?

Hello
I want to use the XY pad, but I got the following message:
image

How can I configure the midi?

thank you
Patrick

my new projet ...

The xy pad outputs 2 values (one for each axis), with the preArgs that's 4 arguments you're sending while the /control command expects only 3 arguments (channel, control number and value).

You can use the widget's script property to split the xy value into 2 different messages:

var x = value[0]
var y = value[1]
send('midi:MIDIMIDI1', '/control', 9, 5, x)
send('midi:MIDIMIDI1', '/control', 9, SOME_OTHER_CC, y)

Also, make sure to empty the widget's target property to prevent the default message from being sent (and from triggering the error).

1 Like

Thank you , it works great

The new version of OSC now has no "script" property under "value" but a "scripting" tab with 3 properties "onCreate" "onValue" and "onTouch".

1.Should I write that four lines of codes under "onTouch"?

  1. What exactly should "preArgs" say? Empty?

  2. "target" should still be empty right?

Many thanks!

The equivalent for the former "script" property is "onValue". Scripting properties are documented here. preArgs is not used when calling send(), it's relevant only if you want the widget to send its default messages (and also has an effect on how it receives messages). target can remain empty, although it's possible to call send() without passing a target argument in which case the widget's target is used.

2 Likes

Hi Jean-Emmanuel! I'm using this but currently having the issue where the MIDI CC is only the value I'm putting for Y.

Whenever I try to MIDI Map in Ableton, it sees both the X and Y values on CC 13. I've changed the X value a few times with no change.

Has the code changed somehow?

1 Like

When you do the mapping, just disable one line and then the other, so you can set the x and y.
Ableton receive both CC in the same time

1 Like

Lol what an elegant and simple solution, thanks @zoltan !!

1 Like