diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-18 06:29:13 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-18 06:29:13 +0100 |
| commit | 65cd99553cd688c5ad2cfd64d79c6434fe694a33 (patch) | |
| tree | 4981b41f7dee72cdd6bf60789f1fa8383c5190e2 /tools/mq_editor/index.html | |
| parent | bf3929220be7eddf32cebe12573b870fc9b54997 (diff) | |
feat(mq_editor): validated dual-sine synthesis pipeline, clean code for real audio
- 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 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor/index.html')
| -rw-r--r-- | tools/mq_editor/index.html | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ <label>Threshold (dB):</label> <input type="number" id="threshold" value="-60" step="any"> + <label style="margin-left:16px;"><input type="checkbox" id="integratePhase" checked> Integrate phase</label> + <label style="margin-left:16px;">Keep:</label> <input type="range" id="keepPct" min="1" max="100" value="100" style="width:100px; vertical-align:middle;"> <span id="keepPctLabel" style="margin-left:4px;">100%</span> @@ -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) { |
