<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jari,<br>
<br>
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
<span style="color: rgb(37, 53, 85); font-family: Roboto,
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; font-weight: bold; letter-spacing: normal; line-height:
22px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(226, 232, 242);">FCPercussionLayoutNotes::FindMidiNote</span>,
but it requires the FCPercussionMapNotes as parameter which is nil
in the case of "Built in GM".<br>
<br>
Jan<br>
<br>
<br>
<div class="moz-cite-prefix">Am 08.11.2015 um 14:49 schrieb Jan
Angermüller:<br>
</div>
<blockquote cite="mid:563F5302.9050209@angermueller.com" type="cite">Jari,
<br>
<br>
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".
<br>
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".
<br>
But I am not sure if all values are 100% correct, although it
seems to work fine now.
<br>
Maybe you can access the "Built in GM"-map somehow and return it
instead of the nil ?
<br>
<br>
Code snippet:
<br>
...
<br>
local staff = finale.FCStaff()
<br>
staff:Load(staffnumber)
<br>
local instrumentdef = staff:CreateLayerInstrumentDef (1)
<br>
local mapnotes = instrumentdef:CreatePercussionMapNotes()
--returns nil if set to "None (Built in GM)"
<br>
...
<br>
<br>
Jan
<br>
<br>
_______________________________________________
<br>
JWLua mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<br>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>