X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmidi-walker.cc;h=782c3e2932ea3d6cbf10066f43b82547746c064b;hb=740a37e6b00957b32c0b49f3b876f455122f6821;hp=c9a1fc2839587659ec64c1029f001f205871de61;hpb=9f1a0d54bb060ebcac66780f69e15e281a4c93e8;p=lilypond.git diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index c9a1fc2839..782c3e2932 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -12,6 +12,7 @@ #include "audio-column.hh" #include "audio-staff.hh" #include "midi-item.hh" +#include "midi-chunk.hh" #include "midi-stream.hh" #include "warn.hh" @@ -69,6 +70,7 @@ void Midi_walker::do_start_note (Midi_note *note) { Audio_item *ptr = items_[index_]; + assert (note->audio_ == ptr); int stop_ticks = int (moment_to_real (note->audio_->length_mom_) * Real (384 * 4)) + ptr->audio_column_->ticks (); @@ -103,6 +105,8 @@ Midi_walker::do_start_note (Midi_note *note) { Midi_note_event e; e.val = new Midi_note_off (note); + + midi_events_.push_back (e.val); e.key = int (stop_ticks); stop_note_queue.insert (e); @@ -111,9 +115,6 @@ Midi_walker::do_start_note (Midi_note *note) } } -/** - Output note events for all notes which end before #max_mom# -*/ void Midi_walker::do_stop_notes (int max_ticks) {