- event->set_property ("duration", appearance.smobbed_copy ());
- event->set_property ("length", Moment (appearance.get_length ()).smobbed_copy ());
- event->set_property ("duration-log", scm_from_int (appearance.duration_log ()));
+ 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)));