This snippet demonstrates the use of the Measure_counter_engraver
to
number groups of successive measures. Any stretch of measures may be numbered,
whether consisting of repetitions or not.
The engraver must be added to the appropriate context. Here, a Staff
context is used; another possibility is a Dynamics
context.
The counter is begun with \startMeasureCount
and ended with
\stopMeasureCount
. Numbering will start by default with 1, but
this behavior may be modified by overriding the count-from
property.
When a measure extends across a line break, the number will appear twice, the second time in parentheses.