]> git.donarmstrong.com Git - lilypond.git/blob - mi2mu/include/midi-track.hh
c25d65831b4308e3e9364c1bb573ed19cbc80a71
[lilypond.git] / mi2mu / include / midi-track.hh
1 //
2 // midi-track.hh -- declare midi_track
3 //
4 // copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
5
6 #ifndef MIDI_TRACK_HH
7 #define MIDI_TRACK_HH
8
9 /// (midi_track)
10 class Midi_track {
11 public:
12         Midi_track( int number_i, String copyright_str, String track_name_str, String instrument_str );
13         ~Midi_track();
14
15         void add_event( Moment mom, Midi_event* midi_event_p );
16         Moment end_mom();
17         String name_str();
18         void output_mudela( Lily_stream& lily_stream_r );
19         Moment next_begin_mom( Moment now_mom );
20         Moment next_end_mom( Moment now_mom );
21         void process();
22         void set_tempo( int useconds_i );
23         void set_time( int num_i, int den_i, int clocks_i, int count_32_i );
24         Track_column* tcol_l( Moment mom );
25
26         String copyright_str_;
27         String instrument_str_;
28         String name_str_;
29         Midi_tempo* midi_tempo_p_;
30         Midi_time* midi_time_p_;
31         int number_i_;
32
33 private:
34 #ifdef MVOICE_LIST
35         void add_begin_at( Link_list<Midi_voice*>& open_voices_r, Moment mom );
36 #else
37         void add_begin_at( Array<Midi_voice*>& open_voices_r, Moment mom );
38 #endif
39         int check_begin_bar_i( Moment now_mom, int open_bar_i );
40         int check_end_bar_i( Moment now_mom, int open_bar_i );
41         Midi_voice* get_free_midi_voice_l( Moment mom );
42 #ifdef MVOICE_LIST
43         void remove_end_at( Link_list<Midi_voice*>& open_voices_r, Moment mom );
44 #else
45         void remove_end_at( Array<Midi_voice*>& open_voices_r, Moment mom );
46 #endif
47         void output_mudela_begin_bar( Lily_stream& lily_stream_r, Moment now_mom, int bar_i );
48         void output_mudela_rest( Lily_stream& lily_stream_r, Moment begin_mom, Moment end_mom );
49         void output_mudela_rest_remain( Lily_stream& lily_stream_r, Moment mom );
50
51 #ifdef TCOL_LIST
52         Pointer_list<Track_column*> tcol_p_list_;
53 #else
54         Array<Track_column*> tcol_p_array_;
55 #endif
56 #ifdef MVOICE_LIST
57         Pointer_list<Midi_voice*> midi_voice_p_list_;
58 #else
59         Array<Midi_voice*> midi_voice_p_array_;
60 #endif
61 };
62
63 #endif // MIDI_TRACK_HH
64