3 Commits

3 changed files with 10 additions and 5 deletions

View File

@ -6,7 +6,7 @@
#include <avr/wdt.h>
#include <NeoHWSerial.h>
#define VERSION "V:1.1.1"
#define VERSION "V:1.1.2"
byte memCode = 'D'; //Change to different letter if you changed the data structure
@ -100,7 +100,6 @@ byte currentStep = 0;
byte stepNumSelected = 0;
bool *patternToEdit;
unsigned int channelPulseCount[6];
unsigned int channelPulsesPerCycle[6];
byte sixteenthPulseCount = 0;
@ -250,8 +249,12 @@ void receiveMIDI( uint8_t msg, uint8_t status ) {
MIDIClockReceived = true;
} else if (msg == 0xFC) { //stop
isPlaying = false;
resetClocks();
sendMIDIStop();
} else if (msg == 0xFA || msg == 0xFB) { //start and continue
resetClocks();
isPlaying = true;
sendMIDIStart();
}
}
}
@ -529,7 +532,7 @@ void calculateBPMTiming() {
pulsePeriod = 600000 / (calcbpm * PPQN);
} else if (masterClockMode == 1 && extClockPPQN == 1) { //for ext 1/16 clock (hardcoded)
pulsePeriod = (newExtPulseTime - lastExtPulseTime) / 6;
pulsePeriod = ((newExtPulseTime - lastExtPulseTime) * 10) / 6;
}
}

View File

@ -371,12 +371,13 @@ void checkInputs() {
if (!digitalRead(START_STOP_BTN_PIN) && !playBtnPushed) {
if (masterClockMode == 0) {
calculateBPMTiming();
resetClocks();
if (!isPlaying) {
resetClocks();
isPlaying = true;
sendMIDIStart();
} else {
isPlaying = false;
resetClocks();
sendMIDIStop();
}
}

View File

@ -259,10 +259,11 @@ void updateScreen() {
}
}
valueStr = F("t");
if (masterClockMode == 0 && !isPlaying) {
valueStr = F("t");
u8g2.drawUTF8(121, yPos, valueStr.c_str() );
} else if (masterClockMode == 0 && isPlaying) {
valueStr = F("r");
u8g2.drawUTF8(122, yPos, valueStr.c_str() );
}
}