Skip to content

Commit af9ef14

Browse files
committed
Fix note pad map generation with negative octave
1 parent b421646 commit af9ef14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Applications/Note/NotePad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Dimension NotePad::GetSize() {
5252
}
5353

5454
NoteType NotePad::InScale(int16_t note) {
55+
note += 120; // add a big pos offset to make sure we don't get negative after mod
5556
note %= 12;
56-
note = abs(note);
5757

5858
if (note == ((rt->config->rootKey + rt->config->rootOffset) % 12))
5959
return ROOT_NOTE; // It is a root key

0 commit comments

Comments
 (0)