PaulS
Well-known member
Wondered if
Changed
This is
Result: fail, still a rush of F8's before the normal 21msec F8 cadence comes in.
Paul
usbMIDI.setHandleRealTimeSystem(RealTimeSystem)
might be the issue, so I changed the code to using usbMIDI.setHandleClock(myClock)
.Changed
void setup()
to:
Code:
void setup() {
Serial.begin(57600);
Serial.println(F("serial ready"));
delay(10000);
while (usbMIDI.read()) {};
usbMIDI.setHandleClock(myClock);
Serial.println(F("end setup"));
}
This is
void myClock()
, copied from void RealTimeSystem(byte realtimebyte)
:
Code:
void myClock() {
currentRXtime = micros();
Serial.print(counter); Serial.print("\t"); Serial.print(currentRXtime - previousRXtime); Serial.print("\t"); Serial.println(CLOCK, HEX);
previousRXtime = currentRXtime;
processClock();
counter++;
if (counter >= PPQ_96) counter = 0;
}
Result: fail, still a rush of F8's before the normal 21msec F8 cadence comes in.
Paul