]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/measure-grouping-engraver.cc
Run `make grand-replace'.
[lilypond.git] / lily / measure-grouping-engraver.cc
index e6f1265b8ff53904b6afe4dd65cf68d7f1e24327..addbc5f454d00f4d94ba293856e543d9e91f5e5f 100644 (file)
@@ -3,13 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2002--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "warn.hh"
 #include "side-position-interface.hh"
 #include "global-context.hh"
 #include "engraver.hh"
+#include "spanner.hh"
 
 #include "translator.icc"
 
@@ -24,7 +25,7 @@ protected:
 
   void process_music ();
   virtual void finalize ();
-  DECLARE_ACKNOWLEDGER(note_column);
+  DECLARE_ACKNOWLEDGER (note_column);
 };
 
 void
@@ -42,9 +43,7 @@ void
 Measure_grouping_engraver::acknowledge_note_column (Grob_info gi)
 {
   if (grouping_)
-    {
-      Side_position_interface::add_support (grouping_, gi.grob ());
-    }
+    Side_position_interface::add_support (grouping_, gi.grob ());
 }
 
 void
@@ -68,12 +67,12 @@ Measure_grouping_engraver::process_music ()
       Moment *measpos = unsmob_moment (get_property ("measurePosition"));
       Rational mp = measpos->main_part_;
 
-      Moment *beatlen = unsmob_moment (get_property ("beatLength"));
-      Rational bl = beatlen->main_part_;
+      Moment *beatlen_mom = unsmob_moment (get_property ("beatLength"));
+      Rational beat_length = beatlen_mom->main_part_;
 
       Rational where (0);
       for (SCM s = grouping; scm_is_pair (s);
-          where += Rational ((int) scm_to_int (scm_car (s))) * bl,
+          where += Rational ((int) scm_to_int (scm_car (s))) * beat_length,
             s = scm_cdr (s))
        {
          int grouplen = scm_to_int (scm_car (s));
@@ -88,7 +87,7 @@ Measure_grouping_engraver::process_music ()
              grouping_ = make_spanner ("MeasureGrouping", SCM_EOL);
              grouping_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
 
-             stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * bl;
+             stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * beat_length;
              get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_));
 
              if (grouplen == 3)
@@ -107,10 +106,20 @@ Measure_grouping_engraver::Measure_grouping_engraver ()
   grouping_ = 0;
 }
 
-ADD_ACKNOWLEDGER(Measure_grouping_engraver, note_column);
+ADD_ACKNOWLEDGER (Measure_grouping_engraver, note_column);
 ADD_TRANSLATOR (Measure_grouping_engraver,
-               /* descr */ "Creates MeasureGrouping to indicate beat subdivision.",
-               /* creats*/ "MeasureGrouping",
-               /* accepts */ "",
-               /* reads */ "beatGrouping beatLength measurePosition currentMusicalColumn",
-               /* write */ "");
+               /* doc */
+               "Create @code{MeasureGrouping} to indicate beat subdivision.",
+
+               /* create */
+               "MeasureGrouping ",
+
+               /* read */
+               "beatLength "
+               "currentMusicalColumn "
+               "measurePosition "
+               "beatGrouping ",
+
+               /* write */
+               ""
+               );