I have just started using LilyPond with version 2.4.3 on Cygwin. I modified
the "piano-dynamics.ly" file which I found at
http://lilypond.org/doc/v2.2/input/template/out-www/collated-files.html by
adding an extra measure of music with new dynamics. Specifically, the second
measure has a crescendo to ff with \setTextCresc. The text comes out, but it
and the spanner are not aligned with the other dynamic markings. The manual
says that the vertical position should be controlled by the
DynamicLineSpanner object. I added a \override state, but it had no affect.
Also, I tried to change the PedalSustainStyle to bracket; this also failed.
Can anyone explain what I've done wrong? My input file is attached.

Thank you,
Ted Stanion
% Generated by lilypond-book
% Options: [printfilename,texidoc,linewidth]

\layout {
    linewidth = 160 \mm
}
\renameinput "piano-dynamics.ly"
\version "2.4.0"
\header {
texidoc ="
  Dynamics on a separate line, neatly centered between staffs.
"
}

upper = \relative c'' {
  a b c d |
  a b c d
}

lower = \relative c {
  a2 c
  a2 c
}

dynamics =  {
  s2\fff\> s4
  s\!\pp |
  \setTextCresc
  s\< s2 s4\!\ff |
}

pedal =  {
  \set Staff.pedalSustainStyle = #'bracket
  s2\sustainDown s2\sustainUp
}

\score {
  \context PianoStaff <<
    \context Staff = "upper" \upper
    \context Dynamics = "dynamics" \dynamics
    \context Staff = "lower" <<
      \clef bass
      \lower
    >>
    \context Dynamics = "pedal" \pedal
  >>
  \layout {
    \context {
      \type "Engraver_group_engraver"
      \name Dynamics
      \alias Voice % So that \cresc works, for example.
      \consists "Output_property_engraver"
      
      minimumVerticalExtent = #'(-1 . 1)
      pedalSustainStrings = #'("Ped." "*Ped." "*")
      pedalUnaCordaStrings = #'("una corda" "" "tre corde")
      pedalSustainStyle = #'bracket
      
      \consists "Piano_pedal_engraver"
      \consists "Script_engraver"
      \consists "Dynamic_engraver"
      \consists "Text_engraver"

      \override TextScript #'font-size = #2
      \override TextScript #'font-shape = #'italic
      \override TextScript #'extra-offset = #'(0 . 2.5)
      \override DynamicText #'extra-offset = #'(0 . 2.5)
      \override Hairpin #'extra-offset = #'(0 . 2.5)
      \override DynamicLineSpanner #'extra-offset = #'(0 . 2.5)

      \consists "Skip_event_swallow_translator"

      \consists "Axis_group_engraver"
    }
    \context {
      \PianoStaff
      \accepts Dynamics
      \override VerticalAlignment #'forced-distance = #7
    }
  }
  \midi {
    \context {
      \type "Performer_group_performer"
      \name Dynamics
      \consists "Piano_pedal_performer"
      \consists "Span_dynamic_performer"
      \consists "Dynamic_performer"
    }
    \context {
      \PianoStaff
      \accepts Dynamics
    }
  }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to