Fixed channels in sequencer mode not reacting to isMute

This commit is contained in:
Oleksiy
2025-03-23 20:58:59 +02:00
parent 9136a494e5
commit 747b23471e

View File

@ -360,7 +360,7 @@ void sendTriggers() { //rename to onPulse or something
} }
bool currentStepValue = bitRead(sequences[channels[i].seqPattern].sequence, currentStep[i]); 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); digitalWrite(outsPins[i], HIGH);
} }
} }
@ -478,7 +478,7 @@ void calculateBPMTiming() {
} }
uint8_t calcbpm = bpm + mod; uint8_t calcbpm = bpm + mod;
if (calcbpm > MAXBPM) { calcbpm = MAXBPM; }; 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 } else if (masterClockMode == 1 && extClockPPQN == 1) { //for ext 1/16 clock
pulsePeriod = (newExtPulseTime - lastExtPulseTime) * 10 / 6; pulsePeriod = (newExtPulseTime - lastExtPulseTime) * 10 / 6;
@ -526,7 +526,7 @@ void saveState() {
EEPROM.put(addr, extraChannel); 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 //check last bit in eeprom to know if the correct settings were stored
if (EEPROM.read(1023) == memCode) { if (EEPROM.read(1023) == memCode) {
uint16_t addr = 0; uint16_t addr = 0;