- if (m->is_mus_type ("note-event"))
- {
- note_events_.push_back (m);
-
- is_first_ = true;
- Moment musiclen = m->get_length ();
- Moment now = now_mom ();
-
- if (now_mom ().grace_part_)
- {
- musiclen.grace_part_ = musiclen.main_part_;
- musiclen.main_part_ = Rational (0, 1);
- }
- note_end_mom_ = max (note_end_mom_, (now + musiclen));
- do_nothing_until_ = Rational (0, 0);
-
- return true;
- }
- else if (m->is_mus_type ("busy-playing-event"))
- return note_events_.size () && is_first_;
+ note_events_.push_back (ev);
+
+ is_first_ = true;
+ Moment now = now_mom ();
+ Moment musiclen = get_event_length (ev, now);