From 8f257e1b2e29150edf520e1a52f9d8aa72883bd0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 4 Dec 2022 12:12:12 +0100 Subject: [PATCH] Thin MIDI automation when combining regions #9117 --- libs/ardour/midi_playlist.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index b15b517c32..f0169941bb 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -477,6 +477,15 @@ MidiPlaylist::combine (RegionList const & rl, boost::shared_ptr trk) remove_region_internal (other, rwl.thawlist); } + /* thin automation. + * Combining MIDI regions plays back automation, the compound + * will have individual points just like automation was played back + * and recorded. So it has to be thinned it like after a write-pass. + */ + for (auto& l: new_region->model ()->controls()) { + l.second->list()->thin (20); + } + /* write MIDI to disk */ new_region->midi_source (0)->session_saved ();