From 7a054e8ee8566eea9d06ff1ff9c1ce48c39fe659 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 18 Feb 2026 15:46:59 +0100 Subject: feat(mq_editor): expose tracking params in UI with grouped param panel Reorganize extraction parameters into four labeled groups (STFT / Peak Detection / Tracking / Filter). Expose Birth, Death, Phase Wt and Min Len as live controls wired to runExtraction(). All labels carry tooltip descriptions. mq_extract.js now reads these from params instead of hardcoded constants (same defaults preserved). handoff(Claude): tracking params exposed, panel grouped, README updated. Co-Authored-By: Claude Sonnet 4.6 --- tools/mq_editor/mq_extract.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tools/mq_editor/mq_extract.js') diff --git a/tools/mq_editor/mq_extract.js b/tools/mq_editor/mq_extract.js index c084b43..3f7490d 100644 --- a/tools/mq_editor/mq_extract.js +++ b/tools/mq_editor/mq_extract.js @@ -104,20 +104,19 @@ function normalizeAngle(angle) { // Track partials across frames using phase coherence for robust matching. function trackPartials(frames, params) { - const { sampleRate, hopSize } = params; + const { + sampleRate, hopSize, + birthPersistence = 3, + deathAge = 5, + minLength = 10, + phaseErrorWeight = 2.0 + } = params; const partials = []; const activePartials = []; const candidates = []; // pre-birth const trackingRatio = 0.05; // 5% frequency tolerance const minTrackingHz = 20; - const birthPersistence = 3; // frames before partial is born - const deathAge = 5; // frames without match before death - const minLength = 10; // frames required to keep partial - - // Weight phase error heavily in cost function, scaled by frequency. - // This makes phase deviation more significant for high-frequency partials. - const phaseErrorWeight = 2.0; for (const frame of frames) { const matched = new Set(); -- cgit v1.2.3