Piano template with centered dynamics: Difference between revisions

Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Many piano scores have the dynamics centered between the two staves. This snippet demonstrates how this was achieved with older versions of LilyPond; the Dynamics context is now included by default (starting with LilyPond 2.13.29), and does not require to be defined manually.
Many piano scores have the dynamics centered between the two staves. Using the <code>Dynamics</code> context this is quite easy to achieve.
 
<lilypond version="2.24.0">
%% http://lsr.di.unimi.it/LSR/Item?id=357


<lilypond version="2.24">
global = {
global = {
   \key c \major
   \key c \major
Line 27: Line 25:
}
}


\score {
\new PianoStaff = "PianoStaff_pf" <<
  \new PianoStaff = "PianoStaff_pf" <<
  \new Staff = "right" << \global \upper >>
    \new Staff = "Staff_pfUpper" << \global \upper >>
  \new Dynamics = "dynamics" \dynamics
    \new Dynamics = "Dynamics_pf" \dynamics
  \new Staff = "left" << \global \lower >>
    \new Staff = "Staff_pfLower" << \global \lower >>
  \new Dynamics = "pedal" \pedal
    \new Dynamics = "pedal" \pedal
>>
  >>
  \layout { }
}
 
\score {
  \new PianoStaff = "PianoStaff_pf" <<
    \new Staff = "Staff_pfUpper" << \global \upper \dynamics \pedal >>
    \new Staff = "Staff_pfLower" << \global \lower \dynamics \pedal >>
  >>
  \midi { }
}
</lilypond>
</lilypond>


[[Category:Expressive marks]]
[[Category:Keyboards]]
[[Category:Really simple]]
[[Category:Template]]
[[Category:Template]]
[[Category:Keyboards]]
[[Category:Snippet]]
[[Category:Expressive marks]]
[[Category:Workaround]]