]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score-performer.hh
* lily/ various: Introduce stream events of types Prepare,
[lilypond.git] / lily / include / score-performer.hh
1 /*
2   score-performer.hh -- declare Score_performer
3
4   (c) 1996--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
5   Jan Nieuwenhuizen <janneke@gnu.org>
6 */
7
8 #ifndef SCORE_PERFORMER_HH
9 #define SCORE_PERFORMER_HH
10
11 #include "moment.hh"
12 #include "performer-group.hh"
13 #include "score-translator.hh"
14
15 /**
16    Top level performer. Completely takes care of MIDI output
17 */
18 class Score_performer : public Score_translator,
19                         public virtual Performer_group
20 {
21 public:
22   VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Score_performer);
23   ~Score_performer ();
24   Performance *performance_;
25
26   Score_performer ();
27 protected:
28   DECLARE_LISTENER (finish);
29   DECLARE_LISTENER (prepare);
30   DECLARE_LISTENER (one_time_step);
31
32   /* Engraver_group_engraver interface */
33   virtual void connect_to_context (Context *);
34   virtual void disconnect_from_context ();
35   virtual void initialize ();
36   virtual void announce_element (Audio_element_info);
37   virtual int get_tempo () const;
38   virtual void play_element (Audio_element *p);
39   virtual SCM get_output ();
40   virtual void derived_mark () const;
41 private:
42   void header (Midi_stream &);
43
44   Audio_column *audio_column_;
45   bool skipping_;
46   Moment skip_start_mom_;
47   Moment offset_mom_;
48 };
49
50 #endif // SCORE_PERFORMER_HH