diff options
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r-- | libs/ardour/midi_model.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index 39daaacdea..c93993aef8 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -909,6 +909,8 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg) TimeType note_time = note->time(); TimeType note_length = note->length(); + DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 checking overlaps for note %2 @ %3\n", this, (int)note->note(), note->time())); + for (Pitches::const_iterator i = p.lower_bound (search_note); i != p.end() && (*i)->note() == note->note(); ++i) { @@ -916,6 +918,7 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg) TimeType eb = (*i)->end_time(); OverlapType overlap = OverlapNone; + if ((sb > sa) && (eb <= ea)) { overlap = OverlapInternal; } else if ((eb >= sa) && (eb <= ea)) { @@ -929,7 +932,11 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg) continue; } + DEBUG_TRACE (DEBUG::Sequence, string_compose ("\toverlap is %1 for (%2,%3) vs (%4,%5)\n", enum_2_string(overlap), + sa, ea, sb, eb)); + if (insert_merge_policy() == InsertMergeReject) { + DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 just reject\n", this)); return -1; } |