[JW Lua] FCNote:CalcMIDIKey() on percussion staves can show wrong values

Jan Angermüller jan at angermueller.com
Tue Dec 1 15:21:10 CET 2015


Jari,

I noticed that FCNote:CalcMIDIKey() may not work on percussion staves if 
the key is not C major.
Run the following script on the attached mus file and it will print 
different MIDI keys than the internal Finale "Show Percussion MIDI 
Values". If you transpose the score back to C major, it will show the 
correct values. Currently it's set to G major (7 steps) and the 
calculated MIDI values are 7 steps too high.

finenv.Region():SetFullDocument()
for e in eachentry(finenv.Region()) do
     for i =0,e.Count-1,1 do
         print(e:GetItemAt(i):CalcMIDIKey())
     end
end

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: percussion midi key.zip
Type: application/zip
Size: 46059 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20151201/1a65aad9/attachment.zip>


More information about the JWLua mailing list