From: Reinhold Kainhofer Date: Sun, 26 Sep 2010 18:39:33 +0000 (+0200) Subject: Part-combine: The two separate voices also need proper settings for MultiMeasureRest... X-Git-Tag: release/2.13.35-1~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b5603acc6faf05c541353bf2154d73986e2bee0b;p=lilypond.git Part-combine: The two separate voices also need proper settings for MultiMeasureRest and horizontal-shift --- diff --git a/input/regression/part-combine-force-mmrest-position.ly b/input/regression/part-combine-force-mmrest-position.ly new file mode 100644 index 0000000000..94ea88f09e --- /dev/null +++ b/input/regression/part-combine-force-mmrest-position.ly @@ -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 +} diff --git a/lily/part-combine-iterator.cc b/lily/part-combine-iterator.cc index 2fb5149e9a..f2e0a34e93 100644 --- a/lily/part-combine-iterator.cc +++ b/lily/part-combine-iterator.cc @@ -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);