Include fader filters for LPF and HPF if archived samples are included

This commit is contained in:
2026-07-13 05:29:51 +02:00
parent 75c2ca65aa
commit 6483e78a8e

View File

@@ -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) => {