2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1999--2009 Michael Krause
6 written for the GNU LilyPond music typesetter
10 . Cancel any beams running through the breathing sign
11 ([e8 \breathe f e f] should become [e8] \breathe [f e f])
12 . Spacing is not yet completely pretty
14 LilyPond is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
19 LilyPond is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
28 #include "breathing-sign.hh"
29 #include "engraver.hh"
31 #include "stream-event.hh"
33 #include "translator.icc"
35 class Breathing_sign_engraver : public Engraver
38 TRANSLATOR_DECLARATIONS (Breathing_sign_engraver);
41 void process_music ();
42 void stop_translation_timestep ();
44 DECLARE_TRANSLATOR_LISTENER (breathing);
46 Stream_event *breathing_sign_event_;
47 Grob *breathing_sign_;
50 Breathing_sign_engraver::Breathing_sign_engraver ()
53 breathing_sign_event_ = 0;
56 IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver, breathing);
58 Breathing_sign_engraver::listen_breathing (Stream_event *ev)
60 ASSIGN_EVENT_ONCE (breathing_sign_event_, ev);
64 Breathing_sign_engraver::process_music ()
66 if (breathing_sign_event_)
68 breathing_sign_ = make_item ("BreathingSign", breathing_sign_event_->self_scm ());
73 Breathing_sign_engraver::stop_translation_timestep ()
76 breathing_sign_event_ = 0;
79 ADD_TRANSLATOR (Breathing_sign_engraver,
81 "Create a breathing sign.",