2 arpeggio-engraver.cc -- implement Arpeggio_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2005 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "group-interface.hh"
11 #include "arpeggio.hh"
13 #include "rhythmic-head.hh"
14 #include "side-position-interface.hh"
15 #include "note-column.hh"
17 class Arpeggio_engraver : public Engraver
20 TRANSLATOR_DECLARATIONS (Arpeggio_engraver);
23 virtual void acknowledge_grob (Grob_info);
24 virtual void process_music ();
25 virtual void stop_translation_timestep ();
26 virtual bool try_music (Music *);
32 Arpeggio_engraver::Arpeggio_engraver ()
39 Arpeggio_engraver::try_music (Music *m)
49 Arpeggio_engraver::acknowledge_grob (Grob_info info)
53 if (Stem::has_interface (info.grob_))
55 if (!arpeggio_->get_parent (Y_AXIS))
56 arpeggio_->set_parent (info.grob_, Y_AXIS);
58 Pointer_group_interface::add_grob (arpeggio_,
59 ly_symbol2scm ("stems"),
64 We can't catch local key items (accidentals) from Voice context,
65 see Local_key_engraver
67 else if (Rhythmic_head::has_interface (info.grob_))
69 Side_position_interface::add_support (arpeggio_, info.grob_);
71 else if (Note_column::has_interface (info.grob_))
73 info.grob_->set_property ("arpeggio", arpeggio_->self_scm ());
79 Arpeggio_engraver::process_music ()
83 arpeggio_ = make_item ("Arpeggio", arpeggio_req_->self_scm ());
88 Arpeggio_engraver::stop_translation_timestep ()
94 ADD_TRANSLATOR (Arpeggio_engraver,
95 /* descr */ "Generate an Arpeggio from a Arpeggio_req",
96 /* creats*/ "Arpeggio",
97 /* accepts */ "arpeggio-event",
98 /* acks */ "stem-interface rhythmic-head-interface note-column-interface",