- int i = 0;
- while (i < current_grobs_.size ())
- {
- Moment stop;
- stop.set_infinite (1);
-
- if (gh_pair_p (busy))
- {
- SCM h = gh_car (busy);
- stop = *unsmob_moment (gh_car (h));
- }
-
- Moment current_stop = current_grobs_[i].end_;
- if (current_stop <= stop)
- {
- SCM new_entry = gh_cons (current_stop.smobbed_copy(),
- current_grobs_[i].grob_->self_scm ());
-
- /*
- Insert before BUSY.
- */
- i ++;
- *current_cell = gh_cons (new_entry, busy);
- current_cell = SCM_CDRLOC(*current_cell);
- }
- else
- {
- /*
- if current_stop > stop, then stop != infty, and we
- apparently have a next entry */
- busy = gh_cdr (busy);
- current_cell = SCM_CDRLOC(*current_cell);
- }
- }
+ SCM busy = get_property ("busyGrobs");
+ busy = scm_merge_x (lst, busy, ly_grob_pq_less_p_proc);
+ context ()->set_property ("busyGrobs", busy);
+
+ started_now_.clear ();
+}
+
+void
+Grob_pq_engraver::stop_translation_timestep ()
+{
+ Moment now = now_mom ();
+ SCM start_busy = get_property ("busyGrobs");
+ SCM busy = start_busy;
+ while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) == now)
+ busy = scm_cdr (busy);