lilypond-user
[Top][All Lists]
Advanced

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

Re: `\afterGrace` and clef problem


From: Valentin Petzel
Subject: Re: `\afterGrace` and clef problem
Date: Mon, 13 Feb 2023 13:08:12 +0100

That is because you are using 1 instead of a note name such as c'1. after-
grace does not handle this mechanism.

You can see here that this does work, but it does produce less optimal 
spacing:

\relative c' {
  <<
    \new Staff { \afterGrace f1 { e16[ f] } | g1 }
    \new Staff { #(define afterGraceFraction (cons 15 16))
                 \afterGrace c1 \clef "bass" | c,1 }
  >>
}

Instead of manually extra-offsetting the Clefs you might also do something 
along the lines of

\relative c' {
  <<
    { \afterGrace f1 { e16[ f] } | g1 }
    { 1
      \once\override Staff.Clef.X-extent =
      #(lambda (grob)
         (let* ((stc (ly:grob-property grob 'stencil))
                (ext (ly:stencil-extent stc X)))
           ; Add default BarLine extra-space to Clef (1.0)
           (ly:grob-set-property! grob 'extra-offset (cons (- (1+ (cdr ext))) 
0))
           #f))
      \clef "bass" | c,1 }
  >>
}


Cheers,
Valentin

Am Montag, 13. Februar 2023, 09:12:26 CET schrieb Werner LEMBERG:
> This doesn't work at all: `\afterGrace` doesn't accept a clef, as the
> image shows.

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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