From 8caf775fe71e86ce5fd86800d0237bae1c33d3fe Mon Sep 17 00:00:00 2001 From: Jens Mohrmann Date: Sun, 21 Dec 2025 17:53:26 +0100 Subject: [PATCH] key signatures working --- src/App.tsx | 4 +- src/components/Controls.tsx | 30 +++++++++ src/components/SheetMusic.tsx | 28 ++++----- src/music/NoteUtils.ts | 112 ++++++++++++++++++++++++++++++++-- 4 files changed, 155 insertions(+), 19 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 9dca115..c9c9e63 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -26,7 +26,8 @@ function App() { const [settings, setSettings] = useState({ difficulty: 'first_pos', showHint: false, - tuningId: 'standard' + tuningId: 'standard', + keySignature: 'C' }); const [streak, setStreak] = useState(0); @@ -122,6 +123,7 @@ function App() { diff --git a/src/components/Controls.tsx b/src/components/Controls.tsx index a6e8336..05f72a2 100644 --- a/src/components/Controls.tsx +++ b/src/components/Controls.tsx @@ -8,6 +8,7 @@ export interface AppSettings { difficulty: Difficulty; showHint: boolean; tuningId: string; + keySignature: string; } interface ControlsProps { @@ -63,6 +64,34 @@ export const Controls: React.FC = ({ settings, onUpdateSettings } + +
+ + +
+