-bool
-Slash_repeat_engraver::try_music (Music * m)
-{
- Repeated_music * rp = dynamic_cast<Repeated_music*> (m);
- if (rp
- && !repeat_
- && rp->get_mus_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_translator *global =top_engraver();
- for (int i = 0; i < count; i++)
- global->add_moment_to_process (next_moment_ + Moment (i) * body_length_);
-
- return true;
- }
-
- return false;
-}
-
-void
-Slash_repeat_engraver::process_music ()
-{
- if (repeat_ && now_mom () == next_moment_)
- {
- beat_slash_ = new Item (get_property ("RepeatSlash"));
- announce_grob(beat_slash_, repeat_->self_scm());
- next_moment_ = next_moment_ + body_length_;
-
- top_engraver()->add_moment_to_process (next_moment_);
- }
-}
-
-