Now I would like to make the same but with second measure grey. I use \ed function at
and here it is the new code (at the end of this message I included the complete code):
This code unfortunately does not work as expected (expected to me :)) because the separator bar between c4 and c2 now has disappeared. How can I fix it?
editorsColor = #grey
ed =
#(define-music-function (parser location grob col mus)
(symbol-list-or-symbol? (color? editorsColor) ly:music?)
;; for abbreviations, we need a symbol instead of a one-element list
(let ((grob (if (= 1 (length grob)) (car grob) grob)))
(case
grob
;; define abbreviations
;; which call the function recursively with a value
;; leading into the (else) clause
;; (or to _another_ abbreviation)
;; be careful to avoid infinite recursion :-)
;; – abbreviation names must not be actual grob names
;; (at least if they’re used in the corresponding
;; clause) or recursion will be infinite also
;; It is recommended to use singular forms only
;; for abbreviations.
((Caut) #{ \ed Staff.AccidentalCautionary #})
((LedgerLine) #{ % barline is workaround to issue 3949
\once\hide Staff.BarLine \bar "|"
\stopStaff
\ed Staff.LedgerLineSpanner {
\startStaff
$mus
\stopStaff
}
\once\hide Staff.BarLine \bar "|"
\startStaff #})
((Mmr) #{ \ed MultiMeasureRest $mus #})
((Note) #{ \ed Staff.Accidental
\ed Beam
\ed Dots
\ed Flag
\ed LedgerLine
\ed NoteHead
\ed Rest
\ed Stem $mus #})
((Pitch) #{ \ed NoteHead $mus #})
((Suggest) #{ \ed Staff.AccidentalSuggestion #})
((StemWithFlag) #{ \ed Stem \ed Flag $mus #})
((Tuplet) #{ \ed TupletNumber \ed TupletBracket $mus #})
;; ‘normal’ case
(else
#{
\override $grob . color = #col
$mus
\revert $grob . color
#}))))
\fixed c'' {
\partial 4 c4
\partial 2. \ed Note {c2. }
}