+ Rhythmic_tuple const &h2)
+{
+ return (h1.end_ - h2.end_).main_part_.sign ();
+}
+
+/****************************************************************/
+
+/*
+ Acknowledge rhythmic elements, for initializing spacing fields in
+ the columns.
+*/
+class Spacing_engraver : public Engraver
+{
+ PQueue<Rhythmic_tuple> playing_durations_;
+ vector<Rhythmic_tuple> now_durations_;
+ vector<Rhythmic_tuple> stopped_durations_;
+ Moment now_;
+ Spanner *spacing_;
+ Stream_event *start_section_;
+
+ TRANSLATOR_DECLARATIONS (Spacing_engraver);
+
+protected:
+ DECLARE_ACKNOWLEDGER (staff_spacing);
+ DECLARE_ACKNOWLEDGER (note_spacing);
+ DECLARE_ACKNOWLEDGER (rhythmic_head);
+ DECLARE_ACKNOWLEDGER (rhythmic_grob);
+ DECLARE_TRANSLATOR_LISTENER (spacing_section);
+
+ void start_translation_timestep ();
+ void stop_translation_timestep ();
+ void process_music ();
+ void add_starter_duration (Grob_info i);
+
+ virtual void finalize ();
+
+ void start_spanner ();
+ void stop_spanner ();
+};
+
+Spacing_engraver::Spacing_engraver ()
+{
+ spacing_ = 0;
+ start_section_ = 0;
+}
+
+IMPLEMENT_TRANSLATOR_LISTENER (Spacing_engraver, spacing_section);
+void
+Spacing_engraver::listen_spacing_section (Stream_event *ev)
+{
+ ASSIGN_EVENT_ONCE (start_section_, ev);
+}
+
+void
+Spacing_engraver::process_music ()
+{
+ if (start_section_ && spacing_)
+ stop_spanner ();
+
+ if (!spacing_)
+ start_spanner ();
+}
+
+void
+Spacing_engraver::start_spanner ()
+{
+ assert (!spacing_);
+
+ spacing_ = make_spanner ("SpacingSpanner", SCM_EOL);
+ spacing_->set_bound (LEFT,
+ unsmob_grob (get_property ("currentCommandColumn")));
+}
+
+void
+Spacing_engraver::finalize ()
+{
+ stop_spanner ();
+}
+
+void
+Spacing_engraver::stop_spanner ()