[JW Lua] create MMR

Joseph Weidinger jsphweid at gmail.com
Tue May 5 18:22:49 CEST 2015


So one must manually define each MMR it seems (meanwhile
defining/re-defining) what an MMR is (which is probably pretty easy to
screw up).

My outline would be to parse each measure, check if measure is empty, if
so, add it to some table and keep doing this until a measure with notes /
double bar line / tempo alteration is reached and get the high / low values
of the table and use that to define an MMR.  I think I can do most of that
easily.

So to create MMR in all parts, I have to parse each part with a switchto /
switch back.  Iterate through each measure of each part, through each note
entry of each measure and use maybe IsNote() in FCNoteEntry class to do
that logic.  Currently, I'm having trouble getting to FCNoteEntry.  Here's
my code:

local parts = finale.FCParts()
parts:LoadAll()
for p in each(parts) do
p:SwitchTo()
local measures = finale.FCMeasures()
measures:LoadAll()
for m in each(measures) do
local noteEntry = finale.FCNoteEntry() -- error
   end

p:SwitchBack()
end

Every example / sample I can find only seems to deal with NoteEntry from
finenv.Region() not something like measures:LoadAll(). How do I get to
FCNoteEntry from m in each(measures)?  Thanks.


On Tue, May 5, 2015 at 9:28 AM, Jari Williamsson <
jari.williamsson at mailbox.swipnet.se> wrote:

> Joseph,
>
> Look at the detailed info for the FCMultiMeasureRest class. That should
> provide the info you need. Let me know if this doesn't work for you.
>
>
> Best regards,
>
> Jari Williamsson
>
>
>
> On 2015-05-05 16:09, Joseph Weidinger wrote:
>
>> How do you perform the equivalent for "multimeasure rests --- > create"
>> ? The FCMultiMeasureRest(s) seem like they alter the appearence of
>> multimeasure rests but don't necessarily have methods to "create" them.
>> FCMeasure contains a BreakMMRest but I can't find anything that creates.
>>
>> Unfortunately it isn't in FCUI / MenuCommand either.
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150505/ae5a4dc7/attachment.htm>


More information about the JWLua mailing list