diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-18 18:12:48 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-18 18:12:48 +0100 |
| commit | c5ee9ed388013133fe1e028c403370242c558e2d (patch) | |
| tree | e86d07941c74b9953bf6f9c8e7203848b05ade0e /tools/mq_editor/viewer.js | |
| parent | d73414c6d42fbec2666cb24b65b1f597b335c1e9 (diff) | |
feat(mq_editor): add iso-contour tracking mode for bass/diffuse regions
trackIsoContour() follows constant energy level through STFT frames
instead of peaks. Useful for broad bass areas where peak detector finds
nothing. Preview in cyan, auto-detects spread on commit (naturally large).
Toggle: ≋ Contour button or C key. Mutually exclusive with ⊕ Explore.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor/viewer.js')
| -rw-r--r-- | tools/mq_editor/viewer.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/mq_editor/viewer.js b/tools/mq_editor/viewer.js index 8f97c3b..c69d9e7 100644 --- a/tools/mq_editor/viewer.js +++ b/tools/mq_editor/viewer.js @@ -384,7 +384,9 @@ class SpectrogramViewer { const h = this.cursorCanvas.height; ctx.clearRect(0, 0, this.cursorCanvas.width, h); if (x < 0) return; - ctx.strokeStyle = this.exploreMode ? 'rgba(255,160,0,0.8)' : 'rgba(255,60,60,0.7)'; + ctx.strokeStyle = this.exploreMode === 'contour' ? 'rgba(0,220,220,0.8)' + : this.exploreMode ? 'rgba(255,160,0,0.8)' + : 'rgba(255,60,60,0.7)'; ctx.lineWidth = 1; ctx.beginPath(); ctx.moveTo(x, 0); @@ -410,11 +412,12 @@ class SpectrogramViewer { _drawPreviewPartial(ctx, partial) { const curve = partial.freqCurve; if (!curve) return; + const col = this.exploreMode === 'contour' ? '0,220,220' : '255,160,0'; ctx.save(); - ctx.strokeStyle = 'rgba(255,160,0,0.9)'; + ctx.strokeStyle = `rgba(${col},0.9)`; ctx.lineWidth = 2; ctx.setLineDash([6, 3]); - ctx.shadowColor = 'rgba(255,160,0,0.5)'; + ctx.shadowColor = `rgba(${col},0.5)`; ctx.shadowBlur = 6; ctx.beginPath(); let started = false; |
