Controlling 4 parameters with an XY pad?

Hello,
I have a 4 Layers Instrument. I have added in the GUI an XY Pad Template.
I would like to have the XY Pad control the Bus Volume of each of the 4 Layers in order to “morph” between them with the XY Pad controller. In the XY Pad template Parameter is only possible to connect 2 parameters, is it possible with a script to instead connect the 4 Bus Volumes (Layer 1 Bus Volume, Layer 2 Bus Volume, Layer 3 Bus Volume, Layer 4 Bus Volume) in order to have the XY Pad cursor (as shown in the screenshot) TOP LEFT: Layer 1 Full volume all other at 0 - TOP RIGHT: Layer 2 Full volume all other at 0 - BOTTOM LEFT: Layer 3 Full volume all other at 0 - BOTTOM RIGHT: Layer 4 Full volume all other at 0 and in the CENTRE same level for all 4 Layers?

Screen Shot 2022-08-08 at 07.00.08 AM

Thanks in advance for any help!

Interesting idea. Simple way to control 4 parameters with an xy pad is simply inverting two of them. Assuming the range of x and y is 0 to 1 you could do:

  • a = x
  • b = 1 - x
  • c = y
  • d = 1 - y

But this is not quite what you want. Are you good at maths? If you can work out the logic and maths (maybe using xy grahp calculator) then writing the code is the easy bit.

You are dealing with volume and you probably want to keep the overall volume the same.

I’ve never had a good grade in math! :grinning:
I found this code you wrote years ago for a similar question, but I don’t think it can work for my instrument and for what I want to do?

defineParameter("XYPadX",nil,0,-100,100)
defineParameter("XYPadY",nil,0,-100,100)

defineModulation("PadX",true)
defineModulation("PadY",true)

function calcModulation()
    padX=XYPadX/100
    padY=XYPadY/100
    return padX,padY
end

Actually it might work.
XY Pad 4 Layers.vstpreset (12.8 KB)

defineParameter("x", nil, 0, -1, 1)
defineParameter("y", nil, 0, -1, 1)

defineModulation("x", true)
defineModulation("y", true)

function calcModulation()
    return x, y
end
1 Like

Thanks work great!

Thinking about it, you could also do it without any scripting at all. Pick any 2 quick controls for the x and y and assign those 2 quick controls in modulation matrix.