X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmeasure-grouping-engraver.cc;h=81d3c5584e7297b28938099c22710c6559f9d331;hb=c44e624300d9877c1790830902a10fd3868dd6d3;hp=fbd407c513219be6be51cf7b2f2958090b23b9d3;hpb=91821bd59959b1289f2d711509017a4dacebecd2;p=lilypond.git diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index fbd407c513..81d3c5584e 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -3,13 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 2002--2005 Han-Wen Nienhuys + (c) 2002--2007 Han-Wen Nienhuys */ #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 */ + "" + );