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.html49
1 files changed, 46 insertions, 3 deletions
diff --git a/tools/mq_editor/index.html b/tools/mq_editor/index.html
index 5e1e5c4..fa7543c 100644
--- a/tools/mq_editor/index.html
+++ b/tools/mq_editor/index.html
@@ -172,8 +172,14 @@
align-items: center;
}
.synth-grid span { color: #888; font-size: 12px; }
- .synth-grid input[type="number"] {
- width: 100%;
+ .synth-field-wrap {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ }
+ .synth-field-wrap input[type="number"] {
+ flex: 1;
+ min-width: 0;
background: #333;
color: #ccc;
border: 1px solid #444;
@@ -183,6 +189,37 @@
font-family: monospace;
box-sizing: border-box;
}
+ .synth-field-wrap input[type="number"]:focus { border-color: #666; outline: none; }
+ .jog-slider {
+ width: 44px;
+ height: 16px;
+ background: #1e1e1e;
+ border: 1px solid #444;
+ border-radius: 3px;
+ cursor: ew-resize;
+ position: relative;
+ flex-shrink: 0;
+ user-select: none;
+ overflow: hidden;
+ }
+ .jog-slider::before {
+ content: '';
+ position: absolute;
+ left: 50%; top: 3px; bottom: 3px;
+ width: 1px;
+ background: #484848;
+ transform: translateX(-50%);
+ }
+ .jog-thumb {
+ position: absolute;
+ top: 3px; bottom: 3px;
+ width: 6px;
+ background: #888;
+ border-radius: 2px;
+ left: calc(50% - 3px);
+ transition: left 0.12s ease;
+ }
+ .jog-slider:hover .jog-thumb { background: #aaa; }
.synth-grid input[type="number"]:focus { border-color: #666; outline: none; }
.synth-section {
border-top: 1px solid #444;
@@ -362,6 +399,10 @@
playBtn.disabled = false;
setStatus('Computing STFT cache...', 'info');
+ // Reset partials from previous file
+ extractedPartials = null;
+ editor.setPartials(null);
+
setTimeout(() => {
const signal = audioBuffer.getChannelData(0);
stftCache = new STFTCache(signal, audioBuffer.sampleRate, fftSize, Math.max(64, parseInt(hopSize.value) || 64));
@@ -458,7 +499,9 @@
setStatus(`Extracted ${result.partials.length} partials`, 'info');
viewer.setPartials(result.partials);
viewer.setKeepCount(getKeepCount());
- viewer.selectPartial(-1);
+ // Refresh panels: re-select if index still valid, else clear
+ const prevSel = viewer.selectedPartial;
+ viewer.selectPartial(prevSel >= 0 && prevSel < result.partials.length ? prevSel : -1);
} catch (err) {
setStatus('Extraction error: ' + err.message, 'error');