2 beam-performer.cc -- implement Beam_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1996--2007 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "performer.hh"
10 #include "audio-item.hh"
11 #include "audio-column.hh"
12 #include "global-context.hh"
13 #include "stream-event.hh"
16 #include "translator.icc"
18 class Beam_performer
: public Performer
21 TRANSLATOR_DECLARATIONS (Beam_performer
);
24 void start_translation_timestep ();
25 void process_music ();
26 void set_melisma (bool);
27 DECLARE_TRANSLATOR_LISTENER (beam
);
29 Stream_event
*start_ev_
;
30 Stream_event
*now_stop_ev_
;
34 Beam_performer::Beam_performer ()
42 Beam_performer::process_music ()
58 Beam_performer::set_melisma (bool ml
)
60 SCM b
= get_property ("autoBeaming");
62 context ()->set_property ("beamMelismaBusy", ml
? SCM_BOOL_T
: SCM_BOOL_F
);
66 Beam_performer::start_translation_timestep ()
72 IMPLEMENT_TRANSLATOR_LISTENER (Beam_performer
, beam
);
74 Beam_performer::listen_beam (Stream_event
*ev
)
76 Direction d
= to_dir (ev
->get_property ("span-direction"));
84 ADD_TRANSLATOR (Beam_performer
,