From c5ee9ed388013133fe1e028c403370242c558e2d Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 18 Feb 2026 18:12:48 +0100 Subject: feat(mq_editor): add iso-contour tracking mode for bass/diffuse regions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tools/mq_editor/viewer.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools/mq_editor/viewer.js') 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; -- cgit v1.2.3