[JW Lua] Lyrics baselines
Chris
marcel.denio at gmail.com
Mon Nov 9 19:41:09 CET 2015
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
More information about the JWLua
mailing list