[JW Lua] Staff Baselines

Jan Angermüller jan at angermueller.com
Sun Sep 15 00:22:19 CEST 2019


 >2. The code does not seem to work with chords, fretboards, or lyrics
I am not sure about chords/fretboards, but indeed it does not work with 
lyrics.

That is a known bug which also effects my Perfect Layout.
My workaround is to run TG Tools (Lyrics->Adjust Baselines) before:
this plug-in does adjust the lyrics baseline (and is also a prove that 
it is theoretically possible in the Finale PDK).
In JW Lua it only works if you had already manually adjusted a lyrics 
baseline before - which probably sets a "CustomOffset=true" flag and 
which seems to be missing in JW Lua.

This bug is described on my JW Lua bug list from 2017 which included all 
open JW Lua bugs reported on the mailing until 2017 (not including those 
reported later): 
https://elbsound.studio/download.php?f=JWLuaBugAndWishList.doc
It was originally reported and discussed on the mailing list in August 2015.

Jan


Am 15.09.2019 um 00:06 schrieb Nick Mazuk:
> Got a script working for adjusting the expression baselines above the 
> staff. However, I’m running into two problems:
>
> 1. It seems to only work in Score View (not restricted from the Plugin 
> Def)
> 2. The code does not seem to work with chords, fretboards, or lyrics
>
> Here’s the working code:
>
> local region = finenv.Region()
> local start_measure = region:GetStartMeasure()
>
> local systems = finale.FCStaffSystems()
> systems:LoadAll()
> local system = systems:FindMeasureNumber(start_measure)
>
> local baselines = finale.FCBaselines()
> baselines:LoadAllForSystem(finale.BASELINEMODE_EXPRESSIONABOVE, 
> system:GetItemNo())
>
> function ToEvpus(text)
>     local str = finale.FCString()
>     str.LuaString = text
>     return str:GetMeasurement(finale.MEASUREMENTUNIT_DEFAULT)
> end
>
> for bl in each(baselines) do
>     bl.VerticalOffset = bl.VerticalOffset + ToEvpus('1s')
>     bl:Save()
> end
>
> The only change I made to the other versions are changing
>
> baselines:LoadAllForSystem(finale.BASELINEMODE_EXPRESSIONABOVE, 
> system:GetItemNo())
>
> to
>
> baselines:LoadAllForSystem(finale.BASELINEMODE_CHORD, system:GetItemNo())
>
> From what I’ve read, this change should work, but it isn’t. Any ideas? 
> I’ve spent a couple hours already trying things out.
>
> Thanks,
>
> Nick
>
> _______________________________________________
> 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/20190915/ab5b8695/attachment-0001.html>


More information about the JWLua mailing list