Hi Peter,

On Thu, Apr 3, 2014 at 11:26 AM, Peter Toye <lilyp...@ptoye.com> wrote:

>  I want to get rid of the brace on the first line of a piano score, but
> keep it for the rest of the score.
>
> I tried the snippet below, but this gets rid of it for all the lines, in
> spite of the \once command. If I uncomment the lines in each staff and
> comment in the command in the PianoStaff I get the same effect.
>
> Is there any way I can do this?
>

Try the attached file, which uses a function based on the one found in

http://www.lilypond.org/doc/v2.16/Documentation/extending/difficult-tweaks

Hope this helps.

--David

(P.S. This should be a case where \alterBroken would work, though not
without some ugliness.  The following expression removes the stencil on the
second line as expected, though the stencil is positioned further from the
staff:

.\alterBroken stencil

  #`(#f ,(lambda (grob) (ly:system-start-delimiter::print grob)))

  Score.SystemStartBrace


Drat.  Will have to investigate.  Any ideas from the larger list?)
\version "2.16.2"

global = {
  \key c \major
  \time 4/4
}
\language "english"
\layout {
  indent=9.5\cm
}

right = \relative c'' {
  \global
  \once \override Staff.Clef #'stencil = ##f
  \once \override Staff.TimeSignature #'stencil = ##f
  %  \once \override Score.SystemStartBrace #'stencil = ##f
  c1 c1 c1 \break c1 c1
}

left = \relative c' {
  \global
  \once \override Staff.Clef #'stencil = ##f
  \once \override Staff.TimeSignature #'stencil = ##f
  
  c1 c1 c1 c1 c1
}

\score {
  
  \new PianoStaff 
  <<
    \override Score.SystemStartBrace #'stencil =
    #(lambda (grob)
       (let* ((orig (ly:grob-original grob))
              (siblings (if (ly:grob? orig)
                            (ly:spanner-broken-into orig)
                            '())))
         (if (and (>= (length siblings) 2)
                  (eq? (car siblings) grob))
             #f
             (ly:system-start-delimiter::print grob))))
       
    \new Staff = "right" \right
    \new Staff = "left" { \clef bass \left }
  >>
}

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to