From 75c9927d7503ff1a2a1684075aa36cbc7be3f7e4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 14 Dec 2022 16:14:47 +0100 Subject: [PATCH] Tweak MIDI file import parameters * Create opaque regions * Set interpolation of parameters to be discrete (just like at rec-stop). --- libs/ardour/import.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 06fddc627b..122149025a 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -484,6 +484,9 @@ write_midi_data_to_new_files (Evoral::SMF* source, ImportStatus& status, smfs->load_model (source_lock, true); + /* Now that there is a model, we can set interpolation of parameters. */ + smfs->mark_streaming_write_completed (source_lock); + if (status.cancel) { break; } @@ -582,6 +585,7 @@ Session::deinterlace_midi_region (boost::shared_ptr mr) /* create a whole-file region for this new source, so it shows up in the Source List...*/ PropertyList plist (mr->properties ()); plist.add (Properties::whole_file, true); + plist.add (Properties::opaque, true); plist.add (Properties::name, (*x)->name()); plist.add (Properties::tags, string_compose ("%1%2%3", _("(split-chans)"), mr->tags ().empty() ? "" : " ", mr->tags ())); boost::shared_ptr whole = RegionFactory::create (*x, plist);