]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/midi-def.hh
release: 0.1.8
[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
17
18 /** 
19   definitions for midi output. Rather empty
20  */
21 struct Midi_def {
22     // ugh!
23     static int den_i_s;
24     static int num_i_s;
25
26     /// output file name
27     String outfile_str_;
28
29     Input_translator* itrans_p_;
30
31     /// duration of whole note
32     Real whole_seconds_f_;
33
34     Midi_def();
35     Midi_def (Midi_def const& midi_c_r);
36     ~Midi_def();
37
38     Real duration_to_seconds_f (Moment);
39     Global_translator* get_global_translator_p() const;
40     int get_tempo_i (Moment moment);
41     void print() const;
42     void set (Input_translator* itrans_p);
43     void set_tempo (Moment moment, int count_per_minute_i);
44 };
45
46 #endif // MIDI_DEF_HH
47