Skip to content

Commit

Permalink
MIDI import: don't call AutomationPattern::addObject all the time
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
softrabbit committed Apr 24, 2015
1 parent 35b357f commit 1e29da4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/MidiImport/MidiImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ class smfMidiCC
ap = dynamic_cast<AutomationPattern*>(
at->createTCO(0) );
ap->movePosition( pPos );
ap->addObject( objModel );
}
ap->addObject( objModel );

lastPos = time;
time = time - ap->startPosition();
Expand Down

0 comments on commit 1e29da4

Please sign in to comment.