- repeat_ =0;
- beat_slash_ = 0;
-}
-
-bool
-Slash_repeat_engraver::try_music (Music * m)
-{
- Repeated_music * rp = dynamic_cast<Repeated_music*> (m);
- if (rp
- && !repeat_
- && rp->get_property ("iterator-ctor")
- == Percent_repeat_iterator::constructor_proc)
- {
- body_length_ = rp->body_get_length ();
- 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 (Moment *mp = unsmob_moment (m))
- meas_len = *mp;
-
- if (body_length_ < meas_len
- && meas_len.main_part_.mod_rat (body_length_.main_part_)
- == Moment (Rational (0,0)))
- {
- repeat_ = rp;
- }
- else
- return false;
-
- Global_context *global =get_global_context ();
- for (int i = 0; i < count; i++)
- global->add_moment_to_process (next_moment_ + Moment (i) * body_length_);
-
- return true;
- }
-
- return false;