- Pitch *pit = unsmob_pitch (event->get_property ("pitch"));
-
- int pos = pit->steps ();
- SCM c0 = get_property ("middleCPosition");
- if (scm_is_number (c0))
- pos += scm_to_int (c0);
-
- note->set_property ("staff-position", scm_from_int (pos));
+ SCM pits = note_events_[i]->get_property ("pitch");
+ event->set_property ("pitch", pits);
+ event->set_property ("duration", note_dur.smobbed_copy ());
+ event->set_property ("length", Moment (note_dur.get_length ()).smobbed_copy ());
+ event->set_property ("duration-log", scm_from_int (note_dur.duration_log ()));
+
+ /*
+ The Completion_heads_engraver splits an event into a group of consecutive events.
+ For each event in the group, the property "autosplit-end" denotes whether the current event
+ was truncated during splitting. Based on "autosplit-end", the Tie_engraver decides whether a
+ tie event should be processed.
+ */
+ event->set_property ("autosplit-end",
+ ly_bool2scm (left_to_do_ - note_dur.get_length () > Rational (0)));
+
+ Item *note = make_note_head (event);
+ if (need_clone)
+ event->unprotect ();