Section KeySignatures

KeySignature utility functions.

Summary

Return typeFunction and summary
KeySignatureGetKeySignatureAtBar(Staff staff, int barN, boolean visibleOnly)
Get the key signature at requested bar of requested staff.

Function

GetKeySignatureAtBar(Staff staff, int barN, boolean visibleOnly)

Get the key signature at requested bar of requested staff.

Search for last BarSetting less or equal to barN and retrieve its KeySignature. If visibleOnly is true then go backward until a visible key signature is found.

ParameterTypeDefaultDescription
staffStaff staff
barNint barN
visibleOnlybooleanfalseIf true, retrieve the last visible key signature. Else it can retrieve a hidden key signature.
Return
KeySignature: nil possible if no visible key signature and visibleOnly is true.