]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/part-combine.ly
release: 1.3.147
[lilypond.git] / input / test / part-combine.ly
index 074498488ee796903089430d760f4cdd13a004c1..98ab7f1221bb7fe92fb66ae422735cb7b741f5bf 100644 (file)
@@ -1,22 +1,39 @@
-\score{
-       \context Staff = first <
-               \context Voice=first { \skip 1; }
-               \context Voice=second { \skip 1; }
+\version "1.3.146"
 
-               \context Voice=first \partcombine Voice
-                       \context Thread=first \notes\relative c''
-                               {
-                                       c4 d e f
-                                       b,4 d c d
-                                       r2 e4 f
-                                       c4 d e f
-                               }
-                       \context Thread=second \notes\relative c''
-                               {
-                                       a b c d
-                                       r2 c4 d
-                                       a c c d
-                                       a4. b8 c4 d
-                               }
-               >
+\header{
+texidoc="
+In orchestral scores and hymns, voices are traditionally combined onto
+one staff.  LilyPond has a part combiner, that combines or separates two
+voices according to actual rhythm and pitch.  User-defined texts such as
+``solo'' and ``@`a2'' are typeset automagically, as appropriate.
+"
 }
+
+\score{
+  \context Staff = flauti <
+    \time 4/4
+    \context Voice=one \partcombine Voice
+    \context Thread=one \notes\relative c'' {
+      c4 d e f | b,4 d c d | r2 e4 f | c4 d e f |
+      c4 r e f | c4 r e f | c4 r a r | a a r a |
+      a2 \property Voice.soloADue = ##f a |
+    }
+    \context Thread=two \notes\relative c'' {
+      g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d
+      c r e r | r2 s2 | a,4 r a r | a r r a |
+      a2 \property Voice.soloADue = ##f a |
+    }
+  >
+  \paper{
+    linewidth = 80 * \staffspace
+    \translator{
+      \ThreadContext
+      \consists Rest_engraver
+    }
+    \translator{
+      \VoiceContext
+      \remove Rest_engraver
+    }
+  }
+}
+