From ab6b318da8aca28b249bd4b2a1a154ba144865b9 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Jul 2026 11:49:34 +0200 Subject: [PATCH] Fix type casting issue when calculating static fader values --- src/lib/exporters/ableton/builders.ts | 5 +---- tests/ableton-automation.test.ts | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lib/exporters/ableton/builders.ts b/src/lib/exporters/ableton/builders.ts index 9f7adbd..e20759d 100644 --- a/src/lib/exporters/ableton/builders.ts +++ b/src/lib/exporters/ableton/builders.ts @@ -643,10 +643,7 @@ async function buildTrack( if (exporterParams.includeArchivedSamples) { for (const parameter of [FaderParam.LPF, FaderParam.HPF] as const) { - const staticValue = canonicalizeFilterFaderValue( - parameter, - koTrack.faderParams[parameter], - ); + const staticValue = canonicalizeFilterFaderValue(parameter, koTrack.faderParams[parameter]); const defaultValue = getFaderDefaultValue(parameter); const hasAutomation = automatedParameters.has(parameter); if (hasAutomation || (staticValue !== -1 && staticValue !== defaultValue)) { diff --git a/tests/ableton-automation.test.ts b/tests/ableton-automation.test.ts index 24e126e..a773b16 100644 --- a/tests/ableton-automation.test.ts +++ b/tests/ableton-automation.test.ts @@ -61,9 +61,7 @@ test('scales P07-like note velocities with static and automated VEL values', () ...occurrence.faderParams, [FaderParam.VEL]: 0.5325199961662292, }, - faderAutomation: [ - { parameter: FaderParam.VEL, position: 192, value: 0.25, flags: 0 }, - ], + faderAutomation: [{ parameter: FaderParam.VEL, position: 192, value: 0.25, flags: 0 }], }; assert.deepEqual(