Mac 版 Logic Pro 中的脚本编辑器 SetParameter 函数

SetParameter() 函数可让你以编程的方式设定控制的值。

其用法类似于 GetParameter 函数,但你需要为想要设定的值添加第二个自变量。

  • 第一个自变量描述将会访问哪个参数。该自变量可以是整数(索引)或字符串(参数名称)。

  • 第二个自变量是你想要设定的值(始终为数字)。

【重要事项】对一个参数同时使用 SetParameter 和轨道自动化会导致异常行为。你可以通过停用每个参数的自动化来规避这类问题。

代码使用示例

该示例代码会创建一个滑块控制,并在每次插件复位时将该滑块的值重设为 0。

【注】你可以基于每个参数选择不使用自动化,方法是在参数定义中包括 'disableAutomation:true'

function Reset() {SetParameter('slider', 0);}var PluginParameters = [{name:'slider', type:'lin', defaultValue:0.5, numberOfSteps:100, minValue:0, maxValue:1}];
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.