Spacing of clef change

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Spacing of clef change

Evan Driscoll-3
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.

Thanks,
Evan


\relative c {
    \clef "bass"
    \repeat unfold 10 {
         g2. g4 |
    }

    \break
    %\once \override Staff.Clef #'X-extent = #'(-2 . 2)
    %\tweak Clef.X-extent #'(-2 . 2)
    \clef "tenor"
    \repeat unfold 7 {
         g8 g g2.
    }
}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Spacing of clef change

Aaron Hill
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 |
     }
     \break
     \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
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Spacing of clef change

Evan Driscoll-3
Perfect, thanks once again!
Evan

On Wed, Jun 26, 2019 at 11:54 PM Aaron Hill <[hidden email]> 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 |
     }
     \break
     \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
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Spacing of clef change

Trevor Bača-2
In reply to this post by Aaron Hill
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.

%%% INDEPENDENT LINE-BREAK OVERRIDES %%%

\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)
        (if
            (eq? LEFT (ly:item-break-dir grob))
            (set! (ly:grob-property grob 'color) red))
        (if
            (eq? RIGHT (ly:item-break-dir grob))
            (set! (ly:grob-property grob 'color) blue)))
    \break
    c'4 c'4 c'4 c'4
}

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


%%% END %%%

end-of-system-bar-lines.png


Trevor.


On Thu, Jun 27, 2019 at 12:54 AM Aaron Hill <[hidden email]> 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 |
     }
     \break
     \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
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


--