X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmeasure-grouping-engraver.cc;h=126e32ec5f99b19df3e04d22d40b89c7a847910f;hb=556b8f79cbe6b89388a37c3e72037f54229d462d;hp=f2075348093e8b40063e45e93f8020d79c717bd2;hpb=7512d98b2fa5f9cea2add48cccb93cc591defe32;p=lilypond.git diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index f207534809..126e32ec5f 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2002--2005 Han-Wen Nienhuys + (c) 2002--2006 Han-Wen Nienhuys */ #include "warn.hh" @@ -22,9 +22,9 @@ protected: Spanner *grouping_; Rational stop_grouping_mom_; - PRECOMPUTED_VIRTUAL void process_music (); + void process_music (); virtual void finalize (); - DECLARE_ACKNOWLEDGER(note_column); + DECLARE_ACKNOWLEDGER (note_column); }; void @@ -42,9 +42,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 +66,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 +86,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,11 +105,19 @@ 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 */ "", - /* acks */ "", - /* reads */ "beatGrouping beatLength measurePosition currentMusicalColumn", - /* write */ ""); + /* doc */ + "Creates MeasureGrouping to indicate beat subdivision.", + /* create */ + "MeasureGrouping", + /* accept */ + "", + /* read */ + "beatLength " + "currentMusicalColumn " + "measurePosition " + "beatGrouping " + , + /* write */ + "");