From ff44854cde9681e165425fd765206d50718cf1f5 Mon Sep 17 00:00:00 2001 From: "Raine M. Ekman" Date: Fri, 24 Apr 2015 21:17:27 +0300 Subject: [PATCH] MIDI import: don't call AutomationPattern::addObject all the time Should be enough to add the object to the automation pattern only once, as the objModel variable that is added will always be the same for the same value of ccid, which indexes the ccs array. This will speed up creation of automation tracks for MIDI CCs and pitch bend. --- plugins/MidiImport/MidiImport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index a81b0e705..0ec05af49 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -182,8 +182,8 @@ public: ap = dynamic_cast( at->createTCO(0) ); ap->movePosition( pPos ); + ap->addObject( objModel ); } - ap->addObject( objModel ); lastPos = time; time = time - ap->startPosition();