AcidStepSequencer: Always force note_stack release on pattern step length changes, also lets lock our step length to avoid randomly notes off for bad potentiometers

pull/7/head
midilab 7 years ago
parent 21ba99d38e
commit 6381720d59
  1. 3
      examples/AcidStepSequencer/AcidStepSequencer.ino

@ -310,6 +310,7 @@ int16_t getPotChanges(uint8_t pot_pin, uint16_t min_value, uint16_t max_value)
break;
case STEP_LENGTH_POT_PIN:
last_value = &_pot_state[2];
check_lock = true;
break;
case TEMPO_POT_PIN:
last_value = &_pot_state[3];
@ -366,12 +367,10 @@ void processPots()
if ( _step_edit >= _step_length ) {
_step_edit = _step_length-1;
}
if ( _step >= _step_length ) {
// send stack note off
sendMidiMessage(NOTE_OFF, _note_stack[1].note, 0);
sendMidiMessage(NOTE_OFF, _note_stack[0].note, 0);
}
}
tempo = getPotChanges(TEMPO_POT_PIN, SEQUENCER_MIN_BPM, SEQUENCER_MAX_BPM);
if ( tempo != -1 ) {

Loading…
Cancel
Save