如何创建一个功能

416*_*577 5 windows function task finalescript

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

假设我有一个finalescript,作为其中的一部分,我有一个代码块,可以转换一些n行的度量.但是,我觉得创建一个transpose(n)将它转换为n个半步的函数会更方便.

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

小智 3

。在我能找到的最接近文档的地方中,没有任何关于函数的内容。

\n\n

但是,当我想到你的具体问题时,你是否需要一个transpose(n)函数?因为如果您要拥有一个转置脚本,您难道不会简单地转置所有内容吗?

\n\n

Finalescript 博客中的示例

\n\n
//set this to the key of the instrument transposition\n\nkey signature F major\n\n//highlight the staff that needs to be made key independent\n//or you can set the staff to be selected by removing the\n//comment slashes and changing the number\n\nselect staff 1\n\nstaff attributes\ncheck \xe2\x80\x9cKey Signature\xe2\x80\x9d Near \xe2\x80\x9cIndependent Elements\xe2\x80\x9d\npress \xe2\x80\x9cok\xe2\x80\x9d\n\n//Set this to the key of the piece, such as C major\n\nkey signature C Major\n\n//to correct the pitch of the staff you need to set this\n\nmenu item \xe2\x80\x9cUtilities/Transpose\xe2\x80\x9d\nradio \xe2\x80\x9cDown\xe2\x80\x9d\nradio \xe2\x80\x9cChromatically\xe2\x80\x9d\npopup \xe2\x80\x9cPerfect Fourth\xe2\x80\x9d\ntype \xe2\x80\x9c0\xe2\x80\x9d near \xe2\x80\x9cOctave(s)\nuncheck \xe2\x80\x9cPreserve Original Notes\xe2\x80\x9d\npress \xe2\x80\x9cOK\xe2\x80\x9d\n
Run Code Online (Sandbox Code Playgroud)\n\n

我同意在 Finalescript 中拥有函数会非常好且方便,但我猜 Finalescript 没有它们。

\n\n

祝你好运!

\n