From bacb93493df5c6baee5cc1e23a98e31646480309 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sat, 7 Jan 2017 05:18:45 +1100 Subject: fix incorrect _start after a split. - when splitting a region where quantized notes start on the split point, the notes would sometimes vanish due to us deriving an exact quarter-note from the supplied frame. this only affects midi regions, as other region types have contents which are completely frame-based. --- libs/ardour/midi_region.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/ardour/midi_region.cc') diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index bb02a79fdd..dcd084d2a6 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -110,6 +110,8 @@ MidiRegion::MidiRegion (boost::shared_ptr other, frameoffset_t if (offset != 0) { _start_beats = (_session.tempo_map().exact_qn_at_frame (other->_position + offset, sub_num) - other->_quarter_note) + other->_start_beats; update_length_beats (sub_num); + /* we've potentially shifted _start_beats, now reset _start frames to match */ + _start = _session.tempo_map().frame_at_quarter_note (other->_quarter_note - other->_start_beats); } register_properties (); -- cgit v1.2.3