Integrated version
Diff: BaseMachineUIController.h
- Revision:
- 6:5ef23727ce6a
- Parent:
- 5:c3ed523c0330
- Child:
- 7:0f8efe0e1e3f
--- a/BaseMachineUIController.h Mon Nov 14 05:48:48 2016 +0000 +++ b/BaseMachineUIController.h Mon Nov 14 06:24:09 2016 +0000 @@ -31,7 +31,7 @@ const int octaveMax = 2; const int octaveMin = -2; const int waveShapeMax = 1; -const int UImodeMax = 3; +const int UImodeMax = 2; struct OscillatorParam { uint8_t waveShape; @@ -173,7 +173,7 @@ ExioInBufferB->run(10); for (int i = 0; i < 8; i++) { - ExioIn[i]->set_debounce_us(10000); + ExioIn[i]->set_debounce_us(5000); } //-------------------------------------------------------------------- @@ -317,7 +317,7 @@ uint8_t bpm; uint8_t accentLevel; - uint8_t stepPattern; + uint8_t sequencePattern; int editingStep; int playingStep; @@ -506,11 +506,13 @@ void pollingExio() { - stepPattern = 0; - for (int i = 0; i < 8; i++) { - if (ExioIn[i]->read()) { - stepPattern |= (1 << i); - } + int i; + for (i = 0; i < 8; i++) { + if (ExioIn[i]->read()) break; + } + if (i != 8) { + sequencerDisplay->setSequencePattern(i); + isDirty = true; } } @@ -578,7 +580,7 @@ gLCD->clear(); - sprintf(buff, "stepPattern %d", stepPattern); + sprintf(buff, "sequencePattern %d", sequencePattern); gLCD->drawstring(0, 0, buff); gLCD->display();