+#include "grob.hh"
+#include "warn.hh"
+
+
+class Timing_engraver : public Timing_translator, public Engraver
+{
+protected:
+ /* Need to know whether we're advancing in grace notes, or not. */
+ Moment last_moment_;
+
+ virtual void start_translation_timestep ();
+ virtual void process_music ();
+ virtual void stop_translation_timestep ();
+
+public:
+ TRANSLATOR_DECLARATIONS (Timing_engraver);
+};
+
+ADD_TRANSLATOR (Timing_engraver,
+ /* descr */ " Responsible for synchronizing timing information from staves. "
+ "Normally in @code{Score}. In order to create polyrhythmic music, "
+ "this engraver should be removed from @code{Score} and placed in "
+ "@code{Staff}. "
+ "\n\nThis engraver adds the alias @code{Timing} to its containing context.",
+ /* creats*/ "",
+ /* accepts */ "",
+ /* acks */ "",
+ /* reads */ "automaticBars whichBar barAlways defaultBarType "
+ "skipBars timing measureLength measurePosition currentBarNumber",
+ /* write */ "");
+
+
+Timing_engraver::Timing_engraver ()
+{
+ last_moment_.main_part_ = Rational (-1);
+}
+
+void
+Timing_engraver::process_music ()
+{
+ Timing_translator::process_music ();