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: 5
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 28, 2017
Forum Posts: 555
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 28, 2017
Forum Posts: 555
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 

Avatar
DanieleR
Member
Members
December 15, 2020 - 9:12 am
Member Since: January 6, 2020
Forum Posts: 3
sp_UserOfflineSmall Offline

Hi All,

I created a 10 band equalizer, with 2 knobs (x, y) and an xyPad to connect to x and y as shown:

https://ibb.co/8xK5wqY

I have 2 kinds of problems:

1) I can't connect the pad to knobs x (ID = 5), y (ID = 6). I followed what is described in the official documentation and in the previous post but when I move the pad the knobs do not move and vice versa.

https://ibb.co/5xFW81c

https://ibb.co/3hpP7X3

https://ibb.co/sQPrTN5

2) At each movement of the pad or knobs I would like to activate a fuzzy logic function that modifies the values ​​of each band of the Equalizer. I initially called this function within PluginCore::guiParameterChanged but I read that it is strongly discouraged and I’d create a sub-controller.  Is there an example that I can follow? Can you help me?

 

Thanks in advance,

Daniele

Avatar
jim
Member
Members
December 16, 2020 - 11:43 am
Member Since: January 1, 2020
Forum Posts: 34
sp_UserOfflineSmall Offline

Hi Daniele. 

Essentially I think you can (but this may not be the best way) do what you want safely from the guiParameterChanged class.

You could call a function on the switch case of say guiParameterChanged ID:5 to update all the other controls.

some code to update GUI parameters looks like this;

HostMessageInfo HMI; //declares a message object
HMI.hostMessage = sendGUIUpdate; // sets the message as sendable to the GUI
GUIParameter guipar; //declares a parameter object to work with named guipar

then maybe run a loop or hand iterate out out the following over the controls you want to update

{
guipar.controlID = IDtheControl2Update; 

guipar.actualValue = newfuzzyValue;

HMI.guiUpdateData.guiParameters.push_back(guipar);

}

pluginHostConnector->sendHostMessage(HMI);

 

Cheers,

James

Avatar
DanieleR
Member
Members
January 2, 2021 - 2:34 pm
Member Since: January 6, 2020
Forum Posts: 3
sp_UserOfflineSmall Offline

Hi Jim,

thanks for your reply.

I rewrote all business logic within PluginCore::guiParameterChanged without any loop. Moving x/y Knobs calls my fuzzy logic function successfully.

The point concerning the connection between XYPad and x/y Knob remains unsolved:

1) I can't connect the pad to knobs x (ID = 5), y (ID = 6). I followed what is described in the official documentation and in the previous post but when I move the pad the knobs do not move and vice versa.

Avatar
W Pirkle
Admin
January 19, 2021 - 11:05 am
Member Since: January 28, 2017
Forum Posts: 555
sp_UserOfflineSmall Offline

I tested the XY Trackpad GUI controls before the last release. There was an issue if using RackAFX to create the GUI where the incorrect (old) trackpad ID value was being written. But, if using ASPiK directly (which I think you are) then there is no issue and it follows the documentation here:

http://aspikplugins.com/sdkdoc.....r11_d.html

To link the trackpad to two controls, you do the following:

Set the XY Pad's control tag to XY_TRACKPAD (which is pre-reserved for this function)

Set the custom view name to encode the two control IDs of the X,Y parameters. 

For my example, the line of text in the XML file is:

<view back-color="~ YellowCColor" background-offset="0, 0" class="CXYPad" control-tag="XY_TRACKPAD" custom-view-name="TrackPad_X4_Y5"

This connects the trackpad to control ID = 4 for the X axis, and control ID = 5 for the Y axis.

Will 

Avatar
DanieleR
Member
Members
January 26, 2021 - 12:06 pm
Member Since: January 6, 2020
Forum Posts: 3
sp_UserOfflineSmall Offline

Hi Will,

thanks for your reply. I used RackAFX to create the GUI.

Following your XML example I deleted the tags from my XML:

- control-tagX = "XY_TRACKPAD"

- control-tagY = "XY_TRACKPAD"

and now my project works fine.

For future projects do you think it is better to use Aspik directly to create the GUI?

Should I create the project with RackAFX and then export as an Aspik project?

Thanks,

Daniele

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
1 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 50

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

jim: 34

JimmyM: 33

Gwen: 32

Member Stats:

Guest Posters: 1

Members: 680

Moderators: 1

Admins: 5

Forum Stats:

Groups: 13

Forums: 41

Topics: 744

Posts: 2846

Newest Members:

dan_1, phlub, josh, bmarx, Tom Helvey, Ludovic, Mihir Shah, Mina, robbie, Matteo Desantis

Moderators: W Pirkle: 555

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 555, VariableCook: 3