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,