HoaVST:
Filter:
Classes (extension) | Ambisonics > VST

HoaVST : Object
ExtensionExtension

A convenience wrapper for VSTPlugin
Source: HoaVST.sc

Description

HoaVST is a wrapper class for the VSTPlugin suite. It was mainly designed for two things: 1. to make it easier to use the Ctk with VSTPlugin, and 2. to be able to use VSTPlugin on signals with more than two channels.

Class Methods

HoaVST.new(plugin, numVSTs, vstChannels, tDesign, automateParams, initParams, reloadPlugins: false)

Arguments:

plugin

The Symbol of the plugin you wish to use. See VSTPlugin for more info.

numVSTs

The number of VSTPlugin instances.

vstChannels

The number of output channels for each VSTPlugin instance.

NOTE: The number of output channels will be numVSTs * vstChannels. So for instance, if you have a signal with 24 channels, but you want to use stereo plugins, then numVSTs should be 12.
tDesign

An optional instance of a TDesign. If supplied, the incoming signal will be assumed to be a BFormat signal and will be decoded to the tDesign. The signal will be run through the VST plugin and then encoded back to BFormat.

automateParams

For optimization, it is advised (especially with plugins with large number of parameters) not to "automate" every parameter. In SuperCollider, "automate" means to make the parameter an argument to the SynthDef, and so will send a value to the plugin at every control loop. If this parameter is true, then all parameters will become arguments to the SynthDef. If false, then no parameters will be automated. This can also be an Array of Integers specifying the slots of the parameters to automate, or can be an Array of Symbols or Strings, identifying the parameters by name. Default is true.

initParams

An Array of initial parameter values. This could also be a path to an .scd file that returns the array, which is the output of -writeParams.

reloadPlugins

A boolean to do the plugin search again or not. Default is false and will not serach for the plugins again.

HoaVST.archiveParameters(plugin, presetPath, archivePath)

A convenience method to translate a plugin preset to be ready to be used with HoaVST.

Arguments:

plugin

The plugin name.

presetPath

The path to the plugin preset.

archivePath

A path of where to write the initial parameter values as an Array (which can then be loaded as the initParams argument to the *new method or loaded via the -loadParams method).

HoaVST.search(loadCondition)

Run the VSTPlugin: *search class method. This is used to parse the plugins folder and get the plugins ready for SuperCollider. This is automatically run for you in the *new method if it has not been done initially. Once run, the plugins will be saved to an init file and that by default is read. If there is a init file, but the plugins have changed, set the reloadPlugins argument to the *new method or run this search method. The server should be booted, otherwise it will be booted automatically.

Arguments:

loadCondition

The search is done on the server and is asynchronous. This is an optional instance of Condition the user can use to wait for the process to finish.

Inherited class methods

Instance Methods

Initializing the VSTPlugin

.pluginController(aNote, aSynth)

Create the instance(s) of VSTPluginController to actually control the UGen of the desired plugin within the specific synth instance.

Arguments:

aNote

An instance of CtkNote, usually by calling CtkNoteObject: -note on a CtkSynthDef instance.

aSynth

The CtkSynthDef instance that created the note.

.open(action, verbose: false, editor: true)

Send the message to the server to start the VST.

Arguments:

action

An action to be evaluated upon completion of the server message.

verbose

A boolean to be verbose or not.

editor

A boolean to request the VST plugin editor.

.openMsg(time: 0.0)

Get a CtkMsg to send the open message. This is mainly for use with NRT and CtkScore.

Arguments:

time

The time at which to tell the server to open the plugin.

UGen Graph

.ar(in, synthParams)

The UGen graph to apply the VSTPlugin to the incoming signal.

Arguments:

in

The input signal.

synthParams

An optional Array of parameters to be supplied to the VSTPlugin(s). Should be of the format [[parameterIndex, parameterVal(UGen)], [parameterIndex, parameterVal(UGen)], etc.].

Controlling Parameters

The HoaVST will behave like a Ctk note in that it will respond to parameter messages direction. For instance if you had a plugin with a parameter named 'wetDry', you could get and set the parameter using 'wetDry' as the message (whether the parameter has been automated or not!!).

.set(paramNames, newParams)

Set a parameter or parameters by name or index.

Arguments:

paramNames

An Integer index or Symbol for the parameter name or an Array of indices or names.

newParams

The parameter value or an Array of values.

.get(paramNames, action)

Get the current value of a parameter or parameters.

Arguments:

paramNames

An Integer index or Symbol for the parameter name or an Array of indices or names.

action

Since getting the value from a parameter that has not been automated it asynchronous, you need to supply a function that takes the value as an argument.

Parameters and Presets

.parameters

Get the Array of all parameters names.

.synthParams

The Array of all parameters with names suitable for being an argument to a SynthDef.

.automateParams

The actual parameters that have been added as arguments to the synth. Returns an Array with [[parameterIndex, parameterName], [parameterIndex, parameterName], etc.].

.loadParams(initParams, setParams: false)

Load a preset from an Array or a path to an .scd file. The .scd file should return an Array with the preset values in order. See *archiveParameters to translate a factory preset into an .scd file suitable for loading here.

Arguments:

initParams

An Array with ALL parameter values or a path to an .scd file.

setParams

A boolean whether to set the parameters to the loaded set immediately. Default is false.

.loadPreset(preset, action, async: false)

Load a factory preset.

Arguments:

preset

The path to the factory preset.

action

An action to be evaluated upon completion.

async

Where to execute the plugin method. See VSTPluginController: -loadPreset.

.presetMsg(path, time: 0.0)

Return the CtkMsg to send to the server to load a facotry preset file.

Arguments:

path

The path to the factory preset.

time

The time at which to load the preset.

.writeParams(path)

Write the current parameters to a preset .scd file.

Arguments:

path

The path to the .scd file.

GUI

.gui(parent, bounds, params: true)

Open the default GUI control window.

Arguments:

parent

The parent window.

bounds

The bounds of the GUI

params

A boolean whether to show the paremeters or not.

.guiUpdater

When using a CtkControl, the parameter will be set with the control loop, so the gui won't update in real-time. Turn this updater on the see the control in the GUI.

.guiUpdateTask

The task played by the guiUpdater. So you can stop it.

.editor(show: true)

Show the editor GUI. (Needs SuperCollider 3.11 on Mac OS).

Arguments:

show

A boolean.

Data Structures

.vstPCs

The Array of VSTPluginController(s).

.note

The instance of the CtkNote playing

Inherited instance methods

Undocumented instance methods

.decoder

.encoder

.initParams

.numVSTs

.order

.plugin

.reloadPlugins

.searchMsg(time: 0.0)

.tDesign

.vstChannels

Examples