Ted Stanion wrote:

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


First problem: Use the manual for version 2.4, since that's the version you use.
There, the templates have moved into the a chapter of the manual.


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.

I don't like the current solution in the template using lots of extra-offset settings.
It should be possible to find a cleaner solution.
Anyway, you should get better alignment if you add the following line to
the definition of the Dynamics context:
\override DynamicTextSpanner #'extra-offset = #'(0 . 2.5)


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.


This one beats me for the moment. However, I don't really see the point to typeset the pedal marks in a separate Dynamics context. Why not simply typeset them within the left hand Staff context:

\score {
 \context PianoStaff <<
   \context Staff = "upper" \upper
   \context Dynamics = "dynamics" \dynamics
   \context Staff = "lower" <<
     \clef bass
     \lower \pedal
   >>
 >>
 \layout{
 ...
 }
}

  /Mats


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



-- ============================================= Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe =============================================


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

Reply via email to