]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/midi-def.hh
release: 0.1.11
[lilypond.git] / lily / include / midi-def.hh
1 /*
2   midi-def.hh -- declare Midi_def
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
7 */
8
9
10 #ifndef MIDI_DEF_HH
11 #define MIDI_DEF_HH
12 #include "lily-proto.hh"
13 #include "real.hh"
14 #include "string.hh"
15 #include "moment.hh"
16 #include "music-output-def.hh"
17
18 /** 
19   definitions for midi output. Rather empty
20  */
21 class Midi_def : public Music_output_def {
22 public:
23   // ugh!
24   static int den_i_s;
25   static int num_i_s;
26   VIRTUAL_COPY_CONS(Midi_def, Music_output_def);
27   DECLARE_MY_RUNTIME_TYPEINFO;
28   Input_translator* itrans_p_;
29
30   /// duration of whole note
31   Real whole_seconds_f_;
32
33   Midi_def();
34   Midi_def (Midi_def const& midi_c_r);
35   ~Midi_def();
36
37   Real duration_to_seconds_f (Moment);
38   int get_tempo_i (Moment moment);
39   void print() const;
40   void set (Input_translator* itrans_p);
41   void set_tempo (Moment moment, int count_per_minute_i);
42 protected:
43   virtual Global_translator * get_global_translator_p ();  
44 };
45
46 #endif // MIDI_DEF_HH
47