[JW Lua] Last tuplet entry not found...

Robert Patterson robert at robertgpatterson.com
Fri Aug 2 18:06:59 CEST 2024


Based on a test case from Simon, It appears as though Finale creates bogus
tuplet start records for grace notes that coincide with the start of a
tuplet. Semantically you might be able to argue that it isn't a bug, but
effectively the grace notes are in the way and need to be skipped. (Note
that when your loop finally reaches the first non-grace-note entry, it
correctly finds the final entry of the tuplet.)

My recommendation is to simply skip grace notes, since it appears (with
experimentation) that tuplets don't appear on them anyway, even when they
are there in the data. In addition, you might consider skipping any entry
where CalcLastTupletEntry returns nil. (But see the next paragraph.)

An actual unarguable bug I found is that this function fails to correctly
identify the end entries for non-grace-note tuplets where the "in the time
of" value is 0. This is a Finale bug. You might be thinking, "When would I
ever set in-the time-of to 0?" The answer is that my Beam Over Barlines
plugin does it to create beams on standalone note values. However, this
limitation doesn't seem like it's worth working around in RGP Lua. If you
must support it, I suppose you could add Lua code to do so.


On Fri, Aug 2, 2024 at 8:52 AM Simon Leclerc <simon at sleclerc.ca> wrote:

> Thanks for the input, Robert.
> I’ll send you file and script later today.
>
>
>
>
>
> ¯\_(ツ)_/¯
>
> Simon Leclerc
> 60, Mirabelle
> Ste-Agathe-des-Monts, Québec
> J8C 0W9
> simon at sleclerc.ca
>
>
>
>
> On Aug 2, 2024, at 09:38, Robert Patterson <robert at robertgpatterson.com>
> wrote:
>
> It looks like this value is being calculated by Finale rather than the PDK
> Framework. The Framework is simply fishing it out of Finale's somewhat
> convoluted data structures. This is (potentially at least) a Finale bug.
>
> If you want to send me a demo file and script, I'll see if there is an
> issue in the Framework.
>
>
> On Fri, Aug 2, 2024 at 8:19 AM Simon Leclerc <simon at sleclerc.ca> wrote:
>
>> Hi to all,
>>
>> It looks like the method “CalcLastTupletEntry” won’t find anything if the
>> first noteentry of the tuplet is preceeded by grace notes.
>> Have any of you noticed this behaviour?
>>
>>
>>
>>
>>
>> ¯\_(ツ)_/¯
>>
>> Simon Leclerc
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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/20240802/f21ee16d/attachment.htm>


More information about the JWLua mailing list