loadAudioPlugin
Load VST, VST 3, and AU plugins into MATLAB environment
Description
loads the 64-bit VST, VST 3, or AU audio plugin specified by
hostedPlugin
= loadAudioPlugin(plugin
)plugin
. On Windows®, you can load VST and VST 3 plugins. On macOS, you can load AU, AUv3, VST, and VST 3 plugins.
Your hosted plugin has two display modes: Parameters
and
Properties
. The default display mode is
Properties
.
Parameters
–– Interact with normalized parameter values of the hosted plugin using set and get functions.Properties
–– Interact with heuristically interpreted parameters with real-world values. You can use standard dot notation to set and get the values while using this mode.
You can specify the display mode of the hosted plugin using standard dot notation, for example:
hostedPlugin.DisplayMode = 'Parameters';
See Host External Audio Plugins for a discussion of display modes and a walkthrough of both modes of interaction.
You can interact with and exercise the hosted plugin using the following functions.
Process Audio
audioOut =
process
(hostedPlugin,audioIn)Returns an audio signal processed according to the algorithm and parameters of the hosted plugin. For source plugins, call
process
without an audio input.
Set and Get Normalized Parameter Values
value =
getParameter
(hostedPlugin,parameter)Returns the normalized value of the specified hosted plugin parameter. Normalized values are in the range [0,1]. You can specify a parameter by its name or by its index. To specify the name, use a character vector.
setParameter
(hostedPlugin,parameter,newValue)Sets the normalized value of the specified hosted plugin parameter to
newValue
. Normalized values are in the range [0,1].
Get High-Level Information About the Hosted Plugin
dispParameter
(hostedPlugin)Displays all parameters and associated indices, values, displayed values, and display labels of the hosted plugin.
pluginInfo =
info
(hostedPlugin)Returns a structure containing information about the hosted plugin.
Set the Environment in Which the Plugin Is Run
frameSize =
getSamplesPerFrame
(hostedPlugin)Returns the frame size that the hosted plugin returns in subsequent calls to its processing function (source plugins only).
setSamplesPerFrame
(hostedPlugin,frameSize)Sets the frame size that the hosted plugin must return in subsequent calls to its processing function (source plugins only).
setSampleRate
(hostedPlugin,sampleRate)Sets the sample rate of the hosted plugin.
sampleRate =
getSampleRate
(hostedPlugin)Returns the sample rate in Hz at which the plugin is being run.
Examples
Input Arguments
Output Arguments
Limitations
The
loadAudioPlugin
function supports 64-bit plugins only. You cannot load 32-bit plugins using theloadAudioPlugin
function.Saving an external plugin as a MAT-file and then loading it preserves the external settings and parameters of the plugin but does not preserve its internal state or memory. Do not save and load your plugins when you are processing audio.