From 6e2538412a476f67dcd6e42fc4e02fc646cf02d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 1 Apr 2026 16:18:09 +0000 Subject: [PATCH] Add visual melody editor for classical pieces New editor screen lets users fix incorrect melodies without editing code: - Canvas-based timeline with 5 lane rows (Red/Yellow/Blue/Green/Kick) - Click to add notes, click existing notes to select, drag to move - Delete/Backspace to remove selected note - Arrow keys to nudge timing and lane - Beat grid snapping (1/4 beat resolution) - BPM adjustment - Zoom slider for timeline scale - Preview with orchestral background + melody clicks - Save to localStorage (auto-loaded when playing the piece) - Copy JSON to clipboard for sharing corrections - Reset button to restore original melody - Edit button appears in menu only for classical pieces Edits are loaded in buildClassicalNotes() so saved corrections are used during gameplay automatically. https://claude.ai/code/session_01TFVkxq4PYhkSFGYHEi4uqY --- index.html | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 338 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 1bdf53b..c459629 100644 --- a/index.html +++ b/index.html @@ -131,6 +131,7 @@ canvas{display:block;}
+
@@ -179,6 +180,25 @@ canvas{display:block;} + +
+
+ + Editing: — + + + + + + + +
+
+ Click = add note | Click note = select | Drag = move | Delete/Backspace = remove selected | Scroll = pan timeline +
+ +
+