From e63f885c7caaf7496d01e37f8ed2769190f8a51e Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 18 Feb 2026 23:25:46 +0100 Subject: feat(mq_editor): partial spectrum viewer — synth+FFT power display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a 200×100 canvas (left of the main spectrum overlay) that shows the synthesised power spectrum of the selected partial at the time under the mouse (or playhead). Pipeline: synthesizeMQ → Hann window → FFT (2048-pt) → dB power bars. - freqCurve times are shifted so the synthesis window is centred on t - X-axis: log-frequency (same scale as main view) - Y-axis: dB, normalised to peak of the synthesised frame - Cache: {partialIndex, time} → avoids re-synthesis on mouse move; bypassed (force=true) from render() so param changes always redraw handoff(Claude): partial spectrum viewer complete Co-Authored-By: Claude Sonnet 4.6 --- tools/mq_editor/style.css | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/mq_editor/style.css') diff --git a/tools/mq_editor/style.css b/tools/mq_editor/style.css index ed518f5..07a404a 100644 --- a/tools/mq_editor/style.css +++ b/tools/mq_editor/style.css @@ -39,6 +39,7 @@ button.contour-active { background: #145; border-color: #0cc; color: #aff; } /* === Canvas & overlays === */ #canvas { border: 1px solid #555; background: #000; cursor: crosshair; display: block; flex-shrink: 0; } #cursorCanvas, #playheadCanvas { position: absolute; top: 0; left: 0; pointer-events: none; } +#partialSpectrumViewer { position: absolute; bottom: 10px; right: 420px; width: 200px; height: 100px; background: rgba(30,30,30,.9); border: 1px solid #555; border-radius: 3px; pointer-events: none; } #spectrumViewer { position: absolute; bottom: 10px; right: 10px; width: 400px; height: 100px; background: rgba(30,30,30,.9); border: 1px solid #555; border-radius: 3px; pointer-events: none; } #keepOverlay { position: absolute; bottom: 10px; left: 10px; background: rgba(30,30,30,.88); border: 1px solid #555; border-radius: 3px; padding: 4px 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #aaa; user-select: none; } #keepOverlay input[type="range"] { width: 90px; } -- cgit v1.2.3