Skip to content

Commit

Permalink
Fixed bug with not finding CCs if not aligned to PPQN grid
Browse files Browse the repository at this point in the history
  • Loading branch information
sauraen committed Sep 29, 2021
1 parent 02ee944 commit b2c5f83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/SeqFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@ int SeqFile::importMIDI(File midifile, ValueTree midiopts){
bool found = false;
for(int i=m; i<trk->getNumEvents(); ++i){
MidiMessage msg2 = trk->getEventPointer(i)->message;
if(msg2.getTimeStamp() != timestamp) break;
if((int)msg2.getTimeStamp() != timestamp) break;
int cc2, value2;
getExtendedCC(msg2, cc2, value2);
if(cc2 != paramcc) continue;
Expand All @@ -1394,12 +1394,12 @@ int SeqFile::importMIDI(File midifile, ValueTree midiopts){
tmpparam.setProperty(idValue, value2, nullptr);
trk->deleteEvent(i, false);
if(i == m) --m;
--i;
found = true;
break;
}
if(!found){
dbgmsg("Multiple CC command (channel " + String(channel)
dbgmsg("Multiple CC command " + cccmd.getProperty(idName).toString()
+ " (channel " + String(channel)
+ " timestamp " + String(timestamp) + " first CC " + String(cc)
+ ") missing required secondary CC " + String(paramcc)
+ ", setting to zero!");
Expand Down

0 comments on commit b2c5f83

Please sign in to comment.