VSTPluginGui:
Filter:
Classes (extension) | GUI

VSTPluginGui : ObjectGui : SCViewHolder : Object
ExtensionExtension

a generic Qt GUI for VSTPluginController

Description

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").

NOTE: For performance reasons, the Qt GUI will not reflect parameter automation via VSTPluginController: -map or UGen arguments (VSTPlugin: *ar).

You can automate parameters by moving the slider or entering text into the text display (not supported by all plugins).

NOTE: Automating parameters from the Qt GUI will automatically unmap it from any control busses (see VSTPluginController: -map)

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.

NOTE: You can use the VSTPluginGui together with the VST editor (see VSTPluginController: -editor)

Class Methods

Global defaults for GUI properties, see Customization.

Inherited class methods

Undocumented class methods

VSTPluginGui.closeOnFree

VSTPluginGui.closeOnFree = value

VSTPluginGui.displayWidth

VSTPluginGui.displayWidth = value

VSTPluginGui.menu

VSTPluginGui.menu = value

VSTPluginGui.numRows

VSTPluginGui.numRows = value

VSTPluginGui.sliderHeight

VSTPluginGui.sliderHeight = value

VSTPluginGui.sliderWidth

VSTPluginGui.sliderWidth = value

Instance Methods

.gui(parent, bounds, params: true)

Initialize the GUI.

Arguments:

parent

If parent is nil, the GUI will be displayed in a new top level Window, otherwise it is embedded in the given parent (see Embedding).

bounds

If parent is nil, this will set the window geometry, otherwise it determines the size and position of the embedded GUI.

params

Show/hide parameters. Set to false, if you only want to show the preset manager!

Discussion:

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.

.model

.model = newModel

From superclass: ObjectGui

the model (a VSTPluginController instance).

Discussion:

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).

Customization

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.

.closeOnFree

.closeOnFree = value

whether the GUI window should be closed when the VSTPlugin is freed (default: true).

Discussion:

This is only for top level windows, embedded GUIs are not affected.

.displayWidth

.displayWidth = value

the parameter display width in characters (default: 7)

Discussion:

The default size should be fine for most number displays but might need to be increased for larger text displays.

.menu

.menu = value

whether a program menu should be created (default: true)

.numRows

.numRows = value

the maximal number of rows (default: 10).

.sliderWidth

.sliderWidth = value

the slider width in pixels (default: 200)

.sliderHeight

.sliderHeight = value

the slider height in pixels (default: 20)

.update(who, what ... args)

Update the view.

Discussion:

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:

Inherited instance methods

Undocumented instance methods

.prBrowse

.prParamChanged(index, value, display)

.prPresetSelect(preset)

.prUpdatePresets

.viewDidClose

Examples

Prolog:

Embedding

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.)

Changing Models

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.