+2004-09-11 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * input/regression/part-combine-mmrest-after-solo.ly (Module): new
+ file.
+
+ * lily/part-combine-iterator.cc (unisono): bugfix for the case
+ that voice-2 plays solo, and voice-1 has an mmrest that starts
+ earlier. In that case, we switch to voice-2, so we catch the
+ mmrest of voice-2. This fixes: partcombine-rest.ly.
+
2004-09-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
* scm/define-grob-properties.scm (all-internal-grob-properties):
--- /dev/null
+
+\header { texidoc = " Multimeasure rests are printed after solos, both
+ for solo1 and for solo2." }
+\version "2.3.15"
+
+\paper { raggedright = ##t }
+ \new Staff
+ \partcombine
+ \relative c''{ R1*2 | c4 r2. | c2 r | R1 }
+ \relative c' { c2 r | R1 | c4 r2. | R1*2 }
void
Part_combine_iterator::substitute_both (Context * to1,
- Context * to2)
+ Context * to2)
{
Context *tos[] = {to1,to2};
Music_iterator *mis[] = {first_iter_, second_iter_};
return;
else
{
- substitute_both (shared_.get_outlet (), null_.get_outlet ());
+ /*
+ If we're coming from SOLO2 state, we might have kill mmrests
+ in the 1st voice, so in that case, we use the second voice
+ as a basis for events.
+ */
+ Context *c1 = (state_ == SOLO2) ? null_.get_outlet() : shared_.get_outlet();
+ Context *c2 = (state_ == SOLO2) ? shared_.get_outlet() : null_.get_outlet();
+
+ substitute_both (c1, c2);
- kill_mmrest (two_.get_outlet ());
+
+ kill_mmrest ((state_ == SOLO2)
+ ? one_.get_outlet () : two_.get_outlet ());
kill_mmrest (shared_.get_outlet ());
if (playing_state_ != UNISONO
if (!event)
event = make_music_by_name (ly_symbol2scm ("UnisonoEvent"));
- first_iter_-> try_music_in_children (event);
+ (state_ == SOLO2 ? second_iter_ : first_iter_)
+ ->try_music_in_children (event);
playing_state_ = UNISONO;
}
state_ = newstate;