I noticed that sustain information was not getting generated in the
midi file output when using the Piano Centered Dynamics template
located on the lilypond website.  I've tried the same template with
2.10.33 as well as 2.11.45.

This is the current template for the piano centered dynamics:

     upper = \relative c'' {
       \clef treble
       \key c \major
       \time 4/4

       a b c d
     }

     lower = \relative c {
       \clef bass
       \key c \major
       \time 4/4

       a2 c
     }

     dynamics = {
       s2\fff\> s4
       s\!\pp
     }

     pedal = {
       s2\sustainDown s2\sustainUp
     }

     \score {
       \new PianoStaff <<
         \new Staff = "upper" \upper
         \new Dynamics = "dynamics" \dynamics
         \new Staff = "lower" <<
           \clef bass
           \lower
         >>
         \new Dynamics = "pedal" \pedal
       >>
       \layout {
         \context {
           \type "Engraver_group"
           \name Dynamics
           \alias Voice % So that \cresc works, for example.
           \consists "Output_property_engraver"

           \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
           \override DynamicLineSpanner #'Y-offset = #0
           pedalSustainStrings = #'("Ped." "*Ped." "*")
           pedalUnaCordaStrings = #'("una corda" "" "tre corde")

           \consists "Piano_pedal_engraver"
           \consists "Script_engraver"
           \consists "Dynamic_engraver"
           \consists "Text_engraver"

           \override TextScript #'font-size = #2
           \override TextScript #'font-shape = #'italic

           \consists "Skip_event_swallow_translator"

           \consists "Axis_group_engraver"
         }
         \context {
           \PianoStaff
           \accepts Dynamics
         }
       }
     }
     \score {
       \new PianoStaff <<
         \new Staff = "upper" << \upper \dynamics >>
         \new Staff = "lower" << \lower \dynamics >>
         \new Dynamics = "pedal" \pedal
       >>
       \midi {
         \context {
           \type "Performer_group"
           \name Dynamics
           \consists "Piano_pedal_performer"
         }
         \context {
           \PianoStaff
           \accepts Dynamics
         }
       }
     }


To get pedals to appear as events in the midi file I had to change two
lines in the midi score section from:

         \new Staff = "upper" << \upper \dynamics >>
         \new Staff = "lower" << \lower \dynamics >>
to
         \new Staff = "upper" << \upper \dynamics \pedal >>
         \new Staff = "lower" << \lower \dynamics \pedal >>

as well as keep all the other stuff regarding the pedal (well, I've
not messed around since I get pedal events now).

I was just curious if this had worked previously or if simply nobody
noticed it wasn't working. :)

- Anthony


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

Reply via email to