diff --git a/Software/Gravity/Gravity.ino b/Software/Gravity/Gravity.ino index 027adcc..55e04b4 100644 --- a/Software/Gravity/Gravity.ino +++ b/Software/Gravity/Gravity.ino @@ -360,7 +360,7 @@ void sendTriggers() { //rename to onPulse or something } bool currentStepValue = bitRead(sequences[channels[i].seqPattern].sequence, currentStep[i]); - if (channels[i].mode == 2 && currentStepValue) { + if (channels[i].mode == 2 && currentStepValue && !channels[i].isMute) { digitalWrite(outsPins[i], HIGH); } } @@ -478,7 +478,7 @@ void calculateBPMTiming() { } uint8_t calcbpm = bpm + mod; if (calcbpm > MAXBPM) { calcbpm = MAXBPM; }; - pulsePeriod = 600000 / (calcbpm * PPQN); //optimisation: try using floats, maybe it'll make it more precise, like 60000.0 / ((float)(calcbpm * PPQN)); + pulsePeriod = 600000 / (calcbpm * PPQN); // 600000.0 / ((float)(calcbpm * PPQN)) - floats eat up ~2% of program memory, but are they more precise? need to measure } else if (masterClockMode == 1 && extClockPPQN == 1) { //for ext 1/16 clock pulsePeriod = (newExtPulseTime - lastExtPulseTime) * 10 / 6; @@ -526,7 +526,7 @@ void saveState() { EEPROM.put(addr, extraChannel); } -void loadState() { +void loadState() { //optimisation: try to make an abstraction that can take an array (of pointers?) of settings to be loaded/saved //check last bit in eeprom to know if the correct settings were stored if (EEPROM.read(1023) == memCode) { uint16_t addr = 0;