2 melody-engraver.cc -- implement Melody_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #include "engraver.hh"
13 #include "melody-spanner.hh"
14 #include "pointer-group-interface.hh"
16 class Melody_engraver
: public Engraver
22 DECLARE_ACKNOWLEDGER (stem
);
23 DECLARE_ACKNOWLEDGER (slur
);
24 TRANSLATOR_DECLARATIONS (Melody_engraver
);
25 void stop_translation_timestep ();
26 void process_music ();
30 Melody_engraver::Melody_engraver ()
37 Melody_engraver::process_music ()
39 if (scm_is_string (get_property ("whichBar")))
44 Melody_engraver::stop_translation_timestep ()
47 && !is_direction (stem_
->get_property_data ("neutral-direction")))
49 extract_grob_set (stem_
, "rests", rests
);
55 melody_item_
= make_item ("MelodyItem", stem_
->self_scm ());
57 Melody_spanner::add_stem (melody_item_
, stem_
);
65 Melody_engraver::acknowledge_slur (Grob_info
/* info */)
72 Melody_engraver::acknowledge_stem (Grob_info info
)
79 #include "translator.icc"
81 ADD_ACKNOWLEDGER (Melody_engraver
, stem
);
82 ADD_ACKNOWLEDGER (Melody_engraver
, slur
);
84 ADD_TRANSLATOR (Melody_engraver
,
86 "Create information for context dependent typesetting"