On 7/9/16 9:51 AM, Thomas Morley wrote:
2016-07-09 16:22 GMT+02:00 Patrick Karl <[email protected]>:
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



_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to