Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


setParameter(nameOrID, value)


Function to set the value of a parameter. The parameter can be


determined by

ID or name. The identification by name needs more computing time and might be a disadvantage for timing critical scripts. To optimize your script, you can retrieve the ID of a parameter with getParameterDefinition during the initialization of the script and use this instead. If the parameter doesn't exist, nothing will happen.


The type of the new value must fit to the type of the parameter.


If a parameter is modified by a relative quick control, the audio/MIDI processing part of a module actually receives the modified value, while the UI still shows the original unmodified value. setParameter will only affect the original value, and the quick control modification is still applied before passing it to the processing part.


name or ID. The function will have no effect if the parameter does not exist.

Available in: Controller, Processor.


nameOrIDThe name or ID of the parameter


.string or number
valueThe value that you want to set.


Code Block
--set the value of the Level parameter of the parent layer
function onLoadIntoSlot()
    this.parent:setParameter("Level", 0) --set via name
    this.parent:setParameter(38, 0) --set via ID

The new value must match the data type of the parameter.


Excerpt Include
Working with Parameters
Working with Parameters


See Also: getParameter, getParameterNormalized, setParameterNormalized, hasParameter