VSTGUI
4.4
Graphical User Interface Framework not only for VST plugins
|
VSTGUI now supports easy and fast UI creation for VST3 plug-ins.
It will automatically support the following VST3 features (only if you have met the requirements for Parameter Binding):
Note that you need at least VST SDK 3.1, any earlier version will not work.
myEditor.uidesc DATA "realtive/path/to/myEditor.uidesc"
Now you can build your project, start any VST3 host and open an instance of your plugin.
If you open the editor of your plug-in you will initially see a black editor.
To start editing the user interface you need to make a right click on your editor and choose the "Enable Editing" menu item. When you do this the VSTGUI Inspector window will open and you can start editing.
If you are done with it, make sure to use the "Save..." command in the Context Menu to save the changes to the myEditor.uidesc. Then you can choose the "Disable Editing" command to test your user interface.
The VSTGUI Inspector is used for defining Bitmaps, Colors, Fonts and Tags and to edit view attributes.
On the top of the window are 5 tabs:
This tab contains the attributes of the view or views currently selected in your editor. The shown attributes depend on the selected view. If you have multiple views selected only those attributes are shown which are valid for all views. If the values of the attributes differ between the views they are shown in a different color.
In this tab you define your bitmaps.
In this tab you define your colors.
There are predefined colors whose names start with a '~'. You cannot change any of them.
In this tab you define your fonts.
There are predefined fonts whose names start with a '~'. You cannot change any of them.
In this tab you define your tags.
Here is a brief description of the items in the context menu :
If you've used the Parameter class provided by the VST3 SDK, you will get automatic parameter bindings between the controls of your editor and the parameters in your VST Edit Controller.
The only thing you need to do is to declare the ids of the parameters as tags in the VSTGUI Inspector (or use the 'Sync Parameter Tags' command in the Context Menu) and set the tags of your controls to these ids. After you've done this your VST Edit Controller will receive the beginEdit(..)/performEdit(..)/endEdit(..) calls when the user changes the controls and if the host automates the parameter the control will also reflect these changes.
As an addition you can modify your VST Edit Controller to return specific parameter objects in the getParameterObject(int32 paramID) method for UI only needs, which are not parameters of your VST audio processor. This way you can store view settings like the tab which is open when the user closes the editor so that you can restore it when the user opens the editor again. You can look at the sources of the included 'uidescription test' project how this works.
If you need to create custom views, you can implement the VSTGUI::VST3EditorDelegate interface in your edit controller class. The createCustomView method will be called if you set the 'custom-view-name' attribute in one of the views.
Another way to use your own views is to register them at runtime with the UIViewFactory. This method requires more work but has the advantage that the view will be listed like the built-in views and changing attributes work on the fly. See VSTGUI::IViewCreator.
Sub-Controllers are useful if you need finer control of your views. You can define Sub-Controllers for views with the 'sub-controller' attribute. Sub-Controllers will be created via the VSTGUI::VST3EditorDelegate interface. When they are created they are owned by the VSTGUI::VST3Editor object.
The VSTGUI::DelegationController is a helper class if you don't want to control every aspect of the views by forwarding every call to its parent controller. You only overwrite the methods you need in your inherited class.
If you want to be notified about value changes for controls in your sub-controller but don't want to loose the Parameter Binding you can add your sub-controller as dependent of the control:
Templates are root views where you can group controls in logical entities. You can embed Templates into other Templates. Some views like the VSTGUI::UIViewSwitchContainer shows different Templates depending on a control value.