[Top][All Lists]

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

Re: How to reset a SystemStartBracket-override?

From: David Nalesnik
Subject: Re: How to reset a SystemStartBracket-override?
Date: Mon, 19 Sep 2011 19:15:18 -0500

On Mon, Sep 19, 2011 at 6:06 PM, harm6 <address@hidden> wrote:

harm6 wrote:
> Hi,
> in the (simplified) example below I can't revert the \override of the
> SystemStartBracket, although I set \once and tried with \revert.
> I want the \override to be printed only at the first time occuring in the
> score.

Hi Harm,

It seems that you have to treat SystemStartBracket as a broken spanner in this case..

This works:

 \version "2.14.2"

#(define (my-callback grob)
   (let* ((orig (ly:grob-original grob))
          (siblings (if (ly:grob? orig)
                        (ly:spanner-broken-into orig)
     (if (eq? (car siblings) grob) ;; (cadr siblings) will make second-line bracket red, etc.
         (ly:grob-set-property! grob 'color red))))

c' {
 \once\override StaffGroup.SystemStartBracket #'color = #my-callback
 a1 \break
 a \break

two = \relative c' {
 c c c

\new StaffGroup <<
 \new Staff \one
 \new Staff \two

reply via email to

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