Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Connect XYPad to two parameter values
Avatar
Ben_1
Member
Members
June 7, 2019 - 11:47 pm
Member Since: June 7, 2019
Forum Posts: 3
sp_UserOfflineSmall Offline

Hi All,

I'm designing a panning plugin, and need to use an XYPad to adjust the x and y coordinates of my panning object. Unfortunately, in the editor, I'm only able to map the XYPad to one parameter? Any reason this might be? How could I map the x coordinates to my x values and do the same for my y value?

Additionally, as a side question, the grey background behind my plugin in Pro Tools is not fitting to the background. I specified the size in template settings and on the background view, but there are still grey rectangles around my plugin. What could I be missing here?

Avatar
W Pirkle
Admin
June 8, 2019 - 2:37 pm
Member Since: January 29, 2017
Forum Posts: 323
sp_UserOfflineSmall Offline

Hi Ben

I'm glad you asked this - it is a detail that I need to add to the ASPiK documentation. The complete answer is this: when they put together VSTGUI4, 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 had 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 (X, I think) and the fractional part the other (Y) 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 ASPiK documentation) 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.

In the VSTGUI4 GUI designer (which I assume you are using), 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. 

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/.cpp files. 

- Will

Avatar
W Pirkle
Admin
June 8, 2019 - 3:28 pm
Member Since: January 29, 2017
Forum Posts: 323
sp_UserOfflineSmall Offline

Also note that:

• 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

EDIT: this information has been added to the ASPiK v1.6.0 release in the Advanced GUI section on the left sidebar. ASPiK is now open-source and hosted on GitHub as well.

- Will 

Forum Timezone: America/New_York

Most Users Ever Online: 55

Currently Online:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 41

clau_ste: 39

Gwen: 32

TheSmile: 30

JimmyM: 30

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 558

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 36

Topics: 567

Posts: 2276

Newest Members:

Ray C., Jon R., Pat, Jan, Ben_1, shane, teknojunque, David Richter, Nick45, EEkros

Moderators: W Pirkle: 323

Administrators: Tom: 69, JD Young: 80, Will Pirkle: 0, W Pirkle: 323