diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-07-06 11:33:27 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-07-06 11:33:27 +0000 |
commit | 2f9184d65395da75a43ea21ffb5f11b8d577d27a (patch) | |
tree | a50a5d5a4bd8b09ca9bd1f3bb6754b7bf86cd3c5 /gtk2_ardour/midi_streamview.cc | |
parent | 2f11b367cac5fe05f5f69e2c73946312d8145260 (diff) |
beat slicing patch #1 from lincoln spiteri
git-svn-id: svn://localhost/ardour2/branches/3.0@7381 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_streamview.cc')
-rw-r--r-- | gtk2_ardour/midi_streamview.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 96d331ba01..cf58224766 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -63,6 +63,7 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv) , _highest_note(71) , _data_note_min(60) , _data_note_max(71) + , _note_lines (0) { /* use a group dedicated to MIDI underlays. Audio underlays are not in this group. */ midi_underlay_group = new ArdourCanvas::Group (*_canvas_group); @@ -617,11 +618,23 @@ MidiStreamView::update_rec_regions (boost::shared_ptr<MidiModel> data, nframes_t const boost::shared_ptr<MidiRegionView::NoteType>& note = *i; + cerr << "New note arrived, length = " << note->length() + << " num " << note->note() + << endl; + + if (note->length() == 0) { + /* we got NoteOn but not NoteOff (yet) + */ + continue; + } + nframes_t note_start_frames = tconv.to(note->time()); nframes_t note_end_frames = tconv.to(note->end_time()); - if (note->length() > 0 && note_end_frames + region->position() > start) + + if (note->length() > 0 && note_end_frames + region->position() > start) { mrv->resolve_note(note->note(), note_end_frames); + } if (note_start_frames + region->position() < start) { continue; |