]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/measure-grouping-engraver.cc
Run `make grand-replace'.
[lilypond.git] / lily / measure-grouping-engraver.cc
index fbd407c513219be6be51cf7b2f2958090b23b9d3..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"
 
@@ -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)
@@ -109,8 +108,18 @@ Measure_grouping_engraver::Measure_grouping_engraver ()
 
 ADD_ACKNOWLEDGER (Measure_grouping_engraver, note_column);
 ADD_TRANSLATOR (Measure_grouping_engraver,
-               /* doc */ "Creates MeasureGrouping to indicate beat subdivision.",
-               /* create */ "MeasureGrouping",
-               /* accept */ "",
-               /* read */ "beatGrouping beatLength measurePosition currentMusicalColumn",
-               /* write */ "");
+               /* doc */
+               "Create @code{MeasureGrouping} to indicate beat subdivision.",
+
+               /* create */
+               "MeasureGrouping ",
+
+               /* read */
+               "beatLength "
+               "currentMusicalColumn "
+               "measurePosition "
+               "beatGrouping ",
+
+               /* write */
+               ""
+               );