X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fnew%2Fpiano-template-with-centered-dynamics.ly;fp=Documentation%2Fsnippets%2Fnew%2Fpiano-template-with-centered-dynamics.ly;h=70403a76fcc8c5994be607bd4f1f8ba059dbfb3e;hb=e90f0536f9be39ada0bef0aeb0d275dec3b2fb5b;hp=0000000000000000000000000000000000000000;hpb=a8c9e8a7ca320ab0df5fd32e717fd62cd7635ce6;p=lilypond.git diff --git a/Documentation/snippets/new/piano-template-with-centered-dynamics.ly b/Documentation/snippets/new/piano-template-with-centered-dynamics.ly new file mode 100644 index 0000000000..70403a76fc --- /dev/null +++ b/Documentation/snippets/new/piano-template-with-centered-dynamics.ly @@ -0,0 +1,53 @@ +\version "2.14.0" + +\header { + lsrtags = "expressive-marks, keyboards, template" + texidoc = " +Many piano scores have the dynamics centered between the two staves. +The @code{Dynamics} context, if placed between staves, will +automatically position dynamics correctly. + +" + doctitle = "Piano template with centered dynamics" +} + +global = { + \key c \major + \time 4/4 +} + +upper = \relative c'' { + \clef treble + a4 b c d +} + +lower = \relative c { + \clef bass + a2 c +} + +dynamics = { + s2\fff\> s4 s\!\pp +} + +pedal = { + s2\sustainOn s\sustainOff +} + +\score { + \new PianoStaff = "PianoStaff_pf" << + \new Staff = "Staff_pfUpper" << \global \upper >> + \new Dynamics = "Dynamics_pf" \dynamics + \new Staff = "Staff_pfLower" << \global \lower >> + \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 { } +}