2 instrument-switch-engraver.cc -- implement
4 source file of the GNU LilyPond music typesetter
6 (c) 2006--2008 Han-Wen Nienhuys <hanwen@lilypond.org>
10 #include "engraver.hh"
12 #include "translator.icc"
15 class Instrument_switch_engraver
: public Engraver
18 TRANSLATOR_DECLARATIONS (Instrument_switch_engraver
);
23 void stop_translation_time_step ();
24 void process_music ();
28 Instrument_switch_engraver::Instrument_switch_engraver ()
35 TODO: should use an event.
38 Instrument_switch_engraver::process_music ()
40 SCM cue_text
= get_property ("instrumentCueName");
42 if (!scm_is_eq (cue_name_
, cue_text
))
44 text_
= make_item ("InstrumentSwitch", SCM_EOL
);
45 text_
->set_property ("text", cue_text
);
51 Instrument_switch_engraver::stop_translation_time_step ()
56 ADD_TRANSLATOR (Instrument_switch_engraver
,
58 "Create a cue text for taking instrument.",