[JW Lua] Lyrics baselines

Bart Visser bartvisser at me.com
Tue Nov 10 13:46:57 CET 2015


Hi Chris,

Do you mean that by deleting those baselines above 10, you basically reset them all (those above 10)? That's quite smart :-) I'm not aware of another way to reset them.

Cheers,


Bart








> Op 9 nov. 2015, om 19:41 heeft Chris <marcel.denio at gmail.com> het volgende geschreven:
> 
> Hello Bart
> 
> We can reset the first 10 baselines and delete the others.
> (it's possible to delete the first 10)
> 
> Your code becomes :
> 
> --------------------
> local HIGHESTLYRIC = 100
> 
> function ResetGlobalBaselines(firstLevel, defaultDistance)
>    local baselineModesTable = {finale.BASELINEMODE_LYRICSVERSE, finale.BASELINEMODE_LYRICSCHORUS, finale.BASELINEMODE_LYRICSSECTION}
>    local baselineObject = finale.FCBaseline()
>    for _, baselineMode in pairs(baselineModesTable) do
>        for i=HIGHESTLYRIC,1,-1 do -- resets lyricNo 1-10 / delete >10
>            if baselineObject:LoadDefaultForLyricNumber(baselineMode, i) then
>                if i > 10 then  -- lyrics > 10
>                    baselineObject:DeleteData()
>                else    -- lyrics 1-10
>                    local newOffset = firstLevel - ((i-1)*defaultDistance)
>                    baselineObject.VerticalOffset = newOffset
>                    baselineObject:Save()
>                end
>        end
>        end
>    end
> end
> 
> local firstLevel = -149 -- in EVPUs
> defaultDistance = 55 -- Distance between baseline-levels in EVPUs
> 
> ResetGlobalBaselines(firstLevel, defaultDistance)
> --------------------
> 
> What's your opinion ?
> 
> Best regards
> 
> Chris
> 
> 
> 
> 
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list