]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/examples.itely
Compile fix for real this time.
[lilypond.git] / Documentation / user / examples.itely
index 095d5d5c86d0bd2e4a216cfbeda8247883c19507..b1226f529968af86c16cacaa7327566c7ec0ad6d 100644 (file)
@@ -411,13 +411,18 @@ pedal = {
       \override VerticalAlignment #'forced-distance = #7
     }
   }
+}
+\score {
+  \context PianoStaff <<
+    \context Staff=upper << \upper \dynamics >>
+    \context Staff=lower << \lower \dynamics >>
+    \context Dynamics=pedal \pedal
+  >>
   \midi {
     \context {
       \type "Performer_group_performer"
       \name Dynamics
       \consists "Piano_pedal_performer"
-      \consists "Span_dynamic_performer"
-      \consists "Dynamic_performer"
     }
     \context {
       \PianoStaff
@@ -670,6 +675,102 @@ bassWords = \lyricmode {
 @end lilypond
 
 
+@subsection SATB vocal score and automatic piano reduction
+
+This template adds an automatic piano reduction to the SATB vocal
+score.  This demonstrates one of the strengths of LilyPond -- you
+can use a music definition more than once.  If you make any changes
+to the vocal notes (say, tenorMusic), then the changes will also
+apply to the piano reduction.
+
+@lilypond[quote,verbatim,raggedright]
+\version "2.4.0"
+global = {
+   \key c \major
+   \time 4/4
+}
+
+sopMusic = \relative c'' {
+   c4 c c8[( b)] c4
+}
+sopWords = \lyricmode {
+   hi hi hi hi
+}
+
+altoMusic = \relative c' {
+   e4 f d e
+}
+altoWords =\lyricmode {
+   ha ha ha ha
+}
+
+tenorMusic = \relative c' {
+   g4 a f g
+}
+tenorWords = \lyricmode {
+   hu hu hu hu
+}
+bassMusic = \relative c {
+   c4 c g c
+}
+bassWords = \lyricmode {
+   ho ho ho ho
+}
+
+\layout {
+  \context {
+         % a little smaller so lyrics
+         % can be closer to the staff
+         \Staff
+          minimumVerticalExtent = #'(-3 . 3)
+  }
+}
+
+<<
+  \context ChoirStaff
+  <<
+    \context Lyrics = sopranos { s1 }
+    \context Staff = women <<
+      \context Voice =
+        sopranos { \voiceOne << \global \sopMusic >> }
+      \context Voice =
+        altos { \voiceTwo << \global \altoMusic >> }
+    >>
+    \context Lyrics = altos { s1 }
+    \context Lyrics = tenors { s1 }
+    \context Staff = men <<
+      \clef bass
+      \context Voice =
+        tenors { \voiceOne <<\global \tenorMusic >> }
+      \context Voice =
+        basses { \voiceTwo <<\global \bassMusic >> }
+    >>
+    \context Lyrics = basses { s1 }
+    \context Lyrics = sopranos \lyricsto sopranos \sopWords
+    \context Lyrics = altos \lyricsto altos \altoWords
+    \context Lyrics = tenors \lyricsto tenors \tenorWords
+    \context Lyrics = basses \lyricsto basses \bassWords
+  >>
+  \new PianoStaff
+  <<
+    \new Staff <<
+      \set Staff.printPartCombineTexts = ##f
+      \partcombine
+      << \global \sopMusic >>
+      << \global \altoMusic >>
+    >>
+    \new Staff <<
+      \clef bass
+      \set Staff.printPartCombineTexts = ##f
+      \partcombine
+      << \global \tenorMusic >>
+      << \global \bassMusic >>
+    >>
+  >>
+>>
+@end lilypond
+
+
 @c bad node name to avoid node name confict
 @node Ancient notation templates
 @section Ancient notation templates
@@ -688,8 +789,11 @@ staves rather than on the staves.
 \version "2.4.0"
 
 global = {
+  \set Score.skipBars = ##t
+
   % incipit
   \once \override Score.SystemStartBracket #'transparent = ##t
+  \override Score.SpacingSpanner #'spacing-increment = #1.0 % tight spacing
   \key f \major
   \time 2/2
   \once \override Staff.TimeSignature #'style = #'neomensural
@@ -705,6 +809,7 @@ global = {
   \bar ""
 
   % main
+  \revert Score.SpacingSpanner #'spacing-increment % CHECK: no effect?
   \cadenzaOff % turn bar lines on again
   \once \override Staff.Clef #'full-size-change = ##t
   \set Staff.forceClef = ##t
@@ -720,13 +825,7 @@ global = {
   \set Staff.printKeyCancellation = ##t
   \set Staff.forceClef = ##f
 
-  \skip 1*5
-
-  % last bar contains a brevis (i.e., spans 2 bars);
-  % therefore do not draw this particular bar
-  \cadenzaOn
-  \skip 1*2
-  \cadenzaOff
+  \skip 1*7 % the actual music
 
   % let finis bar go through all staves
   \override Staff.BarLine #'transparent = ##f
@@ -1200,6 +1299,7 @@ violin concerto as TchaikovskyPI, whereas perhaps you wish to print
   composer = "Composer (xxxx-yyyy)"
   opus = "Opus 0"
   piece = "Piece I"
+  meter = "meter"
   instrument = "Instrument"
   arranger = "Arranger"
   poet = "Poet"