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

Jan Angermüller jan at angermueller.com
Thu Jan 30 17:13:06 CET 2014


I thought there might have been such a text file,
but I didn't find it. So thank you very much for the hint !
That's just the percussion information I need.

And yes, you're right, implementing a file import for that
is of low priority. I will do something on my own.

Jan

Am 30.01.2014 15:27, schrieb Jari Williamsson:
> Jan,
>
> The order ID is only used only for multiple setups of identical 
> instruments in the Percussion Midi Map. The RawNoteType would also be 
> above 4096 for these items.
>
> I'll add the reading of the name from the XML to the next beta. 
> However, for most notes, that field would be empty since most notes 
> use the default name.
>
> The default name for a virtual percussion note is stored in a text 
> file called PercNoteTypes.txt. For now, it would probably be quickest 
> to create a reader in the script for that, since it's currently low 
> priority to implement that inside JW Lua at the moment (since 
> MakeMusic might move that file around between Finale versions).
>
>
> Best regards,
>
> Jari Williamsson
>
>
> On 2014-01-30 11:19, Jan Angermüller wrote:
>> 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
>>
>>
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>>
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>





More information about the JWLua mailing list