Le 01/04/2022 à 02:31, Kenneth Wolcott a écrit :
Hi;
I'm engraving from an existing Piano arrangement of the "Ave Maria"
composed by Schubert.
The typesetter uses the traditional sustain pedal style.
The <c, c>2 chord is repeated with sustain on and off.
The ugliness in my engraving is two-fold:
First, the sustainOff end ('*') the following SustainOn are jammed together.
The second problem I can easily fix by making certain that there is
a sustainOff prior to the forced line break. (No, I don't get that
either)
Since this is repeated for the entire piece, I'd really like to
place this in a variable.
Just not sure how to do that.
How is it that what is shown in the Notation Reference looks just
fine and it looks ugly when I try it?
Thanks,
Ken Wolcott
%%%%%%%%%%%%
<c, c>2\sustainOn q\sustainOff\sustainOn | % m1
<c, c>2\sustainOff\sustainOn q\sustainOff\sustainOn | % m2
\break
<c, c>2\sustainOff\sustainOn q\sustainOff\sustainOn | % m3
<c, c>2\sustainOff\sustainOn q\sustainOff\sustainOn | % m4
\break
%%%%%%%%%%%%
Well, LilyPond's way of doing pedals is a bit ugly. You could try
something like
\version "2.22.2"
\layout {
\context {
\Staff
\override SustainPedal.stencil =
#(lambda (grob)
(let ((text (ly:grob-property grob 'text)))
(if (equal? text "*Ped.")
(let ((font (ly:grob-default-font grob)))
(ly:stencil-combine-at-edge
(ly:font-get-glyph font "pedal.*")
X
RIGHT
(ly:font-get-glyph font "pedal.Ped")
;; padding value
0.5))
(ly:sustain-pedal::print grob))))
}
}
sustainOff = \tweak non-musical ##t \sustainOff
{
c'1\sustainOn c'1\sustainOff\sustainOn c'1\sustainOff\sustainOn
\break c'1\sustainOff
}
Jean