[Top][All Lists]

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

Re: Spacing of clef change

From: Trevor Bača
Subject: Re: Spacing of clef change
Date: Sun, 1 Dec 2019 17:04:24 -0500

Hi Aaron,

Wow, that technique for overriding end-of-system / begin-of-system grobs *independently of one another* fills in an extremely important LilyPond gap for me.

I've modified your example for the archives; everyone should know this technique.


\version "2.19.83"

\new Staff
    \omit Score.BarNumber
    \omit Staff.Clef
    \omit Staff.TimeSignature
    c'4 c'4 c'4 c'4
    \bar ":..:"
    \once \override Staff.BarLine.color = #(lambda (grob)
            (eq? LEFT (ly:item-break-dir grob))
            (set! (ly:grob-property grob 'color) red))
            (eq? RIGHT (ly:item-break-dir grob))
            (set! (ly:grob-property grob 'color) blue)))
    c'4 c'4 c'4 c'4

\layout {
    indent = #0
    ragged-right = ##t

%%% END %%%



On Thu, Jun 27, 2019 at 12:54 AM Aaron Hill <address@hidden> wrote:
On 2019-06-26 9:27 pm, Evan Driscoll wrote:
> I've got the example document below. There's a bit too little space for
> me
> between the last note in the last measure of the first line and the new
> clef.
> I found a mailing list entry that showed how to put some extra space
> before
> the clef (the commented-out override) and that looks great -- except
> that
> it also moves the clef at the start of the next system. I tried a
> \tweak
> version, but my attempt has no effect at all.

Here's one way to do it:

\version "2.19.82"

\relative c {
     \clef "bass"
     \repeat unfold 10 {
          g2. g4 |
     \once \override Staff.Clef.before-line-breaking = #(lambda (grob)
       (and (eq? LEFT (ly:item-break-dir grob))
         (set! (ly:grob-property grob 'X-extent) '(-2 . 2))))
     \clef "tenor"
     \repeat unfold 7 {
          g8 g g2.

-- Aaron Hill

lilypond-user mailing list


reply via email to

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