libardour APIs for Sequence::shift (timepos_t const &)

A way to move all MIDI data in a Sequence later in time.

This is likely not finished, and may need a new signal for
notifications
This commit is contained in:
Paul Davis 2025-04-05 17:23:17 -06:00
parent 9c0c3309e6
commit 4ee709af7b
7 changed files with 110 additions and 1 deletions

View file

@ -1213,6 +1213,23 @@ ControlList::shift (timepos_t const& time, timecnt_t const& distance)
maybe_signal_changed ();
}
/* Note: timepos_t is used here instead of timecnt_t because there's an
* implicit origin for the magnitude of the distance.
*/
void
ControlList::simple_shift (timepos_t const & distance)
{
{
Glib::Threads::RWLock::WriterLock lm (_lock);
for (auto & e : _events) {
e->when = e->when + distance;
}
mark_dirty ();
}
maybe_signal_changed ();
}
void
ControlList::modify (iterator iter, timepos_t const& time, double val)
{