Als u deze regelaar wijzigt, wordt deze pagina automatisch bijgewerkt

ParameterChanged function in Scripter MIDI plug-in in Logic Pro

The ParameterChanged() function lets you perform tasks triggered by changes to plug-in parameters. ParameterChanged is called each time one of the plug-in parameters is set to a new value. ParameterChanged is also called once for each parameter when you load a plug-in setting.

ParameterChanged is called with two arguments, first the parameter index (an integer number starting from 0), then the parameter value (a number).

Load the corresponding Tutorial setting to view the script in the Script Editor. This will help you to understand the syntax structure and layout of code and comments. See Use the Script Editor.

Tutorial script 6: Parameter Changed Callback

Print parameter changes to the plug-in console. This example also creates a slider in the plug-in window and assigns the ParameterChanged function to it.

Text following /* shows comments that explain the JavaScript code.

var PluginParameters = [{name:"Slider", type:"lin", minValue:0, maxValue:1, numberOfSteps:100, defaultValue:0}];/* create a slider with a value range of 0.0 to 1.0 and a default value of 0 */function ParameterChanged(param, value) {/* if it is the slider you just created */if (param == 0) {Trace(value); /* print the value to the console */ }}

Download the guides:

Logic Pro User Guide: Apple Books | PDF

Logic Pro Instruments: Apple Books | PDF

Logic Pro Effects: Apple Books | PDF

Morty Proxy This is a proxified and sanitized view of the page, visit original site.
Nuttig?
Tekenlimiet: 250
De maximale tekenlimiet is 250.
Hartelijk dank voor uw feedback.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.