Update device builder logic for Drum Rack to include lock IDs
This commit is contained in:
@@ -636,12 +636,8 @@ async function buildDrumRackDevice(koTrack: AblTrack, abletonVersion: AbletonVer
|
||||
|
||||
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';
|
||||
device.LockId['@Value'] = 0;
|
||||
device.LockSeal['@Value'] = 0;
|
||||
|
||||
for (const [idx, subtrack] of koTrack.tracks.entries()) {
|
||||
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
|
||||
|
||||
drumBranch['@Id'] = idx;
|
||||
drumBranch.IsSelected['@Value'] = device.Branches.DrumBranch.length === 0 ? 'true' : 'false';
|
||||
drumBranch.Name.EffectiveName['@Value'] = subtrack.name;
|
||||
drumBranch.Name.UserName['@Value'] = subtrack.name;
|
||||
drumBranch.BranchInfo.ReceivingNote['@Value'] = note;
|
||||
|
||||
Reference in New Issue
Block a user