<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Thanks for this, Robert.<div><br></div><div>Pushing the testing a little bit further, I came to the same conclusion and solution.</div><div>The grace notes preceeding the actual start of the tuplet also have the property of being the start of the tuplet. By “skipping” them, we do get the actual last entry of the tuplet.<br id="lineBreakAtBeginningOfMessage"><div>
<meta charset="UTF-8"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span class="Apple-style-span" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; widows: 2; border-collapse: separate; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><div><span style="font-style: normal;"><br class="Apple-interchange-newline"><br></span></div><div><span style="font-style: normal;"><br></span></div><div><span style="font-style: normal;"><br></span></div><div><span style="font-style: normal;"><br></span></div><div style="font-family: Helvetica; font-style: normal; font-weight: normal; font-size: 12px;"><span style="text-align: -webkit-auto; -webkit-text-decorations-in-effect: none; font-family: "Times New Roman", serif; font-size: 16px;">¯\_(</span><span style="text-align: -webkit-auto; -webkit-text-decorations-in-effect: none; font-family: "MS Gothic"; font-size: 16px;">ツ</span><span style="text-align: -webkit-auto; -webkit-text-decorations-in-effect: none; font-family: "Times New Roman", serif; font-size: 16px;">)_/¯</span></div><div style="font-family: Helvetica; font-style: normal; font-weight: normal; font-size: 12px;"><span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div><div>Simon Leclerc</div><div>60, Mirabelle</div><div>Ste-Agathe-des-Monts, Québec</div><div>J8C 0W9</div><div>simon@sleclerc.ca</div></div></span></div></div><div style="font-family: Helvetica; font-style: normal; font-weight: normal; font-size: 12px;"><br></div></div></span><br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; widows: 2;"><br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div></div>
</div>
<div><br><blockquote type="cite"><div>On Aug 2, 2024, at 12:06, Robert Patterson <robert@robertgpatterson.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>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.)<br></div><div><br></div><div>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.)<br></div><div><br></div><div>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.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2024 at 8:52 AM Simon Leclerc <<a href="mailto:simon@sleclerc.ca">simon@sleclerc.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Thanks for the input, Robert.<div>I’ll send you file and script later today.<br id="m_1697028077665758459lineBreakAtBeginningOfMessage"><div>
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span style="font-variant-caps: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><div><div><div><span style="font-style:normal"><br><br></span></div><div><span style="font-style:normal"><br></span></div><div><span style="font-style:normal"><br></span></div><div><span style="font-style:normal"><br></span></div><div style="font-family:Helvetica;font-style:normal;font-weight:normal;font-size:12px"><span style="font-family:"Times New Roman",serif;font-size:16px">¯\_(</span><span style="font-family:"MS Gothic";font-size:16px">ツ</span><span style="font-family:"Times New Roman",serif;font-size:16px">)_/¯</span></div><div style="font-family:Helvetica;font-style:normal;font-weight:normal;font-size:12px"><span style="font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;border-collapse:separate;border-spacing:0px"><div><div><br></div><div>Simon Leclerc</div><div>60, Mirabelle</div><div>Ste-Agathe-des-Monts, Québec</div><div>J8C 0W9</div><div><a href="mailto:simon@sleclerc.ca" target="_blank">simon@sleclerc.ca</a></div></div></span></div></div><div style="font-family:Helvetica;font-style:normal;font-weight:normal;font-size:12px"><br></div></div></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"></div></div>
</div>
<div><br><blockquote type="cite"><div>On Aug 2, 2024, at 09:38, Robert Patterson <<a href="mailto:robert@robertgpatterson.com" target="_blank">robert@robertgpatterson.com</a>> wrote:</div><br><div><div dir="ltr"><div>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.</div><div><br></div><div>If you want to send me a demo file and script, I'll see if there is an issue in the Framework.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2024 at 8:19 AM Simon Leclerc <<a href="mailto:simon@sleclerc.ca" target="_blank">simon@sleclerc.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi to all,<div><br></div><div>It looks like the method “CalcLastTupletEntry” won’t find anything if the first noteentry of the tuplet is preceeded by grace notes.</div><div>Have any of you noticed this behaviour?<br id="m_1697028077665758459m_-3825996847276590498lineBreakAtBeginningOfMessage"><div>
<div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="auto" style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-variant-caps:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;border-collapse:separate;border-spacing:0px"><div><div><div><span style="font-style:normal"><br><br></span></div><div><span style="font-style:normal"><br></span></div><div><span style="font-style:normal"><br></span></div><div><span style="font-style:normal"><br></span></div><div style="font-family:Helvetica;font-style:normal;font-weight:normal;font-size:12px"><span style="font-family:"Times New Roman",serif;font-size:16px">¯\_(</span><span style="font-family:"MS Gothic";font-size:16px">ツ</span><span style="font-family:"Times New Roman",serif;font-size:16px">)_/¯</span></div><div style="font-family:Helvetica;font-style:normal;font-weight:normal;font-size:12px"><span style="font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;line-height:normal;border-collapse:separate;border-spacing:0px"><div><div><br></div><div>Simon Leclerc</div></div></span></div></div><div style="font-family:Helvetica;font-style:normal;font-weight:normal;font-size:12px"><br></div></div></span></div></div></div></div></div>_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>
_______________________________________________<br>JWLua mailing list<br><a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br><a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>
_______________________________________________<br>JWLua mailing list<br>JWLua@jwmusic.nu<br>http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu<br></div></blockquote></div><br></div></body></html>