ASPiK SDK
Loading...
Searching...
No Matches
XY Pad (TrackPad)

When the VSTGUI4 architects assembled the library, they only allowed one control_ID (aka control tag) per control and one floating point "value" variable per control. Whether it was intentional or was an accident, they decided to encode both X and Y parameters into a single floating point number and they did it by making the integer part of the number one param and the fractional part the other parameter. But that still didn't solve the problem with only one control tag. So, their solution is to use an XYPadController, which is a custom sub-controller (see the Custom Subcontroller section) and they include this with the VSTGUI4 library. However, it only works with VST3. I did at one point have a custom sub controller for the XY Pad, but it had too many issues with trying to use it across the AAX, AU and VST3 APIs in the way the pad is updated from user presets. So, I created a variation that uses the custom-view paradigm instead.

First, you need the control IDs (control tags) of the X and Y parameters as integer values.

For example, in your plugin, the volume control has control ID = 0 and the panning control has control ID = 128. Those are the two tags.

Next, in the VSTGUI4 GUI designer, drag the XYPad control to the GUI. If you look in the GUI designer's Control Tags panel, you will see some reserved values at the bottom. One of them is XY_TRACKPAD - this is a universal control tag and you use it for all of your XY track-pads and you can have as many as you want.

Lastly, to encode the X and Y parameters, which also instantiates one of my custom VSTGUI4 controls, you put the following into the field labeled "custom-view" and every control will have this field. The syntax is, ignoring the ( ):

custom-view: TrackPad_X(x-tag-value)_Y(y-tag-value)

So in the example above you would write:

TrackPad_X0_Y128

for the custom view. That value, plus the reserved control tag "XY_TRACKPAD" contain the information to create and use my custom control which is called XYPadEx and you can find it in the customcontrols.h and customcontrols.cpp files.

XY Pad Details:
• The XY Pad's puck's size is set with the round-rect-radius field
• If you have style-round-rect selected, then the round-rect-radius also controls the rounded corners of the frame