[JW Lua] Lyric-syllables

Bart Visser bartvisser at me.com
Thu Aug 7 22:00:43 CEST 2014


Hi,

I'm able to load the syllables of the first verse/chorus/section, but not of the second, third, etc.

This works as expected:

local region = finenv.Region()
for noteentry in eachentry(region) do
    local vs = finale.FCVerseSyllable()
    vs:SetNoteEntry(noteentry)
    if vs:LoadFirst() then
	the_text = finale.FCString()
	vs:GetRawText(the_text)
	print(vs:GetItemInci())
    end
end

This returns an error (attempt to call method 'Load' (a nil value)):

local region = finenv.Region()
for noteentry in eachentry(region) do
    local vs = finale.FCVerseSyllable()
    vs:SetNoteEntry(noteentry)
    if vs:Load(1) then
	the_text = finale.FCString()
	vs:GetRawText(the_text)
	print(vs:GetItemInci())
    end
end

Is there something I'm overlooking?

A related question: is there a method/property that tells me the verse/chorus/section number of the syllable? There is a IsVerse() method, but I'm looking for something that tells me which verse I'm dealing with (Chorus 1, Verse 2, etc.).

Thanks,


Bart Visser



More information about the JWLua mailing list