2 arpeggio-engraver.cc -- implement Arpeggio_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "group-interface.hh"
13 #include "arpeggio.hh"
15 #include "rhythmic-head.hh"
16 #include "side-position-interface.hh"
17 #include "note-column.hh"
19 class Arpeggio_engraver : public Engraver
22 TRANSLATOR_DECLARATIONS (Arpeggio_engraver);
24 virtual void acknowledge_grob (Grob_info);
25 virtual void process_music ();
27 virtual void stop_translation_timestep ();
28 virtual bool try_music (Music *);
35 Arpeggio_engraver::Arpeggio_engraver ()
42 Arpeggio_engraver::try_music (Music* m)
52 Arpeggio_engraver::acknowledge_grob (Grob_info info)
56 if (Stem::has_interface (info.grob_))
58 if (!arpeggio_->get_parent (Y_AXIS))
59 arpeggio_->set_parent (info.grob_, Y_AXIS);
61 Pointer_group_interface::add_grob (arpeggio_, ly_symbol2scm ("stems"), info.grob_);
65 We can't catch local key items (accidentals) from Voice context,
66 see Local_key_engraver
68 else if (Rhythmic_head::has_interface (info.grob_))
70 Side_position_interface::add_support (arpeggio_, info.grob_);
72 else if (Note_column::has_interface (info.grob_ ))
74 info.grob_->set_property ("arpeggio", arpeggio_->self_scm ());
80 Arpeggio_engraver::process_music ()
84 arpeggio_ = make_item ("Arpeggio",arpeggio_req_->self_scm ());
89 Arpeggio_engraver::stop_translation_timestep ()
98 ENTER_DESCRIPTION (Arpeggio_engraver,
99 /* descr */ "Generate an Arpeggio from a Arpeggio_req",
100 /* creats*/ "Arpeggio",
101 /* accepts */ "arpeggio-event",
102 /* acks */ "stem-interface rhythmic-head-interface note-column-interface",