Rev 6 #1
@ -212,6 +212,9 @@ void setup() {
|
|||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
checkInputs();
|
checkInputs();
|
||||||
|
if (masterClockMode == 2) {
|
||||||
|
receiveMIDI();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendMIDIClock() {
|
void sendMIDIClock() {
|
||||||
@ -227,10 +230,10 @@ void receiveMIDI() {
|
|||||||
if(Serial.available() > 0) {
|
if(Serial.available() > 0) {
|
||||||
if (Serial.read() == 0xF8) { //Clock
|
if (Serial.read() == 0xF8) { //Clock
|
||||||
MIDIClockRecived = true;
|
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;
|
isPlaying = true;
|
||||||
} else if (Serial.read() == 0xFC) { //stop
|
//} else if (Serial.read() == 0xFC) { //stop
|
||||||
isPlaying = false;
|
// isPlaying = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -317,7 +317,14 @@ void checkInputs() {
|
|||||||
if (masterClockMode == 0) {
|
if (masterClockMode == 0) {
|
||||||
calculateBPMTiming();
|
calculateBPMTiming();
|
||||||
resetClocks();
|
resetClocks();
|
||||||
isPlaying = !isPlaying;
|
//isPlaying = !isPlaying;
|
||||||
|
if (!isPlaying) {
|
||||||
|
isPlaying = true;
|
||||||
|
sendMIDIStart();
|
||||||
|
} else {
|
||||||
|
isPlaying = false;
|
||||||
|
sendMIDIStop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
playBtnPushed = true;
|
playBtnPushed = true;
|
||||||
updateScreen(); //to wake up the screen if turned off
|
updateScreen(); //to wake up the screen if turned off
|
||||||
|
|||||||
@ -25,6 +25,8 @@ void updateScreen() {
|
|||||||
lastMenuItem = 3;
|
lastMenuItem = 3;
|
||||||
} else if (masterClockMode == 1) {
|
} else if (masterClockMode == 1) {
|
||||||
lastMenuItem = 1;
|
lastMenuItem = 1;
|
||||||
|
} else if (masterClockMode == 2) {
|
||||||
|
lastMenuItem = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (byte i = 1; i <= lastMenuItem; i++) {
|
for (byte i = 1; i <= lastMenuItem; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user