lilypond-user
[Top][All Lists]
Advanced

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

Re: Color tweaks (edition engraver)


From: David Nalesnik
Subject: Re: Color tweaks (edition engraver)
Date: Sat, 2 May 2015 16:16:00 -0500



On Sat, May 2, 2015 at 3:56 PM, Kieren MacMillan <address@hidden> wrote:
Hi David,

> Aha.  So in the console do you see something like

No…  =)

 (make-music
  'SequentialMusic
  'elements
  (list (make-music
          'NoteEvent
          'pitch
          (ly:make-pitch 1 0)
          'duration
          (ly:make-duration 2))))

That’s it.


:(

Another discovery is making me think that there is just no good way to solve this problem.

Try:

 \colorOverride
{
  \override NoteHead.X-extent = #'(-1 . 1)
  \override NoteHead.font-size = 3
  \override NoteHead.stencil = #ly:note-head::print
  c1
  \revert NoteHead.X-extent
  c1
  \revert NoteHead.font-size
  c1
  \revert NoteHead.stencil
  c1
}

A single revert kills the color, even though two overrides are in effect.

Conversely. using \markAllAlteredGrobs (in color-tweaks2.y above, not to be confused with colorTweaks2.ly), only the last \revert removes the color, which is as it should be.

Try:

{
  \override NoteHead.X-extent = #'(-1 . 1)
  \override NoteHead.font-size = 3
  \override NoteHead.stencil = #ly:note-head::print
  c1
  \revert NoteHead.X-extent
  c1
  \revert NoteHead.font-size
  c1
  \revert NoteHead.stencil
  c1
}

\layout {
  \context {
    \Score
    \markAllAlteredGrobs
  }
}

I just don't think there is any way to do this perfectly.

Maybe I'll try an engraver, since it looks like we need live grobs (the \markAllAlteredGrobs approach)

DN

reply via email to

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