lilypond-user
[Top][All Lists]
Advanced

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

Pedal gradual release


From: Andrew Bernard
Subject: Pedal gradual release
Date: Sun, 20 Jan 2019 22:04:01 +1100

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
    }
  }
}

 

%======

 


reply via email to

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