]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/timing-engraver.cc
* scripts/lilypond-book.py (Lilypond_snippet.is_outdated): require
[lilypond.git] / lily / timing-engraver.cc
index 269c2d60d0dac4a20dc6cd077102ebd73bc69307..2bf0e5f6527184024817b542340b1d7e03aa22d2 100644 (file)
@@ -3,10 +3,9 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
-#include "translator-group.hh"
-
+#include "context.hh"
 #include "grob-info.hh"
 #include "multi-measure-rest.hh"
 #include "timing-translator.hh"
@@ -42,7 +41,7 @@ Timing_engraver::start_translation_timestep ()
 {
   Timing_translator::start_translation_timestep ();
 
-  SCM nonauto = get_property ("barNonAuto");
+  SCM automatic_bars = get_property ("automaticBars");
   Moment now = now_mom ();
   SCM which = get_property ("whichBar");
 
@@ -60,10 +59,10 @@ Timing_engraver::start_translation_timestep ()
     {
       Moment mlen = Moment (measure_length ());
       unsmob_grob (get_property ("currentCommandColumn"))
-       ->set_grob_property ("measure-length", mlen.smobbed_copy ()); 
+       ->set_property ("measure-length", mlen.smobbed_copy ()); 
     }
   
-  if (!gh_string_p (which) && !to_boolean (nonauto))
+  if (!gh_string_p (which) && to_boolean (automatic_bars))
     {
       SCM always = get_property ("barAlways");
 
@@ -74,26 +73,28 @@ Timing_engraver::start_translation_timestep ()
        }
     }
 
-  daddy_trans_->set_property ("whichBar", which);
+  daddy_context_->set_property ("whichBar", which);
 }
 
 void
 Timing_engraver::stop_translation_timestep ()
 {
   Timing_translator::stop_translation_timestep ();
-  daddy_trans_->set_property ("whichBar", SCM_EOL);
+  daddy_context_->set_property ("whichBar", SCM_EOL);
   last_moment_ = now_mom ();
-      
 }
 
 
 ENTER_DESCRIPTION (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}.",
+/* 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 */       "timeSignatureFraction barNonAuto whichBar barAlways defaultBarType skipBars timing oneBeat measureLength measurePosition currentBarNumber",
+/* reads */       "timeSignatureFraction automaticBars whichBar barAlways defaultBarType skipBars timing measureLength measurePosition currentBarNumber",
 /* write */       "");