i am trying to make this: when a button is pressed, having a number of knobs set to some predefined values.
how can i do this? from what i understand in previous versions this would be possible with setting the knob variables to the values and then calling sendUpdateGUI( ) . is that correct?
but i dont understand this document and how to use checkUpdateGUI( )
can someone explain what i should do?
(btw, if VSTGUI is absolutely necessary for this, please inform me. i just started to read about VSTGUI yesterday)
See the post here that shows how to make two knobs parrot each other's value:
It works like this:
1) the user moves a control, clicks a button, chooses something from a drop-list, or does something on the GUI
2) you are altered with a call to checkUpdateGUI ( ) -- you are given the ControlID of the GUI item that was changed as well as the new value the control took
3) you decode the ControlID value to tell you which GUI control was modififed
4) if you don't have any updates to send back to the GUI as a result, you return false from this function (the default)
5) if you do have GUI updates to send back, you declare a GUI_PARAMTER structure for each control that you want to change as a result of the original GUI modification
For each GUI_PARAMETER struct you set the ControlID and the new value that each GUI control should take as a result of the original GUI modification in 1)
Then, you add the structure to the guiParameters linked list that you were passed as a function call argument.
6) once all the structures have been added to the list, you return true
The framework will then update the GUI with your new settings. You do not need to worry about cleaning up the guiParameters linked list; it is done on the base class.
I did not get any email from you.
thanks for your reply.
i will try to see what i can do with that later, with a clear head.
but i suspect i may be facing a problem soon. what if i want to change hundreds of parameters with the push of a button?
anyway, i will try to send again an email using your contact form. if that fails again, is there any other way of contacting you privately?
"what if i want to change hundreds of parameters with the push of a button?"
Does each parameter connect to a GUI control? If so your plugin will have hundreds of knobs/sliders/buttons? If that is the case, you may want to re-think your GUI Design, perhaps use tabbed GUIs, etc... It is confusing to the user to present them with hundreds of knobs or other controls.
If the parameters are internal variables that do not link to controls, then that is another issue involving multi-threading - the parameters that are used in your processAudio functions must be slotted in properly so that they are updated on each buffer process loop. That is explained in the document here:
In this case, you need to make your non-GUI linked parameter-variables atomic (see std::atomic for more information) to avoid threading problems.
PS: I replied to your email on June 8, 2017.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:Jas, Rowan, sojourn, fabhenr, rg1, Niklas, Wutru, Tim Campbell, Danny Jonel, Valentin
Moderators: W Pirkle: 573
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 573, VariableCook: 3