MIDI in now works (code)

This commit is contained in:
2023-10-27 11:35:59 +03:00
parent 371d256c08
commit 66218a307c
3 changed files with 16 additions and 4 deletions

View File

@ -212,6 +212,9 @@ void setup() {
void loop() {
checkInputs();
if (masterClockMode == 2) {
receiveMIDI();
}
}
void sendMIDIClock() {
@ -227,10 +230,10 @@ void receiveMIDI() {
if(Serial.available() > 0) {
if (Serial.read() == 0xF8) { //Clock
MIDIClockRecived = true;
} else if (Serial.read() == 0xFA || Serial.read() == 0xFB) { //start and continue
//} else if (Serial.read() == 0xFA || Serial.read() == 0xFB) { //start and continue
isPlaying = true;
} else if (Serial.read() == 0xFC) { //stop
isPlaying = false;
//} else if (Serial.read() == 0xFC) { //stop
// isPlaying = false;
}
}
}