[JW Lua] FCPercussionMapNotes with map sets to "None: (Built in GM)"
Jan Angermüller
jan at angermueller.com
Sun Nov 8 14:49:54 CET 2015
Jari,
when I use CreatePercussionMapNotes() on a staff that uses the default
percussion MIDI Map "None (Built in GM)", it returns a nil value instead
of the map "Built in GM".
As a workaround I have stored the (what I think are the) General MIDI
percussion map values in a table which will be used in case of "nil".
But I am not sure if all values are 100% correct, although it seems to
work fine now.
Maybe you can access the "Built in GM"-map somehow and return it instead
of the nil ?
Code snippet:
...
local staff = finale.FCStaff()
staff:Load(staffnumber)
local instrumentdef = staff:CreateLayerInstrumentDef (1)
local mapnotes = instrumentdef:CreatePercussionMapNotes() --returns
nil if set to "None (Built in GM)"
...
Jan
More information about the JWLua
mailing list