From 65cd99553cd688c5ad2cfd64d79c6434fe694a33 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 18 Feb 2026 06:29:13 +0100 Subject: feat(mq_editor): validated dual-sine synthesis pipeline, clean code for real audio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix incoherent per-sample jitter/spread: seed by partial index only - Fix || fallback for zero-valued params (use != null checks) - Phase integration: accumulator (2π*f/SR per sample) replaces 2π*f*t - Add 'Integrate phase' checkbox to toggle between modes - Revert Catmull-Rom back to simple bezier (1/3, 2/3 sample points) - Remove all debug logging, clean up trackPartials, fitBezier handoff(Gemini): dual-sine test validates full MQ pipeline (extract→track→synth). Next: real audio loading and partial detection improvements. Co-Authored-By: Claude Sonnet 4.6 --- tools/mq_editor/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/mq_editor/index.html') diff --git a/tools/mq_editor/index.html b/tools/mq_editor/index.html index 22f8ff9..b51a988 100644 --- a/tools/mq_editor/index.html +++ b/tools/mq_editor/index.html @@ -85,6 +85,8 @@ + + 100% @@ -336,7 +338,8 @@ const keepCount = Math.max(1, Math.ceil(extractedPartials.length * parseInt(keepPct.value) / 100)); const partialsToUse = extractedPartials.slice(0, keepCount); setStatus(`Synthesizing ${keepCount}/${extractedPartials.length} partials (${keepPct.value}%)...`, 'info'); - const pcm = synthesizeMQ(partialsToUse, sampleRate, duration); + const integratePhase = document.getElementById('integratePhase').checked; + const pcm = synthesizeMQ(partialsToUse, sampleRate, duration, integratePhase); // Build STFT cache for synth signal (for FFT comparison via key 'a') if (viewer) { -- cgit v1.2.3