修改此控制項目會使頁面自動更新

Scripter ParameterChanged function in Logic Pro for Mac

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.
有幫助?
字元限制: 250
字元數目上限為 250。
感謝您提供意見。
Morty Proxy This is a proxified and sanitized view of the page, visit original site.