diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-18 15:46:59 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-18 15:46:59 +0100 |
| commit | 7a054e8ee8566eea9d06ff1ff9c1ce48c39fe659 (patch) | |
| tree | 30ee1013f398cc565139d67c2613200dbbebca6f /tools/mq_editor/mq_extract.js | |
| parent | 02dd7799396ebe3b5c3764796cfa3cbc72b72110 (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor/mq_extract.js')
| -rw-r--r-- | tools/mq_editor/mq_extract.js | 15 |
1 files changed, 7 insertions, 8 deletions
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(); |
