[JW Lua] Percussion midi map - Reading the percussion note names

Jan Angermüller jan at angermueller.com
Thu Jan 30 11:19:51 CET 2014


Jari,

is it possible to read the percussion note type string name,
and especially the custom made ones ?

With your code below I can read the NoteType and the MidiNote,
but would like to know for example that both "Note Type 2"
and "Note Type 13" are part of the "Bass drums" group,
and that for example "NoteType 3968" (=Custom 1) can also
be a bass drum, if the custom string says so.

Maybe it is the OrderID that exists both in FCPercussionLayoutNote
and FCPercussionMapNote that is part of the solution, but it currently
always returns 0.

In the video I sent you I used a hard-coded string table that I created
for all General MIDI percussion notes. But the table is not compatible
if the drum engine uses a non-General MIDI layout with custom
made notes.

The idea is still to be able to switch seamlessly between every installed
drum sampling engine automatically with one click.

Best regards,
Jan

Am 20.01.2014 09:16, schrieb Jari Williamsson:
> ---
> local staff = finale.FCStaff()
> staff:Load(1) -- Or whatever staff ID with percussion
>
> local instrumentdef = staff:CreateInstrumentDef()
>
> local mapnotes = instrumentdef:CreatePercussionMapNotes()
> for mapnote in each(mapnotes) do
>     print (mapnote.NoteType, "= MIDI", mapnote.MidiNote)
> end
> ---
>
> Best regards,
>
> Jari Williamsson





More information about the JWLua mailing list