[JW Lua] FCPercussionMapNotes w/"None: (Built in GM)" cont'd
Jan Angermüller
jan at angermueller.com
Tue Dec 1 14:20:35 CET 2015
Jari,
in addition to the problem below I wonder how I can get the
FCPercussionLayoutNote corresponding to a known MIDI note if the
percussion map is set to "None (Built in GM)". Normally I would use
FCPercussionLayoutNotes::FindMidiNote, but it requires the
FCPercussionMapNotes as parameter which is nil in the case of "Built in GM".
Jan
Am 08.11.2015 um 14:49 schrieb Jan Angermüller:
> 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
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20151201/434d0e04/attachment-0002.html>
More information about the JWLua
mailing list