Hi,

Am 19.09.21 um 21:31 schrieb Knute Snortum:
SustainOff after a chord comes before the chord, as it shows in the
manual

I'm used to and would like it to be after the chord.
Is there a way to do that?
You could do it with a tweak, but you'd have to do once for each \sustainOff.

%%%
\version "2.22.1"

\relative {
   c'1 \sustainOn | c \tweak X-offset 2 \sustainOff
}
%%%

LilyPond is even flexible enough to accept

sustainOff = \tweak X-offset 2 \sustainOff

to make the tweak stick.

But I think it's usually better to represent the music semantically correct: A \sustainOff after the note means that the pedal should be released only _after_ the chord is played. For this, David Kastrup's \after function is highly useful:

%%%
\version "2.22.1"

after =
#(define-music-function (delay ev main) (ly:duration? ly:music? ly:music?)
   #{ \context Bottom << { s$delay <> $ev } #main >> #})

\relative {
  % For vertical alignment:
  \override Score.SustainPedal.Y-offset = -3

  c'1 \sustainOn | \after 2 \sustainOff c
}
%%%

Lukas


Reply via email to