fix scales without c

This commit is contained in:
Felix Roos
2022-02-28 22:55:03 +01:00
parent df21c81bfa
commit 71952ca8fd
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -21,11 +21,11 @@ export function scaleOffset(scale, offset, index = 0) {
while (Math.abs(i) < Math.abs(offset)) {
i += direction;
const index = mod(i, notes.length);
if (direction < 0 && n === 'C') {
if (direction < 0 && n[0] === 'C') {
o += direction;
}
n = notes[index];
if (direction > 0 && n === 'C') {
if (direction > 0 && n[0] === 'C') {
o += direction;
}
}