temporal: a guess at how to use BBT markers from within TempoMap::paste()

Basically, if the paste position is not zero and not on a bar line, we will a BBT marker there,
using the existing tempo & meter at that position before the paste.

If the end of the paste is not on a bar line, we will place a BBT marker there,
using the tempo & meter that existed before the paste.

TempoMap::paste() now also accepts an optional final argument that if provided is
used to name the BBT markers, if they are created
This commit is contained in:
Paul Davis 2023-08-30 15:21:50 -06:00
parent 7997c83b01
commit 6c44dbf9d6
2 changed files with 47 additions and 32 deletions

View file

@ -897,7 +897,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
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);
LIBTEMPORAL_API void paste (TempoMapCutBuffer const &, timepos_t const & position, bool ripple, std::string = std::string());
LIBTEMPORAL_API void shift (timepos_t const & at, BBT_Offset const & by);
LIBTEMPORAL_API void shift (timepos_t const & at, timecnt_t const & by);