- if (playing_state_ != SOLO1)
- {
- if (!solo_one_event_)
- {
- solo_one_event_ = new Stream_event (ly_symbol2scm ("solo-one-event"));
- solo_one_event_->unprotect ();
- }
-
- first_iter_->get_outlet ()->event_source ()->broadcast (solo_one_event_);
- }
- playing_state_ = SOLO1;
+ 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;