[Top][All Lists]

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

Change color after a line break

From: Marc Hohl
Subject: Change color after a line break
Date: Fri, 17 Jul 2015 18:59:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi list,

for strange reasons, I have to color complete lines in different colors.

I found which works
great for complete scores, but if I call \applyContext ...
after a line break, the color of the Staff lines does not change.
I tried \stopStaff/\startStaff with no visible difference.

How can I change the definition of override-color-for-all-grobs
to make the second staff line completely red?

Thanks in advance,


%% see also

#(define (override-color-for-all-grobs color)
  (lambda (context)
   (let loop ((x all-grob-descriptions))
    (if (not (null? x))
     (let ((grob-name (caar x)))
      (display grob-name)
      (ly:context-pushpop-property context grob-name 'color color)
      (loop (cdr x)))))))

\relative c' {
  \applyContext #(override-color-for-all-grobs (x11-color 'blue))
  c4\pp\< d e f
  \break \stopStaff
  \applyContext #(override-color-for-all-grobs (x11-color 'red))
  \grace { g16[( a g fis]) } g1\ff\!

reply via email to

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