lilypond-user
[Top][All Lists]
Advanced

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

Re: Pedal markings at the end of a piece of music


From: Neil Puttock
Subject: Re: Pedal markings at the end of a piece of music
Date: Sat, 3 Apr 2010 23:29:58 +0100

On 1 April 2010 18:01, Andrew Hawryluk <address@hidden> wrote:
> This looks like a bug to me. My minimal example:
>
> \version "2.13.16"
> {
>  \set Staff.pedalSustainStyle = #'text
>  c''1\sustainOn
> }
>
> If the pedalSustainStyle is set to #'mixed or #'bracket then the
> bracket indicates the sustain up at the end of the piece. With #'text
> style there is no sustain up mark.

Here's a possible workaround while you're waiting for this to be fixed:

\relative c {
  \set Staff.pedalSustainStyle = #'mixed
  \override Staff.PianoPedalBracket #'stencil =
  #(lambda (grob)
     (let* (;; the bracket stencil
            (bracket (ly:piano-pedal-bracket::print grob))
            ;; its horizontal extent
            (bracket-ext (ly:stencil-extent bracket X))
            ;; a pedal asterisk, aligned on its right edge
            (asterisk (grob-interpret-markup grob (markup
#:right-align #:musicglyph "pedal.*")))
            ;; the vertical parent of this bracket (a PianoPedalLineSpanner)
            (pedal-span (ly:grob-parent grob Y))
            ;; the right NonMusicalPaperColumn of the line spanner
            (right-column (ly:spanner-bound pedal-span RIGHT))
            ;; the column's length relative to the system (effectively
the width of the barline)
            (col-length (interval-length (ly:grob-extent right-column
(ly:grob-system grob) X))))

       ;; return an asterisk moved the same distance as a bracket,
minus the width of the barline
       (ly:stencil-translate-axis asterisk (- (cdr bracket-ext) col-length) X)))

  \time 6/8
  \clef bass
  <a e' a>2.\fermata\sustainOn
  \bar "|."
}

Cheers,
Neil




reply via email to

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