diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-10-18 20:05:22 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-02 16:32:18 -0600 |
commit | bc706064c6be9ed740961e1b49d8a469b2b17a0b (patch) | |
tree | 97ed90bcf88341dd94e47b1a70b6df270e881d06 /libs/ardour/midi_region.cc | |
parent | 5d40ab22fd6dc4709b8f45e95b4d82a89bff2ca5 (diff) |
use a note tracker to resolve notes cut off during render by the end of the region
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r-- | libs/ardour/midi_region.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index ee5d6e86df..979ea02b49 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -533,6 +533,7 @@ MidiRegion::render (Evoral::EventSink<samplepos_t>& dst, #endif MidiCursor cursor; + MidiStateTracker tracker; /* This call reads events from a source and writes them to `dst' timed in session samples */ @@ -544,12 +545,18 @@ MidiRegion::render (Evoral::EventSink<samplepos_t>& dst, _start + internal_offset + _length, 0, cursor, - 0, + &tracker, filter, _filtered_parameters, quarter_note(), _start_beats); + /* resolve any notes that were "cut off" by the end of the region. The + * Note-Off's get inserted at the end of the region + */ + + tracker.resolve_notes (dst, _position - _start + _length); + return 0; } |