I use a wedge type symbol to indicate gradual release of a piano pedal.
Since this is not built in to lilypond, I developed code like the following
to do the job, using PostScript. I don't mind using PostScript as I am
fluent in it, but objectively, this is terribly special case code. Is there
anybody willing to generalise this and make it more user friendly for other
people who don't necessarily want to fiddle with PostScript and Reverse
Polish Notation when we are just trying to write piano music.

 

[I know the code is dreadful and woefully inelegant, but it does the job!]

 

Any assistance most appreciated.

 

Andrew

 

 

%======

 

\version "2.19.82"

treble = {
  \clef treble
  \time 4/4
  \repeat unfold 12 { c'' }
  \bar "|."
}

bass = {
  \clef bass
  \time 4/4
  \repeat unfold 12 { c }
}

sustainPedal = {
  s4\sustainOn
  ^\markup {
    \postscript #"0.15 setlinewidth [0.3] 0 setdash 0 setlinecap
        6 -1.3 moveto 10.2 0.15 2 div add 2 rlineto currentpoint stroke
        moveto 0.15 setlinewidth [] 0 setdash 0 -2.2 rlineto stroke"
  }
  s s s s s\sustainOff
}


\markup { "Pedal gradual release example" }

\score {
  \new PianoStaff
  <<
    \new Staff { \treble }
    \new Staff { \bass }
    \new Dynamics { \sustainPedal }
  >>

  \layout {
    \context {
      \Dynamics
      pedalSustainStyle = #'bracket
    }
  }
}



 

%======

 

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to