|
From: | William Rehwinkel |
Subject: | Re: color change working in only upper staff |
Date: | Mon, 18 Jul 2022 14:16:14 +0000 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
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.
\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 { }
}
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
[Prev in Thread] | Current Thread | [Next in Thread] |