]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/midi-walker.hh
release: 0.0.40
[lilypond.git] / lily / include / midi-walker.hh
1 /*
2   midi-walker.hh -- declare Midi_walker
3
4   (c) 1996,97 Han-Wen Nienhuys, Jan Nieuwenhuizen <jan@digicash.com>
5   */
6
7 #ifndef MIDIWALKER_HH
8 #define MIDIWALKER_HH
9
10 #include "proto.hh"
11 #include "grouping.hh"
12 #include "staff-walker.hh"
13 #include "pcursor.hh"
14 #include "pqueue.hh"
15
16
17 /**
18   a simple walker which collects midi stuff, and then outputs.
19
20   Should derive from Staff_walker
21   */
22 class Midi_walker : public PCursor<Staff_column*> {
23     Midi_track *track_l_;
24     
25     PQueue<Melodic_req*, Moment> stop_notes;
26     Moment last_moment_;
27
28     /* *************** */
29     void do_stop_notes(Moment);
30     void do_start_note(Note_req *note_l);
31     void output_event(Midi_item&, Moment);
32 public:
33     
34     Midi_walker(Staff*, Midi_track*);
35     void process_requests();
36     ~Midi_walker();
37 };
38
39
40 #endif // MIDIWALKER_HH
41
42