lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 2445 in lilypond: Center a number above a meas


From: lilypond
Subject: Re: [Lilypond-auto] Issue 2445 in lilypond: Center a number above a measure
Date: Wed, 11 Apr 2012 00:51:59 +0000


Comment #3 on issue 2445 by address@hidden: Center a number above a measure
http://code.google.com/p/lilypond/issues/detail?id=2445

David Nalesnik posted a candidate engraver to the bug-lilypond list here:

http://lists.gnu.org/archive/html/bug-lilypond/2012-04/msg00030.html

The engraver is attached to this command and the text of David's post is included below:

I've come up with the following Scheme engraver which allows you to create
a counter above measures (whether they are associated with repeated music
or not). This should work in 2.14.2, too, provided that you adjust the
position of \measureCounterStart and \measureCounterEnd.

Basically, it creates spanners attached on both sides to a
NonMusicalPaperColumn. (Originally, I used BarLines--not sure which is the
better approach.) For the spanner, I've defined a new grob, MeasureCounter.

It would be nice to be able to control what prefatory items to consider
when centering (for example, between bars alone, between time signature and
clef change, etc.), but I have no idea how to proceed with this. (I believe
Harm's functions allow you this control. How to do this with an engraver?)

I acknowledge NoteColumns so that the number will move out of the way of
notes, but I can't figure out how to (gracefully) include only those
columns within a given measure--I'm getting the first note-column of the
next measure into my 'elements array. This, of course, messes with vertical
and horizontal positioning. Any thoughts?

Another problem is that the spacing between systems isn't adjusted.

Anyway, I hope that I'm on the right track with this, and I'd welcome any
feedback!

Thanks,
David

P.S.  I realize that the function define-event-class is problematic at the
moment . . .

Attachments:
        measureCounterEngraver.ly  6.6 KB




reply via email to

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