From 6d2c3a9fa7ea3e7dc272d5622722f60d889612ce Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 18 Feb 2026 07:53:35 +0100 Subject: feat(mq_editor): partial selection, amp bezier editor, and editor.js refactor - Click-to-select partials on canvas (proximity hit test on bezier) - Right panel: peak freq/amp, time range, freq/amp bezier text inputs, mute/delete - Selected partial renders on top with glow + larger control points - Draggable freq curve control points on main canvas (grab/grabbing cursor) - Amplitude bezier editor: 120px canvas below spectrogram, time-synced with main view zoom/scroll via viewer.onRender callback - Amp edits live-affect synthesis (mq_synth.js already uses ampCurve) - PartialEditor class in editor.js owns all editing logic; index.html wires it with 5 calls (setViewer, setPartials, onPartialSelect, onRender, onPartialDeleted) handoff(Gemini): partial editing MVP complete. Next: freq curve drag polish or export (.spec generation). Co-Authored-By: Claude Sonnet 4.6 --- tools/mq_editor/index.html | 150 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 134 insertions(+), 16 deletions(-) (limited to 'tools/mq_editor/index.html') diff --git a/tools/mq_editor/index.html b/tools/mq_editor/index.html index 60076b3..c5902a7 100644 --- a/tools/mq_editor/index.html +++ b/tools/mq_editor/index.html @@ -73,12 +73,16 @@ border: 1px solid #555; border-radius: 4px; padding: 12px; - min-width: 160px; + min-width: 220px; + max-width: 220px; + max-height: 600px; + overflow-y: auto; display: flex; flex-direction: column; - gap: 10px; + gap: 6px; + box-sizing: border-box; } - .right-panel .panel-title { + .panel-title { font-size: 11px; color: #888; text-transform: uppercase; @@ -86,6 +90,9 @@ border-bottom: 1px solid #444; padding-bottom: 6px; margin-bottom: 2px; + display: flex; + align-items: center; + gap: 6px; } .right-panel label { display: flex; @@ -95,6 +102,61 @@ cursor: pointer; font-size: 13px; } + /* Partial properties */ + .prop-row { + display: flex; + justify-content: space-between; + align-items: baseline; + font-size: 12px; + padding: 1px 0; + } + .prop-label { color: #777; font-size: 11px; } + .prop-section { + font-size: 10px; + color: #666; + text-transform: uppercase; + letter-spacing: 0.5px; + margin-top: 6px; + margin-bottom: 2px; + } + .curve-grid { + display: grid; + grid-template-columns: 18px 1fr 1fr; + gap: 2px 3px; + align-items: center; + } + .curve-grid span { color: #666; font-size: 10px; } + .curve-grid input[type="number"] { + width: 100%; + background: #333; + color: #ccc; + border: 1px solid #444; + padding: 1px 3px; + border-radius: 2px; + font-size: 10px; + font-family: monospace; + box-sizing: border-box; + } + .curve-grid input[type="number"]:focus { + border-color: #666; + outline: none; + } + .partial-actions { + display: flex; + gap: 4px; + margin-top: 6px; + } + .partial-actions button { + flex: 1; + padding: 3px 6px; + font-size: 11px; + margin: 0; + } + .synth-section { + border-top: 1px solid #444; + padding-top: 8px; + margin-top: auto; + } #status { margin-top: 10px; padding: 8px; @@ -135,21 +197,62 @@
-
- - +
+
+ + + + +
+ +
+
- -
- + +
-
Synthesis
- - - + + + +
Click a partial to select
+ + +
+
Synthesis
+ + + +
@@ -161,6 +264,7 @@ +