lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add measure counters?


From: Neil Puttock
Subject: Re: How to add measure counters?
Date: Mon, 12 Sep 2011 20:51:09 +0100

On 12 September 2011 20:45, Reinhold Kainhofer <address@hidden> wrote:

> Exactly, that was my idea. My problem is that I can't do it like in the
> percent repeat case, where we have percent-repeat-events (generated in the
> iterator), which start at the right moment and have the correct length. In the
> measure counter case everything is handled via context properties (or maybe a
> start/stop event), so there is no music event at the start of each measure and
> thus there is also no event from which I can obtain the length of one such
> measure-spanner.
>
> So, to formulate the question a little more precisely: In the engraver, for
> which events or grobs do I have to listen/acknowledge to get the left and the
> right column for each bar?
>
> I can't listen to bar lines, since there might be mid-measure barlines, or no
> barline at all (think longa or breve)...

Can't you just use the same timing information the
Multi_measure_rest_engraver uses?  It knows the current moment and the
length of each bar, so you only have to store columns (via
currentCommandColumn) and create a new counter grob for each bar.  You
just need to set the bounds at the right time, bearing in mind that
adjacent counters will need the same column but for opposite bound
directions.

Cheers,
Neil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]