summaryrefslogtreecommitdiff
path: root/tools/mq_editor/index.html
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-18 11:11:21 +0100
committerskal <pascal.massimino@gmail.com>2026-02-18 11:11:21 +0100
commit082959062671e0e1a1482fac8dc5f77e05060bee (patch)
tree420af2481cbdc8aa77968c05e386bfe7db99e9d7 /tools/mq_editor/index.html
parent890f4fdf96945832d5da078cb795266127cf122d (diff)
feat(mq_editor): E key for extract, style cleanup, doc update
- Map 'E' key to Extract Partials - Move extractBtn inline style to CSS rule #extractBtn - Hoist autoSpreadAllBtn DOM ref to top with other refs - Drop unused PADY local var in _renderAmpEditor - Remove redundant comment before extractBtn listener - README: add E/Esc keys, add editor.js to architecture, mark Phase 3 done handoff(Gemini): mq_editor UX polish + doc consolidated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor/index.html')
-rw-r--r--tools/mq_editor/index.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/mq_editor/index.html b/tools/mq_editor/index.html
index fa7543c..f6d052b 100644
--- a/tools/mq_editor/index.html
+++ b/tools/mq_editor/index.html
@@ -40,6 +40,7 @@
}
button:hover { background: #4a4a4a; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
+ #extractBtn { background: #666; color: #fff; font-weight: bold; border-color: #888; }
input[type="file"] { display: none; }
.params {
display: inline-block;
@@ -356,6 +357,7 @@
const wavFile = document.getElementById('wavFile');
const chooseFileBtn = document.getElementById('chooseFileBtn');
const extractBtn = document.getElementById('extractBtn');
+ const autoSpreadAllBtn = document.getElementById('autoSpreadAllBtn');
const playBtn = document.getElementById('playBtn');
const stopBtn = document.getElementById('stopBtn');
const canvas = document.getElementById('canvas');
@@ -512,14 +514,11 @@
}, 50);
}
- // Extract partials
extractBtn.addEventListener('click', () => {
if (!audioBuffer) return;
runExtraction();
});
- // Auto-spread all partials
- const autoSpreadAllBtn = document.getElementById('autoSpreadAllBtn');
autoSpreadAllBtn.addEventListener('click', () => {
if (!extractedPartials || !stftCache) return;
const fs = stftCache.fftSize;
@@ -642,6 +641,9 @@
viewer.showSynthFFT = !viewer.showSynthFFT;
viewer.renderSpectrum();
}
+ } else if (e.code === 'KeyE') {
+ e.preventDefault();
+ if (!extractBtn.disabled) extractBtn.click();
} else if (e.code === 'Escape') {
if (viewer) viewer.selectPartial(-1);
}