- body_length_ = rp->body_length_mom ();
- int count = rp->repeat_count ();
-
- Moment now = now_mom ();
- start_mom_ = now;
- stop_mom_ = start_mom_ + Moment (count) * body_length_;
- next_moment_ = start_mom_ + body_length_;
-
- SCM m = get_property ("measureLength");
- Moment meas_len;
- if (unsmob_moment (m))
- meas_len = *unsmob_moment (m);
-
- if (body_length_ < meas_len &&
- meas_len.main_part_.mod_rat (body_length_.main_part_) == Moment (Rational (0,0)))
- repeat_sign_type_ = BEAT;
- else if (meas_len == body_length_)
- repeat_sign_type_ = MEASURE;
- else if (Moment (2)* meas_len == body_length_)
- {
- repeat_sign_type_ = DOUBLE_MEASURE;
- next_moment_ += meas_len ;
- }
- else
- {
- warning (_ ("Don't know how to handle a percent repeat of this length."));
- return false;
- }
-
- repeat_ = rp;
-
-
- Global_translator *global =0;
- Translator *t = this;
- do
- {
- t = t->daddy_trans_ ;
- global = dynamic_cast<Global_translator*> (t);
- }
- while (!global);
-
- for (int i = 0; i < count; i++)
- global->add_moment_to_process (now + Moment (1+i) * body_length_);
-
- return true;