]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score-performer.hh
8eb67b3f29cd584d8c10a082b87243b15ae37117
[lilypond.git] / lily / include / score-performer.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
5   Jan Nieuwenhuizen <janneke@gnu.org>
6
7   LilyPond is free software: you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11
12   LilyPond is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef SCORE_PERFORMER_HH
22 #define SCORE_PERFORMER_HH
23
24 #include "moment.hh"
25 #include "performer-group.hh"
26
27 /**
28    Top level performer. Completely takes care of MIDI output
29 */
30 class Score_performer : public Performer_group
31 {
32 public:
33   VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Score_performer);
34   Performance *performance_;
35
36   ~Score_performer ();
37   Score_performer ();
38
39 protected:
40   DECLARE_LISTENER (finish);
41   DECLARE_LISTENER (prepare);
42   DECLARE_LISTENER (one_time_step);
43
44   /* Engraver_group_engraver interface */
45   virtual void connect_to_context (Context *);
46   virtual void disconnect_from_context ();
47   virtual void initialize ();
48   virtual void announce_element (Audio_element_info);
49   virtual void derived_mark () const;
50   virtual void acknowledge_audio_elements ();
51 private:
52   void header (Midi_stream &);
53
54   Audio_column *audio_column_;
55   bool skipping_;
56   Moment skip_start_mom_;
57   Moment offset_mom_;
58 };
59
60 #endif // SCORE_PERFORMER_HH