Skip to content

Commit e0eda90

Browse files
committed
Fixed very old bug with merging nearby program change numbers
1 parent 30211cc commit e0eda90

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Source/SeqFile.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,9 @@ bool SeqFile::isCloseEnough(ValueTree command1, ValueTree command2, bool allowCC
489489
param1 = command1.getChild(i);
490490
if(param1.getProperty(idMeaning).toString() != "CC") continue;
491491
param2 = command2.getChild(i);
492-
if((int)param1.getProperty(idCC, -1) != (int)param2.getProperty(idCC, -2)) return false;
492+
int cc = (int)param1.getProperty(idCC, -1);
493+
if(cc != (int)param2.getProperty(idCC, -2)) return false;
494+
if(cc == 0 || cc == 32 || cc == 129) delta = 0; //Bank/prog must match exactly
493495
if(abs((int)param1.getProperty(idValue, -1234)
494496
- (int)param2.getProperty(idValue, -8971)) > delta) return false;
495497
}

0 commit comments

Comments
 (0)