[JW Lua] Manipulate things in each staff of every first measure of a system

Robert Wildling robertwildling at gmail.com
Fri May 27 13:40:19 CEST 2016


The idea is to add courtesy accidentals on each first note of a staff
(respecting layers), when there is a system break. To get all the first
measures of all the systems in a score, this snippet saves the measure
numbers in a table:

--table for all first measures in a system
local firstMeasuresTbl = {}

-- Get all staff system of the whole score
local staffSystems = finale.FCStaffSystems()
staffSystems:LoadAll()

for staffSys in each (staffSystems) do
    -- no need to check for courtesy accidentals in the first measure
    if(staffSys:GetFirstMeasure() > 1) then
         table.insert(firstMeasuresTbl, staffSys:GetFirstMeasure())
    end
end


But now I am stuck. How do I get all the staves in those measures? Or would
you suggest a different approach anyway?

Thanks! Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160527/ecf32294/attachment.htm>


More information about the JWLua mailing list