- musiclen.grace_part_ = musiclen.main_part_;
- musiclen.main_part_ = Rational (0, 1);
+ 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;