Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

setParameter(nameOrId, value)

Description

Use this function to set the current value of a parameter. The parameter can be identified by ID or name. Please note that identifying by name needs more computing time. 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.

If you call setParameter on a parameter of the script module itself (e.g. using 'this:setParameter("param",value)') from within the processing, the global variable associated with the parameter will not be changed immediately, but will receive the quick control modified value in the next processing block.

Available in: Controller, Processor.

Arguments

nameThe name of the parameter you want to set.
idThe ID of the parameter you want to set.
valueThe value you want to set.

Example

--set the value of the Level parameter of the parent layer
function onInitProcessor()
   print(this.parent:setParameter("Level", 0)) --via name
   print(this.parent:setParameter(38, 0)) --via ID
end

See Also: getParameter

  • No labels