Hello Paul,
I do suggest using the solution Marc provided, it’s so much easier. But
for the sake of completeness:
Am 27.08.2015 um 09:44 schrieb B~M:
Sorry to ask this silly little question. I am writing out SATB
harmonies for a music exam
and Ive decided to colour the bass in blue, just to make it a little
more distinct.
Id like everything about the bass line/voice to be blue, to this end I
use
\override NoteHead.color = #blue
\override Stem.color = #blue
\override Accidental.color = #blue
\override Rest.color = #blue
\override TextScript.color = #blue
However Ive missed some stuff. If I extend the time duration of a note
with a dot, the dot comes out
as black.
\override Dots.color
Also, if I annotate the note with say a tenuto a-- or an accent a-^
that stuff comes out black also.
\override Script.color
I assume I can change the colour of such stuff but I do not know what
its called.
There must be a \override Something.color = #blue for the annotations
Ive mentioned and the dot duration
extension ?
The solution posted by Mark will not work on anything which lives at
Score level, e.g. ledger lines and bar lines.
See attached for two different approaches on this, depending on whether
you have another voice in the same staff.
By the way, the music functions in this particular state require
v2.19.24 at least; if you’re on an earlier version, rewrite
"#(define-music-function (color) (color?)"
into:
"#(define-music-function (parser location color) (color?)"
or similarly, depending on the arguments.
If you have further problems or want some background reading in the
manuals, but can’t find it, don’t hesitate to come back :-)
HTH, Simon
\version "2.19.25"
overrideColor =
#(define-music-function (ctx color) (symbol? color?)
(make-sequential-music
(map (lambda (dsc)
(propertyOverride (list ctx (car dsc) 'color) color))
all-grob-descriptions)))
\score {
<<
\new Staff {
% try commenting the first note
c'4
\once\hide Staff.BarLine \bar "|" % workaround to issue 3949
\stopStaff
\overrideColor Staff #blue
\startStaff
c'4.
}
\new Staff <<
{
c'4
\once\hide Staff.BarLine \bar "|" % workaround to issue 3949
\stopStaff
\overrideColor Voice #blue
\override Staff.LedgerLineSpanner.color = #blue
\startStaff
c'4.
}
\\
{
a4
a4.
}
>>
>>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user