From 8ee51daea7b08bcdc4d7c7338a70e20244b41cb9 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Jul 2026 11:49:53 +0200 Subject: [PATCH] Test: Canonicalize filter base before automation starts and exclude research parameters from envelopes --- tests/ableton-automation.test.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/ableton-automation.test.ts b/tests/ableton-automation.test.ts index a773b16..e04c8cc 100644 --- a/tests/ableton-automation.test.ts +++ b/tests/ableton-automation.test.ts @@ -125,6 +125,26 @@ test('does not create Session envelopes without recorded parameter events', () = assert.deepEqual(envelopes, []); }); +test('canonicalizes an effectively-open filter base before automation starts', () => { + const filterOccurrence = { + ...occurrence, + faderParams: { + ...occurrence.faderParams, + [FaderParam.LPF]: 0.9996299743652344, + }, + faderAutomation: [{ parameter: FaderParam.LPF, position: 96, value: 0.5, flags: 0 }], + }; + const envelopes = buildClipEnvelopes( + filterOccurrence, + { [FaderParam.LPF]: [{ session: 23000 }] }, + track, + false, + ); + + assert.equal(envelopes[0].Automation.Events.FloatEvent[0]['@Value'], 123.5); + assert.equal(envelopes[0].Automation.Events.FloatEvent[1]['@Value'], 123.5); +}); + test('keeps research-only group parameters out of Live target envelopes', () => { const researchOccurrence = { ...occurrence,