]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/midi-walker.hh
release: 0.0.68pre
[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 #if 0
11 #include "lily-proto.hh"
12 #include "grouping.hh"
13 #include "staff-walker.hh"
14 #include "pcursor.hh"
15 #include "pqueue.hh"
16
17
18 struct Note_event : PQueue_ent<Moment,Melodic_req*>
19 {
20     bool ignore_b_;
21     Note_event() { 
22         ignore_b_ = false;
23     }
24 };
25
26 int compare(Note_event const&, Note_event const&);
27
28 /**
29   a simple walker which collects midi stuff, and then outputs.
30
31   Should derive from Staff_walker
32   */
33 class Midi_walker : public PCursor<Staff_column*> 
34 {
35     Midi_track *track_l_;
36     
37     PQueue< Note_event > stop_notes;
38
39     Moment last_moment_;
40
41     /* *************** */
42     void do_stop_notes(Moment);
43     void do_start_note(Note_req *note_l);
44     void output_event(Midi_item&, Moment);
45 public:
46     
47     Midi_walker(Staff*, Midi_track*);
48     void do_process_requests();
49     ~Midi_walker();
50 };
51 #endif
52
53 #endif // MIDIWALKER_HH
54
55