fixed strToKey issue when discarding the accidental part of the string
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user