%% Specify Hosted Plugin Parameter Values
% Load a VST audio plugin into MATLAB® by specifying its full path. If you are using a Mac, replace the .dll file extension with .vst.

pluginPath = fullfile(matlabroot,'toolbox/audio/samples/ParametricEqualizer.dll');
hostedPlugin = loadAudioPlugin(pluginPath)

%
% Use info to return information about the hosted plugin.

info(hostedPlugin)

%
% Use setParameter to change the normalized value of the Medium Center Frequency parameter to 0.75. Specify the parameter by its index.

setParameter(hostedPlugin,5,0.75)

%
% When you set the normalized parameter value, the parameter display value is automatically updated. The normalized parameter value generally corresponds to the position of a UI widget or MIDI controller. The parameter display value typically reflects the value used internally for processing.
% Use dispParameter to display the updated table of parameters.

dispParameter(hostedPlugin)

%
% Alternatively, you can use getParameter to return the normalized value of a single parameter.

parameterIndex = 5;
parameterValue = getParameter(hostedPlugin,parameterIndex)

%
% Copyright 2012 The MathWorks, Inc.