This class is the default Qt GUI class for VSTPluginController, see VSTPluginController: -gui.
For each parameter, the GUI shows the parameter name, a slider, a text display and the parameter label (e.g. "dB").
You can automate parameters by moving the slider or entering text into the text display (not supported by all plugins).
To get some information about the plugin, just hover over the name.
The GUI also has a simple preset manager and plugin browser.
Pressing the "Browse" button will open a dialog where you can browse already loaded plugins, start a new search in the default directories (see VSTPlugin: *search) or load a plugin from a file dialog.
Global defaults for GUI properties, see Customization.
Initialize the GUI.
parent |
If parent is |
bounds |
If parent is |
params |
Show/hide parameters. Set to |
Usually, this is called indirectly by VSTPluginController: -gui.
Occasionally you might want to call it directly, e.g. to create an initially empty view where you can set the -model later.
the model (a VSTPluginController instance).
VSTPluginGui receives notifications for relevant changes in the model, e.g. when a new plugin has been loaded or a parameter has changed.
You can always set another model and the view will update automatically (see Changing Models).
The following instance methods allow you to customize the appearance and behavior of VSTPluginGui. You can also customize globally by setting the class methods of the same name. Instance members override class members.
whether the GUI window should be closed when the VSTPlugin is freed (default: true
).
This is only for top level windows, embedded GUIs are not affected.
the parameter display width in characters (default: 7)
The default size should be fine for most number displays but might need to be increased for larger text displays.
whether a program menu should be created (default: true
)
the maximal number of rows (default: 10).
the slider width in pixels (default: 200)
the slider height in pixels (default: 20)
Update the view.
This method is usually called by the model to notify the view for important changes (see Object: -update). However, it can also be called by the user (with no arguments) to update the view, e.g. after changing GUI properties:
Prolog:
It's possible to embed several VSTPluginGui instances within a single view.
The bounds argument determines the size and position of each subview. (In FlowLayouts the position is managed automatically, so it's enough to provide a Point instead of a Rect.)
Here we use a single VSTPluginGui instance to show different VSTPluginControllers. Say you have an FX chain with several VSTPlugin instances, but you only need to see one at the time.
You could even build a PopUpMenu to switch between VSTPluginController instances.