"in the same unbroken chain of execution so" yada yada...
if(PadNote == 60) pattern |= 0x00; yada yada is later followed by if(PadNote == 60) pattern &= ~0x00; //OF COURSE it will never activate a pin
New approach.....
instead of a big bunch of if statements
if ((PadNote[i] >= 60) && (PadNote[i] <= 75)) {
mcp.digitalWrite(PadNote[i]-60, HIGH);
}
if ((PadNote[i] >= 60) && (PadNote[i] <= 75)) {
mcp.digitalWrite(PadNote[i]-60, LOW);
}
lights an LED number 0 to number 15 if the PadNote is between 60 and 75, so if PadNote is 65 it will light LED number 5.