- substitute_both (shared_.get_outlet (), null_.get_outlet ());
-
- kill_mmrest (two_.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 = (last_playing_ == SOLO2) ? null_.get_outlet () : shared_.get_outlet ();
+ Context *c2 = (last_playing_ == SOLO2) ? shared_.get_outlet () : null_.get_outlet ();
+ substitute_both (c1, c2);
+ kill_mmrest ((last_playing_ == SOLO2)
+ ? one_.get_outlet () : two_.get_outlet ());