]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/lsr/piano-template-with-centered-dynamics.ly
Merge branch 'master' into accepts
[lilypond.git] / input / lsr / piano-template-with-centered-dynamics.ly
index 2770aab1f02f9b04208d4b7e8a905ba5a87224b7..316cb4da94c03e387c0b6c664af47a185b7d438f 100644 (file)
@@ -1,13 +1,15 @@
 %% Do not edit this file; it is auto-generated from input/new
 %% This file is in the public domain.
-\version "2.11.38"
+\version "2.11.46"
 
 \header {
-  lsrtags = "expressive-marks,piano-music,template"
+  lsrtags = "expressive-marks,keyboards,template"
   texidoc = "
 Many piano scores have the dynamics centered between the two staves.
 This requires a bit of tweaking to implement, but since the template is
-right here, you don't have to do the tweaking yourself.
+right here, you don't have to do the tweaking yourself.  Note that
+the two piano staves will move closer together in any system that
+does not contain at least one dynamic marking.
 "
   doctitle = "Piano template with centered dynamics"
 } % begin verbatim
@@ -16,25 +18,24 @@ upper = \relative c'' {
   \clef treble
   \key c \major
   \time 4/4
-  
-  a b c d
+
+  a4 b c d
 }
 
 lower = \relative c {
   \clef bass
   \key c \major
   \time 4/4
-  
+
   a2 c
 }
 
 dynamics = {
-  s2\fff\> s4
-  s\!\pp
+  s2\fff\> s4 s\!\pp
 }
 
 pedal = {
-  s2\sustainDown s2\sustainUp
+  s2\sustainDown s\sustainUp
 }
 
 \score {
@@ -51,24 +52,25 @@ pedal = {
     \context {
       \type "Engraver_group"
       \name Dynamics
-      \alias Voice % So that \cresc works, for example.
+      % So that \cresc works, for example.
+      \alias Voice
       \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 {
@@ -78,20 +80,11 @@ pedal = {
   }
 }
 \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
-    }
+  \unfoldRepeats {
+    \new PianoStaff <<
+      \new Staff = "upper" << \upper \dynamics \pedal >>
+      \new Staff = "lower" << \lower \dynamics \pedal >>
+    >>
   }
+  \midi {}
 }