I'm currently investigating how to implement measure counters (Bug 146):
http://code.google.com/p/lilypond/issues/detail?id=146

Compared to multi-measure rest numbers and to percent repeat numbers, there is 
a little complication: There is no grob to attach the numbers to (the percent 
repeat iterator creates one music object with the correct length for each 
percent/number, and the multi-measure rest also has the rest as the proper 
grob to attach to), and it is not straightforward to find the correct bounds 
for creating a spanner for each measure.

My current idea is to
1) start counting with an \startMeasureCounter event or context property
2) add a Measure_counter_engraver, which will create those counters
3) in each measure, create a spanner spanning the whole measure
4) create a MeasureCounter as a child of that spanner (centered).

Now, I don't know how to create a spanner that spans exactly one measure in an 
engraver... There might note be a barline (and there might be mid-measure 
barlines), so acknowledging bar lines is not possible. There might also be no 
notes at all at the beginning of a measure (e.g. with longas there are three 
measures without a note).

Any idea how to implement this?

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to