diff --git a/src/audio/Engine.ts b/src/audio/Engine.ts index d9ed3bb..9b76471 100644 --- a/src/audio/Engine.ts +++ b/src/audio/Engine.ts @@ -20,6 +20,12 @@ const octaveFrequencyMap: Record = { ["b"]: 61.73541, }; +octaveFrequencyMap["c2"] = octaveFrequencyMap["c"] * 2; +octaveFrequencyMap["c#2"] = octaveFrequencyMap["c#"] * 2; +octaveFrequencyMap["d2"] = octaveFrequencyMap["d"] * 2; +octaveFrequencyMap["d#2"] = octaveFrequencyMap["d#"] * 2; +octaveFrequencyMap["e2"] = octaveFrequencyMap["e"] * 2; + const keyToNoteMap: Record = { ["w"]: "c#", ["e"]: "d#", @@ -33,6 +39,11 @@ const keyToNoteMap: Record = { ["g"]: "g", ["h"]: "a", ["j"]: "b", + ["k"]: "c2", + ["l"]: "d2", + [";"]: "e2", + ["o"]: "c#2", + ["p"]: "d#2", }; export class Engine { diff --git a/src/lib/Keyboard/Keyboard.svelte b/src/lib/Keyboard/Keyboard.svelte index 3f95ead..8bfa7a4 100644 --- a/src/lib/Keyboard/Keyboard.svelte +++ b/src/lib/Keyboard/Keyboard.svelte @@ -50,6 +50,9 @@ +
+ +
@@ -59,6 +62,9 @@ + + +