From db5c023acd237d7015933bd21a5a6dbe5755841d Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 19 Feb 2026 00:00:06 +0100 Subject: fix(mq_editor): fuse spread_above/below into single spread param Asymmetric spread offset the pitch center. Replace with a single symmetric `spread` in harmonics config. autodetectSpread now returns max(above, below). Update all defaults, UI, comments, and README. handoff(Gemini): spread is now a single param; no compat shims. Co-Authored-By: Claude Sonnet 4.6 --- tools/mq_editor/viewer.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/mq_editor/viewer.js') diff --git a/tools/mq_editor/viewer.js b/tools/mq_editor/viewer.js index 1ed609c..c841acb 100644 --- a/tools/mq_editor/viewer.js +++ b/tools/mq_editor/viewer.js @@ -304,12 +304,11 @@ class SpectrogramViewer { const {ctx} = this; const curve = partial.freqCurve; const harm = partial.harmonics || {}; - const sa = harm.spread_above != null ? harm.spread_above : 0.02; - const sb = harm.spread_below != null ? harm.spread_below : 0.02; + const spread = harm.spread != null ? harm.spread : 0.02; const decay = harm.decay != null ? harm.decay : 0.0; const freqMult = harm.freq_mult != null ? harm.freq_mult : 2.0; - const {upper, lower} = buildBandPoints(this, curve, sa, sb); + const {upper, lower} = buildBandPoints(this, curve, spread, spread); if (upper.length < 2) return; const savedAlpha = ctx.globalAlpha; @@ -379,7 +378,7 @@ class SpectrogramViewer { } // Spread band fill + boundary dashes - const {upper: hu, lower: hl} = buildBandPoints(this, curve, sa, sb, hRatio); + const {upper: hu, lower: hl} = buildBandPoints(this, curve, spread, spread, hRatio); if (hu.length >= 2) { ctx.beginPath(); ctx.moveTo(hu[0][0], hu[0][1]); -- cgit v1.2.3