diff --git a/src/lib/exporters/ableton/builders.ts b/src/lib/exporters/ableton/builders.ts index 292a340..ed92208 100644 --- a/src/lib/exporters/ableton/builders.ts +++ b/src/lib/exporters/ableton/builders.ts @@ -583,6 +583,25 @@ async function buildTrack( ); } + if (exporterParams.includeArchivedSamples) { + for (const parameter of [FaderParam.LPF, FaderParam.HPF] as const) { + const staticValue = koTrack.faderParams[parameter]; + const defaultValue = parameter === FaderParam.LPF ? 1 : 0; + const hasAutomation = groupLane?.patterns.some((pattern) => + pattern.faderAutomation.some((point) => point.parameter === parameter), + ); + if (hasAutomation || (staticValue !== -1 && staticValue !== defaultValue)) { + midiTrack.DeviceChain.DeviceChain.Devices['#'].push( + await buildFaderFilterDevice( + parameter, + staticValue === -1 ? defaultValue : staticValue, + abletonVersion, + ), + ); + } + } + } + // make sure id's are sequential in device chain midiTrack.DeviceChain.DeviceChain.Devices['#'].forEach((device, deviceIdx) => { Object.values(device).forEach((devContent: any) => {