lilypond-user
[Top][All Lists]
Advanced

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

Re: Background Colour


From: Jean Abou Samra
Subject: Re: Background Colour
Date: Tue, 18 May 2021 20:04:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1


Le 18/05/2021 à 17:55, Lukas-Fabian Moser a écrit :
Hi Jean,

How about a separate grob with engraver? Try the attached.

This should be included in the documentation as a textbook example for a not-quite-trivial, but reasonably straightforward example of a both a custom engraver and a custom grob.

Well, the documentation doesn't have any material about Scheme engravers yet. For now, I'll add it to the guide I wrote up.

Thanks very much for this!

You're welcome.

And wouldn't it be worth to add the convenience macro define-grob! to LilyPond's stock scheme library?

In this state, it is a dirty hack that will cause problems in particular cases (like defeating per-session semantics). I'd rather recode this part of the internals so that grobs can be defined with a nicer interface. For some time, I have been musing with the perspective of grob definitions in a fashion similar to context definitions, borrowing most of the syntax, like:

\layout {
  \grob {
    \NoteHead
    color = "red"
  }
  \grob {
    \name Highlight
    \type Item
    \interface text-interface
    \interface ...
    stencil = #highlight::print
    Y-extent = ##f
    ...
  }
}

I'd be happy if someone led discussions for this and implemented it in some form; I might do it at some point, but my contributor stack already contains quite a few projects currently.

Best,
Jean




reply via email to

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