Getparameter( param ), Setparameter( param, value ), Getparameterminmax( param ) – Expert Sleepers MIDI & OSC Scripting v1.1.0 User Manual

Page 7: Getparameterunit( param ), Getparametername( param ), Isparameterused( param ), Getnumparameters(), Setothersparameter( id, param, value )

Advertising
background image

getParameter( param )

Returns the value of the plug-in parameter. ‘param’ can either be the parameter name or
the parameter ID (as returned from getParameterID()). Using the ID is more efficient.
Typically you would obtain the ID in the main script body (which is only executed once)
and then use it in a handler function (which can be called many times). E.g.

pitch = getParameter( “Pitch” )
pitch = getParameter( paramID_Pitch )

setParameter( param, value )

Sets the value of the plug-in parameter. See the description of getParameter() for the mean-
ing of ‘param’. E.g.

setParameter( “Pitch”, 12.0 )
setParameter( paramID_Pitch, 12.0 )

getParameterMinMax( param )

Returns the minimum and maximum values allowable for a plug-in parameter. See the de-
scription of getParameter() for the meaning of ‘param’. E.g.

local minv, maxv = getParameterMinMax( paramID_Pitch )

getParameterUnit( param )

Returns an integer value that indicates the unit of the parameter (e.g. Hz, db, seconds).
The unit is one of the values defined by Apple’s Audio Unit specification.

getParameterName( param )

Returns the name of the parameter. (This is the same name that appears at the top right of
the GUI when the mouse is over a parameter’s control.)

isParameterUsed( param )

Returns a boolean value indicating whether the given parameter number is used by the
plug-in. You should not attempt to set or get the value of an unused parameter.

getNumParameters()

Returns the total number of parameters that the plug-in defines. More strictly speaking -
returns one more than the largest parameter ID that the plug-in uses, since there may be
unused parameter IDs.

setOthersParameter( id, param, value )

As setParameter(), but sets the parameter on another instance of the plug-in, not necessar-
ily the one running the script. This allows you to control several instances of the plug-in
from a single script.

Advertising