]> git.donarmstrong.com Git - lilypond.git/commitdiff
Part-combine: The two separate voices also need proper settings for MultiMeasureRest...
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 26 Sep 2010 18:39:33 +0000 (20:39 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 28 Sep 2010 16:16:15 +0000 (18:16 +0200)
input/regression/part-combine-force-mmrest-position.ly [new file with mode: 0644]
lily/part-combine-iterator.cc

diff --git a/input/regression/part-combine-force-mmrest-position.ly b/input/regression/part-combine-force-mmrest-position.ly
new file mode 100644 (file)
index 0000000..94ea88f
--- /dev/null
@@ -0,0 +1,26 @@
+
+\header {
+  texidoc ="If the part-combiner shows two separate voices, multi-measure rests
+  are supposed to use the same settings as @code{\voiceOnce} and @code{\voiceTwo}.
+"
+}
+
+\layout { ragged-right = ##t }
+
+\version "2.13.35"
+
+mI = \relative c'' {
+  \partcombineApart
+  c2 c |
+  R1 |
+  c1
+}
+mII = \relative c' {
+  R1 |
+  c2 c |
+  c1
+}
+
+\score {
+  \new Staff \partcombine \mI \mII
+}
index 2fb5149e9a4587b1c2320200cf7fb27315b929ef..f2e0a34e931df3229e67c3bf28af82ead5133a74 100644 (file)
@@ -367,6 +367,10 @@ Part_combine_iterator::construct_children ()
   set_context (two);
   second_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_cadr (lst))));
 
+
+  /* Mimic all settings of voiceOne/voiceTwo for the two separate voices...*/
+  /* FIXME: Is there any way to use the definition of \voiceOne/\voiceTwo
+            directly??? */
   char const *syms[]
     = {
     "Stem",
@@ -389,6 +393,17 @@ Part_combine_iterator::construct_children ()
       execute_pushpop_property (two, sym,
                                ly_symbol2scm ("direction"), scm_from_int (-1));
     }
+   /* Handle horizontal shifts for crossing notes */
+  execute_pushpop_property (one, ly_symbol2scm ("NoteColumn"),
+                                ly_symbol2scm ("horizontal-shift"), scm_from_int (0));
+  execute_pushpop_property (two, ly_symbol2scm ("NoteColumn"),
+                                ly_symbol2scm ("horizontal-shift"), scm_from_int (1));
+   /* Also handle MultiMeasureRest positions for voice 1/2 */
+  execute_pushpop_property (one, ly_symbol2scm ("MultiMeasureRest"),
+                                ly_symbol2scm ("staff-position"), scm_from_int (4));
+  execute_pushpop_property (two, ly_symbol2scm ("MultiMeasureRest"),
+                                ly_symbol2scm ("staff-position"), scm_from_int (-4));
+
 }
 
 IMPLEMENT_LISTENER (Part_combine_iterator, set_busy);