Hi Paul,
Am 04.06.21 um 16:36 schrieb Paul McKay:
I am working on some Haydn piano music and want to distinguish between
urtext and my version music. (I plan to write out the variations I use
when I repeat.) A neat way to do it would be to change the colour of
the staff lines. I can't find a way that works. I can change the
colour easily enough at the beginning of the staff, but it doesn't
seem possible to change it thereafter. For what I want to achieve, it
would be fine to start a new staff but it would need to look like a
continuation of a previous one. Here is what I've tried so far. I'd
like the final version to have two contiguous bars where the staff
colour matches what's indicated by the markup.
Thanks in advance.
Paul
You can change the StaffSymbol colour mid-staff if you use stopStaff /
startStaff before and after:
\version "2.22.1"
{
\override Staff.StaffSymbol.color = #blue
c'1
\stopStaff
\override Staff.StaffSymbol.color = #magenta
\startStaff
c'1
}
There are some slight issues with this solution (maybe needing to change
BarLine.layer, and tiny gaps if you need to change the colour at a place
where there's no bar line), but all of these can be dealt with.
Lukas