如何创建一个功能

时间:2015-02-08 21:03:28

标签: windows function task finalescript

有没有办法在finalescript中定义一个函数?

让我们说我有一个结局,作为其中的一部分,我有一段代码可以转换一些测量值。但是,我觉得创建一个函数transpose(n)可以更方便地将它转换为n个半步。

那么,有没有办法在finalescript中做到这一点?

1 个答案:

答案 0 :(得分:3)

即可。在closest thing I could find to a documentation中,没有任何关于函数的文章。

但是,当我想到你的特定问题时,你会不会需要一个transpose(n)函数?因为如果你想要一个换位脚本,你不会简单地转换一切吗?

来自finalescript blog

的示例
//set this to the key of the instrument transposition

key signature F major

//highlight the staff that needs to be made key independent
//or you can set the staff to be selected by removing the
//comment slashes and changing the number

select staff 1

staff attributes
check “Key Signature” Near “Independent Elements”
press “ok”

//Set this to the key of the piece, such as C major

key signature C Major

//to correct the pitch of the staff you need to set this

menu item “Utilities/Transpose”
radio “Down”
radio “Chromatically”
popup “Perfect Fourth”
type “0” near “Octave(s)
uncheck “Preserve Original Notes”
press “OK”

我同意在finalescript中使用函数会非常方便,但我猜finalescript没有它们。

祝你好运!