<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Thank you so much Robert for this very insightful answer. I’ll look into it having all that in mind.<br><br><div dir="ltr">Simon Leclerc<div>Composer, conductor, arranger</div></div><div dir="ltr"><br><blockquote type="cite">Le 21 juin 2022 à 20:35, Robert Patterson <robert@robertgpatterson.com> a écrit :<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>I'm fairly certain that these are calculated values provided by Finale so you don't have to constantly recalc them for yourself. (Same with the clef value on FCNoteEntry.) I don't really know why they are writable. That was done long before I got to the code base. Any new values you write will be retained for the life of the FCNoteEntry instance, but they will not be saved.<br></div><div><br></div><div>To copy TGTools Easy Tremolos you need to modify the Duration property and add an invisible tuplet. So, for example, to turn 2 consecutive quarters into a half-note tremolo with three beams, you would change the Duration of each note from QUARTER_NOTE to NOTE_32ND. Then you would add a new invisible tuplet to the first one that is 2 32nds in the time of 2 quarters. After the FCNoteEntry is saved, the next time you retrieve it the MeasurePos and ActualDuration properties will have been updated.</div><div><br></div><div>I don't at this moment recall how much Jari's documentation says about TGFs. The PDK Framework mostly hides them from Lua scripters, but it's a pretty important concept for working with note entries. Entries always come out of a TGF, which is an array of entries for a single layer in a single measure. To save an entry, you have to save the entire TGF. This can lead to possibly unexpected behavior, for example:</div><div><br></div><div>for e in eachentrysaved(region) do</div><div>   e.Duration = e.Duration / 2</div><div>   break</div><div>end</div><div><br></div><div>This would appear to halve the first entry in a region, but in fact the entry won't be saved because you broke out of the loop. To save the entry, the loop *must complete*. (You can see for yourself how eachentrysaved works, because I've posted all the built-in iterator functions to the <a href="https://github.com/finale-lua/lua-source">lua-source</a> repository. Or you can fish it out of the jwlua binary for yourself, like I did originally.)<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 21, 2022 at 6:53 PM Simon Leclerc <<a href="mailto:simon@prodsl.ca" target="_blank">simon@prodsl.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>Am I right to understand that the 2 FCNoteentry methods “SetMeasurePos” and “SetActualDuration” have no effect?</div><div><br></div><div>I’m working on a plugin that deals with tremolos between whole notes and it does not seem possible to modify those 2 parameters.</div><div><br></div><div>I analyzed the result of the TGTool plugin “Easy tremolos” and I can see that the 2 parameters have been changed and saved.</div><div><br></div><div>Is there another class that needs to be addressed to make it work?<br><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="color:rgb(0,0,0);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><br></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="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-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="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;text-decoration:none"></div>
</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>
<span>_______________________________________________</span><br><span>JWLua mailing list</span><br><span>JWLua@jwmusic.nu</span><br><span>http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</span><br></div></blockquote></body></html>