From b2c5f8348048adc24eac45b1504c332a0de5c5f5 Mon Sep 17 00:00:00 2001 From: Sauraen Date: Tue, 28 Sep 2021 22:30:28 -0700 Subject: [PATCH] Fixed bug with not finding CCs if not aligned to PPQN grid --- Source/SeqFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/SeqFile.cpp b/Source/SeqFile.cpp index df63d40..72694dd 100644 --- a/Source/SeqFile.cpp +++ b/Source/SeqFile.cpp @@ -1384,7 +1384,7 @@ int SeqFile::importMIDI(File midifile, ValueTree midiopts){ bool found = false; for(int i=m; igetNumEvents(); ++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; @@ -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!");