summaryrefslogtreecommitdiff
path: root/tools/mq_editor/index.html
diff options
context:
space:
mode:
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);
}