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.
This commit is contained in:
Raine M. Ekman
2015-04-24 21:17:27 +03:00
parent 2f969c1e1c
commit ff44854cde

View File

@@ -182,8 +182,8 @@ public:
ap = dynamic_cast<AutomationPattern*>(
at->createTCO(0) );
ap->movePosition( pPos );
ap->addObject( objModel );
}
ap->addObject( objModel );
lastPos = time;
time = time - ap->startPosition();