- now_heads_.push (inf);
- for (int i = heads_to_tie_.size (); i--;)
- {
- Music *right_mus = inf.event_;
-
- Audio_note *th = dynamic_cast<Audio_note *> (heads_to_tie_[i].elem_);
- Music *left_mus = heads_to_tie_[i].event_;
-
- if (right_mus && left_mus
+// message (_f ("acknowledge_audio_element, Size of now_heads_=%d", now_heads_.size ()));
+ Head_event_tuple inf_mom (inf, now_mom ());
+ if (an->tie_event_)
+ now_tied_heads_.push_back (inf_mom);
+ else
+ now_heads_.push_back (inf_mom);
+
+// message (_f ("acknowledge_audio_element, added, Size of now_heads_=%d", now_heads_.size ()));
+ // Find a previous note that ties to the current note. If it exists,
+ // remove it from the heads_to_tie vector and create the tie
+ deque<Head_event_tuple>::iterator it;
+ bool found = false;
+ Stream_event *right_mus = inf.event_;
+ for ( it = heads_to_tie_.begin() ; (!found) && (it < heads_to_tie_.end()); it++ )
+ {
+ Audio_element_info et = (*it).head_;
+ Audio_note *th = dynamic_cast<Audio_note *> (et.elem_);
+ Stream_event *left_mus = et.event_;
+
+ if (th && right_mus && left_mus