lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem coloring Ambitus ledger-lines


From: Patrick Karl
Subject: Re: Problem coloring Ambitus ledger-lines
Date: Thu, 21 Jul 2016 11:21:20 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 7/9/16 9:51 AM, Thomas Morley wrote:
2016-07-09 16:22 GMT+02:00 Patrick Karl <address@hidden>:
The following MWE:

\version "2.19.38"

music =  { c'4 c''' r2 }

\score {
     \new Staff \music
     \layout {
        \context { \Staff \consists "Ambitus_engraver"
            \with { \override AmbitusNoteHead.color = #red
                       \override AmbitusLine.color = #red
%                     \override LedgerLineSpanner.color = #red
            }
        }
     }
}

seems to illustrate a problem with Ambitus, namely, there doesn't seem to be
a way to change the color of ledger lines within the Ambitus.  The output of
the above snippet is attached; it shows the Ambitus ledger lines as black.
Uncommenting the "\override LedgerLineSpanner.color = #red" statement
changes the color of not only the ledger lines within the score, but also
within the Ambitus.

It looks like there should be a grob, AmbitusLedgerLineSpanner, independent
from LedgerLineSpanner.
We have the start/stopStaff-functionality to insert changes for p.e.
StaffSymbol and LedgerLineSpanner,.

Or am I overlooking something?
How about:

music =  {
   \once \override Staff.LedgerLineSpanner.color = #red
   \grace s128
   \stopStaff
   \startStaff
   c'4 c''' r2
}

\score {
     \new Staff \music
     \layout {
        \context {
          \Staff
          \consists "Ambitus_engraver"
          \override AmbitusNoteHead.color = #red
          \override AmbitusLine.color = #red
        }
     }
}
When I use this technique in the following snippet:

\version "2.19.38"

S =  \relative g' {
    \key g\major
    \once \override Staff.LedgerLineSpanner.color = #red
    \grace s128 \stopStaff \startStaff
    c4 e c' c % 1
}

PRh =  \relative c'' {
    \key g\major
     \grace s128
     g4 g g g    % 1
}

\score {  <<
    \new StaffGroup  <<
            \new Staff \with { \consists Ambitus_engraver }  \S
    >>
    \new PianoStaff  <<
        \set PianoStaff.instrumentName = #"Piano"
        \new Staff \PRh
    >>
  >>
    \layout {}
}

I get the attached output, which is lovely in all respects but one: the PianoStaff instrument name is missing. The only way I have found to remedy this problem is to remove both lines containing "\grace s128", but, of course, then all of the ledger lines are colored red, not just those in the ambitus.

How to fix?

Thanks,
Pat



Attachment: Screen Shot 2016-07-21 at 11.13.35 AM.png
Description: PNG image


reply via email to

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