Skip to content

Commit 8a1204d

Browse files
committed
Scale visualizer now only react to press and hold, not aftertouch
1 parent ebbe2cf commit 8a1204d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Applications/Note/NoteControlBar.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ bool NoteControlBar::KeyControlKeyEvent(Point xy, KeyInfo* keyInfo) {
379379
return false;
380380
}
381381

382+
if (keyInfo->State() != PRESSED)
383+
{
384+
return true;
385+
}
386+
382387
xy = xy - Point(0, CTL_BAR_Y - 3);
383388

384389
if (xy.x == 7 || xy == Point(0, 0) || xy == Point(3, 0))

Applications/Note/ScaleVisualizer.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,18 @@ class ScaleVisualizer : public UIComponent {
4545
if (xy == Point(0, 0) || xy == Point(3, 0))
4646
return false;
4747

48-
uint8_t note = xy.x * 2 + xy.y - 1 - (xy.x > 2);
48+
if (keyInfo->State() == HOLD)
49+
{
50+
MatrixOS::UIUtility::TextScroll("Scale Visualizer", color);
51+
}
4952

53+
if (keyInfo->State() != PRESSED)
54+
{
55+
return true;
56+
}
57+
58+
uint8_t note = xy.x * 2 + xy.y - 1 - (xy.x > 2);
59+
5060
if (offsetMode) {
5161
// Only allow setting rootOffset if the note is in the scale
5262
uint16_t c_aligned_scale_map =

0 commit comments

Comments
 (0)