]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.64
authorfred <fred>
Sun, 24 Mar 2002 19:43:26 +0000 (19:43 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:43:26 +0000 (19:43 +0000)
lily/include/request-column.hh
lily/include/staff-column.hh
lily/staff-walker.cc

index ad198f3f04477a147393d3f2063cdda9f6be57ef..19876c9e37ff4de27daff83ef726bd50c750b614 100644 (file)
@@ -28,6 +28,7 @@ public:
     bool used_b()const;
     Moment when();
     void add_reqs(int staff_idx, Array<Request*> const&);
+    void update_time(int staff_idx, Time_description &);
     void set_score_cols(Score_column*, Score_column*);
 };
 
index b0624664be8f6a28904b62ed6e5d33efd72b83a8..7550ae27fa74e00e5cad472d168020012acb2555 100644 (file)
@@ -35,6 +35,7 @@ public:
     void add_reqs (Array<Request*> req_l_arr);
     void OK() const;
     ~Staff_column();
+    void update_time(Time_description&, Rhythmic_grouping*);
     void typeset_breakable_items(Array<Item *> &pre_p_arr,
                                 Array<Item *> &nobreak_p_arr,
                                 Array<Item *> &post_p_arr);
index 97080b894904835d67e6826b4676ddd1c1b062d2..ca6cbf500f03d03805849707e1d31905fcfc967e 100644 (file)
@@ -48,48 +48,10 @@ Staff_walker::when() const
     return ptr()->when();
 }
 
-
 void
 Staff_walker::process_timing_reqs()
 {
-    // first all meter changes
-    for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) {
-       Timing_req * tr_l = ptr()->timing_req_l_arr_[i];
-       if (tr_l->meterchange()) {
-           int b_i=tr_l->meterchange()->beats_i_;
-           int o_i = tr_l->meterchange()->one_beat_i_;
-           if (! time_.allow_meter_change_b() )
-               
-                       tr_l->warning("Meterchange should be at start of measure");
-           else
-               time_.set_meter(b_i, o_i);
-                       
-           *default_grouping = Rhythmic_grouping(
-               MInterval(0,Moment(b_i, o_i)), b_i);
-       } 
-    }
-    
-    // then do the rest
-    for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) {
-       Timing_req * tr_l = ptr()->timing_req_l_arr_[i];
-       if (tr_l->partial()) {
-           Moment m = tr_l->partial()->duration_;
-           String error = time_.try_set_partial_str(m);
-           if (error != "") {
-               tr_l->warning(error);
-           } else 
-               time_.setpartial(m);
-       } else if (tr_l->barcheck() && time_.whole_in_measure_) {
-           tr_l ->warning( "Barcheck failed");
-       } else if (tr_l->cadenza()) {
-           time_.set_cadenza(tr_l->cadenza()->on_b_);
-       } else if (tr_l->measuregrouping()) {
-           *default_grouping = parse_grouping(
-               tr_l->measuregrouping()->beat_i_arr_,
-               tr_l->measuregrouping()->elt_length_arr_);
-       }
-    }
-    time_.OK();
+    ptr()->update_time(time_, default_grouping);
 }
 
 void