aboutsummaryrefslogtreecommitdiffstats
path: root/src/scale.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-08-24 18:38:46 +0200
committerBad Diode <bd@badd10de.dev>2023-08-24 18:38:46 +0200
commitcf9912cd61c9499fc60a839042fcae1ac556e044 (patch)
tree47d396da1f5515038080adcd8c947e593a205b21 /src/scale.c
parent84f7dd59c87506a29f534a2f6a558799db38d256 (diff)
downloadstepper-cf9912cd61c9499fc60a839042fcae1ac556e044.tar.gz
stepper-cf9912cd61c9499fc60a839042fcae1ac556e044.zip
Add visual feedback and control for scale roots
Diffstat (limited to 'src/scale.c')
-rw-r--r--src/scale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scale.c b/src/scale.c
index 7704815..197959e 100644
--- a/src/scale.c
+++ b/src/scale.c
@@ -88,7 +88,7 @@ scale_note(s32 current, s32 inc) {
88 s32 pos = current % 12; 88 s32 pos = current % 12;
89 s32 offset = 0; 89 s32 offset = 0;
90 for (int i = 1; i <= 12; i++) { 90 for (int i = 1; i <= 12; i++) {
91 s32 k = (current_scale_root + pos + i * inc) % 12; 91 s32 k = (pos - current_scale_root + i * inc) % 12;
92 if (k < 0) { 92 if (k < 0) {
93 k *= -1; 93 k *= -1;
94 k = 12 - k; 94 k = 12 - k;