#include "translator.icc"
-using std::string;
-
/**
This acknowledges repeated music with "tremolo" style. It typesets
protected:
virtual void finalize ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (tremolo_span);
- DECLARE_ACKNOWLEDGER (stem);
+ void listen_tremolo_span (Stream_event *);
+ void acknowledge_stem (Grob_info);
};
Chord_tremolo_engraver::Chord_tremolo_engraver ()
previous_stem_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Chord_tremolo_engraver, tremolo_span);
void
Chord_tremolo_engraver::listen_tremolo_span (Stream_event *ev)
{
if (beam_)
{
int tremolo_type = robust_scm2int (repeat_->get_property ("tremolo-type"), 1);
- int flags = std::max (0, intlog2 (tremolo_type) - 2);
+ int flags = max (0, intlog2 (tremolo_type) - 2);
int repeat_count = robust_scm2int (repeat_->get_property ("repeat-count"), 1);
- int gap_count = std::min (flags, intlog2 (repeat_count) + 1);
+ int gap_count = min (flags, intlog2 (repeat_count) + 1);
Grob *s = info.grob ();
if (previous_stem_)
}
}
-ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
+void
+Chord_tremolo_engraver::boot ()
+{
+ ADD_LISTENER (Chord_tremolo_engraver, tremolo_span);
+ ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
+}
+
ADD_TRANSLATOR (Chord_tremolo_engraver,
/* doc */
"Generate beams for tremolo repeats.",