2 // my-midi-parser.hh -- declare My_midi_parser
4 // copyright 1997 Jan Nieuwenhuizen <jan@digicash.com>
6 #ifndef MY_MIDI_PARSER_HH
7 #define MY_MIDI_PARSER_HH
10 // #include "string.hh"
15 class My_midi_parser
{
17 My_midi_parser( String filename_str
);
19 void add_score( Midi_score
* midi_score_p
);
20 void error( char const* sz_l
);
22 void forward( int i
);
24 void note_begin( int channel_i
, int pitch_i
, int dyn_i
);
25 Midi_event
* note_end_midi_event_p( int channel_i
, int pitch_i
, int dyn_i
);
26 int output_mudela( String filename_str
);
28 void set_division_4( int division_4_i
);
29 void set_key( int accidentals_i
, int minor_i
);
30 void set_tempo( int useconds_i
);
31 void set_time( int num_i
, int den_i
, int clocks_i
, int count_32_i
);
34 Int64 now_i64_
; // 31 bits yields tipically about 1000 bars
36 static int const CHANNELS_i
= 16;
37 static int const PITCHES_i
= 128;
38 Int64 running_i64_i64_a_
[ CHANNELS_i
][ PITCHES_i
];
40 Midi_score
* midi_score_p_
;
42 Midi_key
* midi_key_p_
;
43 Midi_tempo
* midi_tempo_p_
;
44 Midi_time
* midi_time_p_
;
46 char const* defined_ch_c_l_
;
48 My_midi_lexer
* midi_lexer_p_
;
51 extern My_midi_parser
* midi_parser_l_g
;
53 #endif // MY_MIDI_PARSER_HH