- handles_[in].get_context ()->event_source ()->broadcast (mmrest_event_);
-}
-
-void
-Part_combine_iterator::unisono (bool silent, int newpart)
-{
- Status newstate = (silent) ? UNISILENCE : UNISONO;
-
- if ((newstate == state_) and (newpart == chosen_part_))
- return;
- else
- {
- Outlet_type c1 = (newpart == 2) ? CONTEXT_NULL : CONTEXT_SHARED;
- Outlet_type c2 = (newpart == 2) ? CONTEXT_SHARED : CONTEXT_NULL;
- substitute_both (c1, c2);
- kill_mmrest ((newpart == 2) ? CONTEXT_ONE : CONTEXT_TWO);
- kill_mmrest (CONTEXT_SHARED);
-
- if (playing_state_ != PLAYING_UNISONO
- && newstate == UNISONO)
- {
- if (!unisono_event_)
- {
- unisono_event_ = new Stream_event
- (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
- ly_symbol2scm ("unisono-event")));
- unisono_event_->unprotect ();
- }
-
- Context *out = (newpart == 2 ? second_iter_ : first_iter_)
- ->get_outlet ();
- out->event_source ()->broadcast (unisono_event_);
- playing_state_ = PLAYING_UNISONO;
- }
- state_ = newstate;
- chosen_part_ = newpart;
- }
-}
-
-void
-Part_combine_iterator::solo1 ()
-{
- if ((state_ == SOLO) && (chosen_part_ == 1))
- return;
- else
- {
- state_ = SOLO;
- chosen_part_ = 1;
- substitute_both (CONTEXT_SOLO, CONTEXT_NULL);
-
- kill_mmrest (CONTEXT_TWO);
- kill_mmrest (CONTEXT_SHARED);
-
- if (playing_state_ != PLAYING_SOLO1)
- {
- if (!solo_one_event_)
- {
- solo_one_event_ = new Stream_event
- (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
- ly_symbol2scm ("solo-one-event")));
- solo_one_event_->unprotect ();
- }
-
- first_iter_->get_outlet ()->event_source ()->broadcast (solo_one_event_);
- }
- playing_state_ = PLAYING_SOLO1;
- }
-}
-
-void
-Part_combine_iterator::solo2 ()
-{
- if ((state_ == SOLO) and (chosen_part_ == 2))
- return;
- else
- {
- state_ = SOLO;
- chosen_part_ = 2;
- substitute_both (CONTEXT_NULL, CONTEXT_SOLO);
-
- if (playing_state_ != PLAYING_SOLO2)
- {
- if (!solo_two_event_)
- {
- solo_two_event_ = new Stream_event
- (scm_call_1 (ly_lily_module_constant ("ly:make-event-class"),
- ly_symbol2scm ("solo-two-event")));
- solo_two_event_->unprotect ();
- }
-
- second_iter_->get_outlet ()->event_source ()->broadcast (solo_two_event_);
- playing_state_ = PLAYING_SOLO2;
- }
- }
-}
-
-void
-Part_combine_iterator::chords_together ()
-{
- if (state_ == TOGETHER)
- return;
- else
- {
- playing_state_ = PLAYING_OTHER;
- state_ = TOGETHER;
-
- substitute_both (CONTEXT_SHARED, CONTEXT_SHARED);
- }
-}
-
-void
-Part_combine_iterator::apart (bool silent)
-{
- if (!silent)
- playing_state_ = PLAYING_OTHER;
-
- if (state_ == APART)
- return;
- else
- {
- state_ = APART;
- substitute_both (CONTEXT_ONE, CONTEXT_TWO);
- }