fixed strToKey issue when discarding the accidental part of the string

This commit is contained in:
Clément Le Bihan
2023-03-20 00:55:51 +01:00
parent 885c819ab5
commit d094c81418
3 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ export class PianoKey {
export const strToKey = (str: string): PianoKey => {
let note: Note;
switch (str[0]) {
switch (str.substring(0, 2)) {
case "C":
note = Note.C;
break;