2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1996--2015 Jan Nieuwenhuizen <janneke@gnu.org>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #include "performer.hh"
21 #include "audio-item.hh"
22 #include "audio-column.hh"
23 #include "global-context.hh"
24 #include "stream-event.hh"
27 #include "translator.icc"
29 class Beam_performer : public Performer
32 TRANSLATOR_DECLARATIONS (Beam_performer);
35 void start_translation_timestep ();
36 void process_music ();
37 void set_melisma (bool);
38 DECLARE_TRANSLATOR_LISTENER (beam);
40 Stream_event *start_ev_;
41 Stream_event *now_stop_ev_;
45 Beam_performer::Beam_performer ()
53 Beam_performer::process_music ()
69 Beam_performer::set_melisma (bool ml)
71 SCM b = get_property ("autoBeaming");
73 context ()->set_property ("beamMelismaBusy", ml ? SCM_BOOL_T : SCM_BOOL_F);
77 Beam_performer::start_translation_timestep ()
83 IMPLEMENT_TRANSLATOR_LISTENER (Beam_performer, beam);
85 Beam_performer::listen_beam (Stream_event *ev)
87 Direction d = to_dir (ev->get_property ("span-direction"));
95 ADD_TRANSLATOR (Beam_performer,