Update device builder logic for Drum Rack to include lock IDs

This commit is contained in:
2026-07-14 08:40:38 +02:00
parent 0e62cd4c95
commit 0f19b318ad

View File

@@ -636,12 +636,8 @@ async function buildDrumRackDevice(koTrack: AblTrack, abletonVersion: AbletonVer
device.Branches.DrumBranch = []; device.Branches.DrumBranch = [];
device.ReturnBranches = {}; device.ReturnBranches = {};
device.LastPresetRef.Value = {}; device.LockId['@Value'] = 0;
device.ShouldShowPresetName['@Value'] = 'false'; device.LockSeal['@Value'] = 0;
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) {
@@ -656,6 +652,7 @@ async function buildDrumRackDevice(koTrack: AblTrack, abletonVersion: AbletonVer
const note = 92 - drumPad; // 92 is the number of slot for C1 in the drum rack and it goes down const note = 92 - drumPad; // 92 is the number of slot for C1 in the drum rack and it goes down
drumBranch['@Id'] = idx; drumBranch['@Id'] = idx;
drumBranch.IsSelected['@Value'] = device.Branches.DrumBranch.length === 0 ? 'true' : 'false';
drumBranch.Name.EffectiveName['@Value'] = subtrack.name; drumBranch.Name.EffectiveName['@Value'] = subtrack.name;
drumBranch.Name.UserName['@Value'] = subtrack.name; drumBranch.Name.UserName['@Value'] = subtrack.name;
drumBranch.BranchInfo.ReceivingNote['@Value'] = note; drumBranch.BranchInfo.ReceivingNote['@Value'] = note;