diff options
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(); |
