[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to add measure counters?
From: |
Carl Sorensen |
Subject: |
Re: How to add measure counters? |
Date: |
Fri, 9 Dec 2011 23:58:58 +0000 |
User-agent: |
Microsoft-MacOutlook/14.13.0.110805 |
On 12/9/11 4:32 PM, "Xavier Scheuer" <address@hidden> wrote:
>On 12 September 2011 21:03, Reinhold Kainhofer <address@hidden>
>wrote:
>> 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?
Could the timing-translator create a MeasureStart grob, that has no
display, but becomes part of a NoteColumn at the beginning of each
measure? And then the measure_counter_engraver would acknowledge
MeasureStart grobs?
Don't have any idea if this would work or not.
HTH,
Carl