Update Ableton export builders and tests to handle new device properties (ReturnBranches, SendInfos)

This commit is contained in:
2026-07-14 08:29:34 +02:00
parent 2a61057fce
commit f17077b507
2 changed files with 10 additions and 0 deletions

View File

@@ -635,6 +635,13 @@ async function buildDrumRackDevice(koTrack: AblTrack, abletonVersion: AbletonVer
const device = structuredClone(drumRackTemplate.DrumGroupDevice); const device = structuredClone(drumRackTemplate.DrumGroupDevice);
device.Branches.DrumBranch = []; device.Branches.DrumBranch = [];
device.ReturnBranches = {};
device.LastPresetRef.Value = {};
device.ShouldShowPresetName['@Value'] = 'false';
device.UserName['@Value'] = '';
device.Annotation['@Value'] = '';
device.IsReturnBranchesListVisible['@Value'] = 'false';
device.AreSendsVisible['@Value'] = 'false';
for (const [idx, subtrack] of koTrack.tracks.entries()) { for (const [idx, subtrack] of koTrack.tracks.entries()) {
if (!subtrack.sampleName) { if (!subtrack.sampleName) {
@@ -655,6 +662,7 @@ async function buildDrumRackDevice(koTrack: AblTrack, abletonVersion: AbletonVer
drumBranch.BranchInfo.SendingNote['@Value'] = subtrack.drumRackSendingNote ?? subtrack.rootNote; // not sure if this matters drumBranch.BranchInfo.SendingNote['@Value'] = subtrack.drumRackSendingNote ?? subtrack.rootNote; // not sure if this matters
drumBranch.BranchInfo.ChokeGroup['@Value'] = subtrack.inChokeGroup ? 1 : 0; drumBranch.BranchInfo.ChokeGroup['@Value'] = subtrack.inChokeGroup ? 1 : 0;
drumBranch.MixerDevice.Volume.Manual['@Value'] = subtrack.volume; drumBranch.MixerDevice.Volume.Manual['@Value'] = subtrack.volume;
drumBranch.MixerDevice.SendInfos = {};
const branchDevices = await buildSimplerDevice(subtrack, abletonVersion); const branchDevices = await buildSimplerDevice(subtrack, abletonVersion);
assignDeviceListIds([branchDevices]); assignDeviceListIds([branchDevices]);
drumBranch.DeviceChain.MidiToAudioDeviceChain.Devices = branchDevices; drumBranch.DeviceChain.MidiToAudioDeviceChain.Devices = branchDevices;

View File

@@ -181,6 +181,8 @@ test('serializes every nested Live 10 Simpler as an identified list member', asy
assert.ok(simplerTags.length > 0); assert.ok(simplerTags.length > 0);
assert.ok(simplerTags.every((tag) => /\sId="\d+"/.test(tag))); assert.ok(simplerTags.every((tag) => /\sId="\d+"/.test(tag)));
assert.doesNotMatch(xml, /<ReturnBranch\s/);
assert.doesNotMatch(xml, /<AudioBranchSendInfo\s/);
} finally { } finally {
await server.close(); await server.close();
} }