[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-devel
Subject: add-grob-definition (was: measure counter engraver)
From: Pavel Roskin <proski () gnu ! org>
Date: 2012-04-27 21:35:02
Message-ID: 20120427173502.2e34b4ae () mj
[Download RAW message or body]
On Mon, 23 Apr 2012 21:01:10 -0500
David Nalesnik <david.nalesnik@gmail.com> wrote:
> Hi all,
>
> I've been experimenting with a way to create a measure-counter (issue
> 2445), and I've come up with the attached Scheme engraver. The music
> within a count doesn't need to be repeated to use it.
>
> This creates a new grob, MeasureCounter, which you can override in
> various familiar ways.
I was surprised that it's possible to create new grobs in Scheme! I
looked for that functionality while writing cross-staff stem support
and could not find it.
I see that you copied add-grob-definition from scheme-text-spanner.ly.
I believe add-grob-definition is so important that it should be a part
of the Lilypond core. That's the only way to define a new grob in
Scheme, and it gets copied from one snippet to another!
I think the best place for add-grob-definition would be
scm/translation-functions.scm next to make-engraver.
I've opened an issue for that:
http://code.google.com/p/lilypond/issues/detail?id=2503
--
Regards,
Pavel Roskin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic