[JW Lua] Lyric-syllables

Jan Angermüller jan at angermueller.com
Thu Aug 7 23:06:46 CEST 2014


Hi Bart,

the sample code from the class browser should help:

for noteentry in eachentry(finenv.Region()) do
     local versesyllables = finale.FCVerseSyllables(noteentry)
     versesyllables:LoadAll()
     for vs in each(versesyllables) do
         the_text = finale.FCString()
         vs:GetRawText(the_text)
         print(vs:GetItemInci(),the_text.LuaString)
     end
end


Jan Angermueller


Am 07.08.2014 22:00, schrieb Bart Visser:
> 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
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>





More information about the JWLua mailing list