Display Class for BaseMachine
Diff: ST7565_SequencerDisplay.h
- Revision:
- 1:1f6d3e65d946
- Parent:
- 0:9a0f67fe026b
- Child:
- 2:60f7d4c54b5f
--- a/ST7565_SequencerDisplay.h Fri Aug 12 20:42:30 2016 +0000 +++ b/ST7565_SequencerDisplay.h Fri Aug 12 23:36:42 2016 +0000 @@ -44,7 +44,8 @@ for (i = 0; i < 16; i++) { if (this->getOctave() == sequences[i].getOctave()) { - gLCD->fillrect(i * 7, sequences[i].getPitch() * 4 + 5, 7, 4, 1); + int pitchRev = 12 - sequences[i].getPitch(); // Pitchの位置をGridの下から上に変換 + gLCD->fillrect(i * 7, pitchRev * 4 + 5, 7, 4, 1); } } @@ -73,6 +74,22 @@ gLCD->display(); }; + virtual void displayWhileStop(int step) { + /* + // テキストで表示 + char buff[64]; + gLCD->clear(); + sprintf(buff, "Step: %d", step); + gLCD->drawstring(0, 0, buff); + sprintf(buff, "Pitch: %d", sequences[step].getPitch()); + gLCD->drawstring(0, 1, buff); + sprintf(buff, "BPM: %d", this->getBpm()); + gLCD->drawstring(0, 2, buff); + gLCD->display(); + */ + displayWhileRun(step); + } + private: ST7565* gLCD;