Include fader filters for LPF and HPF if archived samples are included
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user