Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial69 Parameter Controls
All parameters are managed in code, and can be changed at any time, including during play and in reaction to changes another controls.
70 Create Controls
All parameter controls are managed in the global array
PluginParameters
:
var PluginParameters = [];
This array is a reserved keyword and is case-sensitive. Parameter controls are created as JSON objects and are pushed to the array. The order in which controls are created is the order in which they appear in the Scripter Parameters Window.
var PluginParameters = [];
.push({name:"Linear Slider 1", type:"lin", unit:"%", minValue:0, maxValue:100, numberOfSteps:100, defaultValue:50});
PluginParameters.push({name:"Linear Slider 2", type:"lin", unit:"%", minValue:0, maxValue:100, numberOfSteps:100, defaultValue:50});
PluginParameters.push({name:"Linear Slider 3", type:"lin", unit:"%", minValue:0, maxValue:100, numberOfSteps:100, defaultValue:50}); PluginParameters
The above code appears as the following in the parameters window:
If there are more controls than what will fit in the current window size, then scrolling is enabled. The window can be resized and the UI is responsive, but it can still resort to scrolling whenever there are more controls than window space.