Is there any way to define a function in finalescript?
Let's say I have a finalescript, and as part of it, I have a block of code that transposes some measures n lines. But, I feel that it would be much more convenient to create a function transpose(n)
that transposes it by n half-steps.
So, is there any way to do this in finalescript?
No. In the closest thing I could find to a documentation, there was nothing written about functions.
But, when I thought about your particular question, would you ever need a transpose(n)
function? Because if you're going to have a transposition script, wouldn't you simply transpose everything?
An example from the 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”
I agree that it would be very nice and convenient to have functions in finalescript, but I guess that finalescript does not have them.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With