Xy Pad ---> Module Wheel

Hi Everyone. I hope you are having a great beginning of the new year!

I wanted to ask if some can provide a step by step guide to my question:

I’ve created a xy Pad in OSC. I want this pad to correspond to my Mod Wheel - which Is also an xy (it goes up, down , left, right)

Can you please post here a step by step guide on how to make them sync, so they can respond to each other.

Thank you in advance!

Did anyone build a layout with xy Pad?

Can anyone quickly show me what to place in the settings? To work with my xy modulation wheel?
I would really appreciate if someone can help

Hi, i don’t use this in my project, but shouldn’t be too hard.
if you need cc for example.
maybe define a range from -127 to 127 (x and y), decimals 0.

in a custom module:
args[0].value is the x value (when negativ it is going left)
args[1].value is the y value (when negativ it is going down)

Then you have to split these four conditions in the custom module to send the needed midi data.

Hope this helps…

If you're referring to a physical modhweel, then you can't make them sync, all you can do is to mimic the modwheel's messages with the xy pad. To do this you need find out what messages the modwheel sends. Since the x and y axis will probably send different messages, you'll need to use the pad's script property to separate the 2 values:

var x = value[0]
var y = value[1]

send('midi:my_configured_port', '/control', CHANNEL, CC_NUMBER, x)
send('midi:my_configured_port', '/control', CHANNEL, CC_NUMBER, y)

Of course you'll need to adjust the pad's rangeX/rangeY properties to your needs and probably enable spring and set the default property so that the pads returns to the center when released (eg [0.5, 0.5] if rangeX/Y are left to their default values).

Thank you so much for your response guys. abstrus: Highly appreciate you!
I don’t think that the setting of -127 is suitable for my needs.

jean, I’ve tried the follow your steps but it still doesn’t work. For sure it is something i missed.
I’ve attached pictures with the settings i made.

  1. My module wheel also has a spring tension to it so good call here - I turned the spring on but couldn’t figure out how to position the center point based on your explanation.
  2. I think i wrote the script correctly but probably i missed something (pic attached)
  3. My modulation wheel operates up , down , left , right
    Left/right - the messages coming in in pitch bend
    Up = Modulation - CC1
    Down = program change - CC16
    this is the data I see coming in (see pic)

  1. that’s the "default property" part of my previous answer
  2. CC1 is not a number in javascript, it could be a string if enquoted but as is it’s a variable name (a variable which happens to be undefined here) , you should write 1

I changed it according to what you said. Still doesn’t work. I’m also attaching the dubug error i receive

!

Sorry, I wrote too quickly… numbers should not be enquoted ! (otherwise it’s a string)

Thank you for that.
I removed all the " marks but still, nothing
However, the error from the debug

is not showing and it seems to operate normally

this is the image of the settings

However, the error from the debug is not showing and it seems to operate normally

You mean there are messages like this in the console ?

(DEBUG, MIDI) out: CONTROL_CHANGE: channel=1, cc=1, value=1 To: midi:Y-f

If so, then the problem is either the connection or the reception.

Unrelated: when sending the messages using the script property, you might not need the widget to send its usual messages. For instance here you probably don't wan't the pad to send /control x y and should leave its target property empty (or set bypass to true).

Yes. It shows that but still, when I move my modulation wheel the OSC pad cursor doesn’t move.

This is what Debug shows when OSC Pad is moved my the mouse:

(DEBUG, MIDI) out: CONTROL_CHANGE: channel=1, cc=1, value=49 To: midi:Y-free
(DEBUG, MIDI) out: CONTROL_CHANGE: channel=1, cc=1, value=56 To: midi:Y-free
(DEBUG, OSC) Out: {
address: ‘/xy_1’,
args: [ { type: ‘f’, value: 0 }, { type: ‘f’, value: 0 } ]

This is what the Debug shows when I move my module wheel on my synth:

(DEBUG, MIDI) in: CONTROL_CHANGE: channel=3, cc=1, value=0 From: midi:Y-free
(DEBUG, OSC) In: { address: ‘/control’, args: [ 3, 1, 0 ] } From: midi:Y-free

Somehow they are not talking to each other.
I used this in the script to make things simple:

var x = value[0]
var y = value[1]

send(‘midi:Y-free’, ‘/control’, 1, 1, x)
send(‘midi:Y-free’, ‘/control’, 1, 1, y)

I removed everything from the osc part: Nothing in address, preArg and nothing in target

To update a widget, an incoming message has to match the widget's

  • address
  • preArgs
  • value format (ie: two values in this case, one for the x axis, one for the y axis)
  • target (only for midi messages)

This is the message sent by your synth/keyboard

(DEBUG, OSC) In: { address: ‘/control’, args: [ 3, 1, 0 ] } From: midi:Y-free

It doesn't match the pad's configuration (preArgs & number of values are wrong). Even if the preArgs are correct, O-S-C can't guess how to update the xy pad with a single value since it expects two values. it could be solved using a custom module or simply by adding a script widget with:

  • preArgs: [3, 1] (channel 3, cc 1, as in received message seen in logs)
  • address: /control
  • target midi:Y-free
  • script: set("xy_widget_id", 0, value)

This script is rather simple: upon reception it sets the pads x-axis to 0 and its y-axis to the received value.