diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-18 16:22:54 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-18 16:22:54 +0100 |
| commit | bc07ea00a9f2f418e6b460884c3925b72ff2a358 (patch) | |
| tree | 01b297108d78d42a3f1ddefe6ff3e5ba8aa0dea3 /tools/mq_editor/mq_extract.js | |
| parent | e6605b8d30d1e284f317313421e8f46af48640e6 (diff) | |
refactor(mq_editor): unify freq+amp into single bezier curve
freqCurve now carries a0-a3 (amplitude control values) alongside
v0-v3 (frequency). Both components share the same t0-t3 time
parameterization. evalBezierAmp() added to utils.js.
ampCurve removed from partials and synth pipeline.
Amp panel drag now changes only a_i; t is read-only (shared with freq).
handoff(Claude): unified freq/amp bezier done
Diffstat (limited to 'tools/mq_editor/mq_extract.js')
| -rw-r--r-- | tools/mq_editor/mq_extract.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/mq_editor/mq_extract.js b/tools/mq_editor/mq_extract.js index 107b2ac..97191e2 100644 --- a/tools/mq_editor/mq_extract.js +++ b/tools/mq_editor/mq_extract.js @@ -22,7 +22,9 @@ function extractPartials(params, stftCache) { for (const partial of partials) { partial.freqCurve = fitBezier(partial.times, partial.freqs); - partial.ampCurve = fitBezier(partial.times, partial.amps); + const ac = fitBezier(partial.times, partial.amps); + partial.freqCurve.a0 = ac.v0; partial.freqCurve.a1 = ac.v1; + partial.freqCurve.a2 = ac.v2; partial.freqCurve.a3 = ac.v3; } return {partials, frames}; |
