X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmidi-walker.hh;h=2ee7cc941797ce75cbbc55d53663f21bab695ead;hb=05286945fcf2083341d94fd18cf66393183ef276;hp=5f9e9e602f9db967a57f1a7ff34c5221e2fff2b3;hpb=58bcc84c9480dae1b21bc24d8396b91fe19e0131;p=lilypond.git diff --git a/lily/include/midi-walker.hh b/lily/include/midi-walker.hh index 5f9e9e602f..2ee7cc9417 100644 --- a/lily/include/midi-walker.hh +++ b/lily/include/midi-walker.hh @@ -1,7 +1,7 @@ /* midi-walker.hh -- declare Midi_walker - (c) 1996--2005 Han-Wen Nienhuys + (c) 1996--2009 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -12,9 +12,9 @@ #include "lily-proto.hh" #include "moment.hh" -struct Midi_note_event : PQueue_ent < Moment, Midi_note *> +struct Midi_note_event : PQueue_ent { - bool ignore_b_; + bool ignore_; Midi_note_event (); }; @@ -26,24 +26,28 @@ int compare (Midi_note_event const &left, Midi_note_event const &right); class Midi_walker { public: - Midi_walker (Audio_staff *audio_staff, Midi_track *midi_track); + Midi_walker (Audio_staff *audio_staff, Midi_track *midi_track, + int channel); ~Midi_walker (); void process (); - void operator++ (int); + void operator ++ (int); bool ok () const; - + void finalize (); private: void do_start_note (Midi_note *note); - void do_stop_notes (Moment now_mom); - void output_event (Moment now_mom, Midi_item *l); - + void do_stop_notes (int); + void output_event (int, Midi_item *l); + Midi_item *get_midi (Audio_item*); + int channel_; Midi_track *track_; Audio_staff *staff_; - int index_; - Link_array * items_; + vsize index_; + vector items_; PQueue stop_note_queue; - Moment last_mom_; + int last_tick_; + + vector midi_events_; }; #endif // MIDI_WALKER_HH