lilypond-user
[Top][All Lists]
Advanced

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

Re: sustain pedal display ugliness, how to fix?


From: Kenneth Wolcott
Subject: Re: sustain pedal display ugliness, how to fix?
Date: Sat, 2 Apr 2022 08:50:17 -0700

Hi Jean;

  I implemented your suggestion.

  Can you provide a little more info regarding the padding amount, how
much larger than 0.5 can I increase it; is that in mm?

Thanks,
Ken

On Fri, Apr 1, 2022 at 1:31 AM Jean Abou Samra <jean@abou-samra.fr> wrote:
>
>
>
> 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



reply via email to

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