[JW Lua] FCNoteEntry:PreviousInFrame()

Mr.Pat Mr.Pat at pdreditions.com
Sun Sep 10 18:33:23 CEST 2017


Hi Jari etal,

I'm running a script that used to run under 0.45 but doesn't under the
latest beta. I'm running on Finale 2014. (Still can't get JWLua to run on
Finale 25).

Anyway, I want to read the duration of a note two notes back from an
existing note, all notes in the same measure.

 

local pass = 1

for noteentry in eachentrysaved(finenv.Region()) do

print (noteentry.Duration)

    if pass == 1 then

print (noteentry.Duration)

    end

    if pass == 2 then

        pastnote = noteentry:PreviousInFrame()

print (pastnote.Duration)

    end

    if pass == 3 then

        pastnote2 = pastnote:PreviousInFrame()

print (pastnote2.Duration)

    end

    pass = pass + 1

end

        

 

It fails on pass 3 saying pastnote2 is a nil value. It used to work. Any
ideas?

Pat

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20170910/70b61d32/attachment.html>


More information about the JWLua mailing list