Section operations need to use audio-time
cut/copy section does copy the tempo-map, so copying a 4 Bar MIDI section will be 4 Bars after the paste. This does not work the other way around: With a tempo-map, 4 bars may correspond to 10 seconds at the source position. While 4 bars at the target position may correspond to a different audio-time duration. This can lead to gaps or overlaps.
This commit is contained in:
parent
6a8946a746
commit
f5fabb595a
@ -7225,8 +7225,16 @@ Session::clear_object_selection ()
|
||||
}
|
||||
|
||||
void
|
||||
Session::cut_copy_section (timepos_t const& start, timepos_t const& end, timepos_t const& to, SectionOperation const op)
|
||||
Session::cut_copy_section (timepos_t const& start_, timepos_t const& end_, timepos_t const& to_, SectionOperation const op)
|
||||
{
|
||||
timepos_t start = timepos_t::from_superclock (start_.superclocks());
|
||||
timepos_t end = timepos_t::from_superclock (end_.superclocks());
|
||||
timepos_t to = timepos_t::from_superclock (to_.superclocks());
|
||||
|
||||
#ifndef NDEBUG
|
||||
cout << "Session::cut_copy_section " << start << " - " << end << " << to " << to << " op = " << op << "\n";
|
||||
#endif
|
||||
|
||||
std::list<TimelineRange> ltr;
|
||||
TimelineRange tlr (start, end, 0);
|
||||
ltr.push_back (tlr);
|
||||
|
Loading…
Reference in New Issue
Block a user