[JW Lua] eachentrysaved can automatically remove the TieBackwards flag

Robert Patterson robert at robertgpatterson.com
Mon Apr 15 04:48:07 CEST 2024


This is definitely Finale resetting the tie end bit (as it can do at any
time.) The interesting part is, what's triggering it is saving the empty
layer 2 frame in bar 2. The `eachentrysaved` function uses FCNoteEntryCell
<https://github.com/finale-lua/lua-source/blob/master/built-in-functions/rgplua_built_in_functions.lua>to
hold the frames. By default, a frame for all four layers is created. (This
allows a script to insert notes into empty frames, for example.)

You can limit the layers it loads with SetLoadLayerMode. Then the empty for
loop will not reset the tie end:

local region=finale.FCMusicRegion()
region:SetFullDocument()
for e in eachentrysaved(region, 1) do
end

Weirdly, even freezing the accidental doesn't preserve it from this Finale
bug. A helpful addition might be a new loadlayermode that loads only the
frames that are there, which could be different cell by cell.


On Sun, Apr 14, 2024 at 11:05 AM Robert Patterson <
robert at robertgpatterson.com> wrote:

> This is almost certainly Finale recalculating the Tie End bits when the
> TGF is saved, but I'll check it. Finale can recalculate ties at any point,
> so if you don't want an accidental it should be forced.
>
> On Sun, Apr 14, 2024 at 10:19 AM Jan Angermüller <jan at angermueller.com>
> wrote:
>
>> Robert,
>>
>> the following simple "Do nothing, except save" script on the attached
>> score makes an accidental appear on the layer 2 note in measure 3:
>>
>> local region=finale.FCMusicRegion()
>> region:SetFullDocument()
>> local e
>> for e in eachentrysaved(region) do
>> end
>>
>> Is this the expected behaviour?
>> It may not be best practice to use the "TieBackwards /Tie End" flag to
>> hide the accidentall as the tie comes from another layer.
>> However, eachentrysaved should not remove the TieBackwards flag either.
>>
>> When running the loop with eachentry, everything remains like it is.
>> (tested with RGP Lua 0.66 and 0.73)
>>
>> Jan
>>
>> _______________________________________________
>> 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/20240414/2f4141ff/attachment.htm>


More information about the JWLua mailing list