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: Jean Abou Samra
Subject: Re: sustain pedal display ugliness, how to fix?
Date: Fri, 1 Apr 2022 10:31:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0



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]