[JW Lua] Append a note with lyric
Chris
marcel.denio at gmail.com
Mon Apr 13 09:49:21 CEST 2015
Hello Jari
I want to append a note with a syllable, but my code don't work.
Is it necessary to use a loop 'eachentrysaved'
---------------------------------------------------
local noteentrycell = finale.FCNoteEntryCell(1, 1)
noteentrycell:Load()
local entry = noteentrycell:AppendEntriesInLayer(4, 1) -- layer 4, 1 entry
if entry then
entry.Duration = finale.QUARTER_NOTE
entry.Legality = true -- Must be set for a created note
entry:MakeNote()
noteentrycell:Save()
local lyric = finale.FCVerseLyricsText()
lyric:Load(1)
local syllabe=finale.FCString()
syllabe.LuaString = "tmp"
local text = lyric:CreateString()
text:AppendString(syllabe)
lyric:SetText(text)
lyric:Save()
local vs = finale.FCVerseSyllable()
vs.RawTextNumber=1
vs.SyllableNumber=1
vs:SetNoteEntry(entry)
print(vs:SaveNew() )
end
---------------------------------------------------
Best regards
Chris
More information about the JWLua
mailing list