[JW Lua] eachentrysaved can automatically remove the TieBackwards flag

Robert Patterson robert at robertgpatterson.com
Mon Apr 15 13:49:42 CEST 2024


On further reflection, I think what I'll do is modify FCNoteEntryCell:Save
not to actually save an empty frame when the measure already lacks a frame
for that layer. That will work with any loadlayer mode and not require any
external code changes.

On Mon, Apr 15, 2024 at 4:35 AM Jan Angermüller <jan at angermueller.com>
wrote:

> Thank you for the quick explanation and solution, Robert!
>
> Jan
>
> Am 15.04.2024 um 04:48 schrieb Robert Patterson:
>
> 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
>>>
>>
> _______________________________________________
> JWLua mailing listJWLua at jwmusic.nuhttp://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
> --
> Jan Angermüller
> Orchideenstieg 13
> 22297 Hamburg
> Tel. 040 - 28 94 84 82
> Mobil 0173 - 99 33 904www.elbsound.studio
>
> _______________________________________________
> 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/20240415/439efae7/attachment.html>


More information about the JWLua mailing list