lilypond-user
[Top][All Lists]
Advanced

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

Re: color change working in only upper staff


From: Pierre Perol-Schneider
Subject: Re: color change working in only upper staff
Date: Mon, 18 Jul 2022 17:16:41 +0200

Hi William, hi Jim,


Le lun. 18 juil. 2022 à 16:38, William Rehwinkel <william@williamrehwinkel.net> a écrit :

Hey Jim,

To be honest, I'm not sure why the example you posted doesn't work, but I was able to find a workaround by using \contexts to apply the override to each staff, like so.

Using << { } // { } >> creates addition
 

\version "2.20.0"

upper = \relative c'' { % remove \override
  \clef treble
  \key c \major
  \time 4/4

a-1 cis' <e, a c e>\tuplet 3/2 {<c c'>8~<c c'> <c c'>}


}

lower = \relative c { % remove \override
  \clef bass
  \key c \major
  \time 4/4

<<{f'1}-2\\{r4. e32-1 cis-2 a-4 f-1 d2-2}>>

}

\score {
  \new PianoStaff <<
    \set PianoStaff.instrumentName = #"Piano  "
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
  \layout {
    \context {
        \Staff
        \override Fingering.color = #red
    }
  }
  \midi { }
}


On 7/18/22 09:36, Jim Cline wrote:
Hi David, thanks, I have attached a 1-measure example that illustrates the problem.  The upper staff is showing the requested color for the fingering.  I can see now that it has to do with the <<{}\\{}>> construct.
The override does not apply to objects within << >> apparently.  Any suggestions will be appreciated.  regards, Jim



\version "2.20.0"

upper = \relative c'' {
  \override Fingering.color = #red
  \clef treble
  \key c \major
  \time 4/4

a-1 cis' <e, a c e>\tuplet 3/2 {<c c'>8~<c c'> <c c'>}


}

lower = \relative c {
  \override Fingering.color = #red
  \clef bass
  \key c \major
  \time 4/4

<<{f'1}-2\\{r4. e32-1 cis-2 a-4 f-1 d2-2}>>

}

\score {
  \new PianoStaff <<
    \set PianoStaff.instrumentName = #"Piano  "
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
  \layout { }
  \midi { }
}
-- 
William Rehwinkel

william@williamrehwinkel.net
https://williamrehwinkel.net

reply via email to

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