From fafc891ca6ae942e988696055274c2058664345f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 4 May 2023 18:49:06 -0600 Subject: [PATCH] add ripple option API for TempoMap::cut() --- libs/temporal/tempo.cc | 12 ++++++++---- libs/temporal/temporal/tempo.h | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index 0f4f59e324..83d8f5bd09 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -852,20 +852,20 @@ TempoMap::copy_points (TempoMap const & other) } TempoMapCutBuffer* -TempoMap::cut (timepos_t const & start, timepos_t const & end) +TempoMap::cut (timepos_t const & start, timepos_t const & end, bool ripple) { - return cut_copy (start, end, false); + return cut_copy (start, end, false, ripple); } TempoMapCutBuffer* TempoMap::copy ( timepos_t const & start, timepos_t const & end) { - return cut_copy (start, end, true); + return cut_copy (start, end, true, false); } TempoMapCutBuffer* -TempoMap::cut_copy (timepos_t const & start, timepos_t const & end, bool copy) +TempoMap::cut_copy (timepos_t const & start, timepos_t const & end, bool copy, bool ripple) { TempoMetric sm (metric_at (start)); TempoMetric em (metric_at (end)); @@ -918,6 +918,10 @@ TempoMap::cut_copy (timepos_t const & start, timepos_t const & end, bool copy) reset_starting_at (start_sclock); } + if (!copy && ripple) { + + } + return cb; } diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 49de625dc6..5b5e5b8ef7 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -818,7 +818,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible LIBTEMPORAL_API TempoMetric metric_at (Beats const &, bool can_match = true) const; LIBTEMPORAL_API TempoMetric metric_at (BBT_Argument const &, bool can_match = true) const; - LIBTEMPORAL_API TempoMapCutBuffer* cut (timepos_t const & start, timepos_t const & end); + LIBTEMPORAL_API TempoMapCutBuffer* cut (timepos_t const & start, timepos_t const & end, bool ripple); LIBTEMPORAL_API TempoMapCutBuffer* copy (timepos_t const & start, timepos_t const & end); LIBTEMPORAL_API void paste (TempoMapCutBuffer const &, timepos_t const & position, bool ripple); @@ -1137,7 +1137,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible void reset_section (Points::iterator& begin, Points::iterator& end, superclock_t, TempoMetric& metric); - TempoMapCutBuffer* cut_copy (timepos_t const & start, timepos_t const & end, bool copy); + TempoMapCutBuffer* cut_copy (timepos_t const & start, timepos_t const & end, bool copy, bool ripple); /* These are not really const, but the lookup tables are marked mutable * to allow time domain conversions to store their results while being