[JW Lua] Calculating space between left barline and first note entry

Jan Angermüller jan at angermueller.com
Thu Jul 24 13:12:25 CEST 2014


Is there a function to calculate the EVPU width between
left barline and first note/accidental position
taking into account time sig/key sig/clef symbols
that may occur on the beginning of the measure ?

I hoped measure:GetSpaceBefore() would do this,
but it returns the measure attribute "Extra Space Before Music" only.

A workaround would be to calculate the difference
between the left barline and the first note/accidental metric position.
But I didn't find a function to calculate the position
of the left barline. And I think a function to calculate the position
of accidentals does not exist either. So calculating the note head/stem
entry metrics would not be sufficient, if an accidental existed.

Adding something like GetAccidentalPosition to FCEntryMetrics
and GetLeftBarlinePosition to FCMeasure would be a great.
And of course, GetFullSpaceBefore for FCMeasure
(in contrast to Get(Extra)SpaceBefore).

Jan


--
Dipl.-Ing. (FH) Jan Angermueller
Audio- und Videoproduktion
Jevenstedter Str. 80
22547 Hamburg





More information about the JWLua mailing list