Update Ableton exporter logic and fix test assertions

This commit is contained in:
2026-07-14 07:58:32 +02:00
parent b4517ac2d9
commit 69d5c545c7
2 changed files with 10 additions and 15 deletions

View File

@@ -228,7 +228,8 @@ function trackAutomationTargets(midiTrack: any, includeArrangementMixer: boolean
const staticPitchValue = koTrack.faderParams[FaderParam.PTC];
const staticPitchOffset =
staticPitchValue === -1 ? 0 : Math.round((staticPitchValue - 0.5) * 10);
pitchTarget.valueOffset = Number(simpler.Pitch.TransposeKey.Manual['@Value']) - staticPitchOffset;
pitchTarget.valueOffset =
Number(simpler.Pitch.TransposeKey.Manual['@Value']) - staticPitchOffset;
addTarget(targets, FaderParam.PTC, pitchTarget);
addTarget(targets, FaderParam.TUNE, targetFor(simpler.Pitch.TransposeFine));
addTarget(
@@ -385,9 +386,7 @@ async function buildMidiClip(
midiClip.Notes.NoteIdGenerator.NextId['@Value'] = _noteId;
const clipEnvelopes =
abletonVersion === '10'
? buildMidiClipEnvelopes(koClip.midiEvents, midiControllerTargets)
: [];
abletonVersion === '10' ? buildMidiClipEnvelopes(koClip.midiEvents, midiControllerTargets) : [];
if (clipForLauncher && koTrack) {
clipEnvelopes.push(
...buildClipEnvelopes(koClip.groupPattern, automationTargets, koTrack, false),
@@ -641,8 +640,7 @@ async function buildDrumRackDevice(koTrack: AblTrack, abletonVersion: AbletonVer
drumBranch.Name.EffectiveName['@Value'] = subtrack.name;
drumBranch.Name.UserName['@Value'] = subtrack.name;
drumBranch.BranchInfo.ReceivingNote['@Value'] = note;
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.MixerDevice.Volume.Manual['@Value'] = subtrack.volume;
drumBranch.DeviceChain.MidiToAudioDeviceChain.Devices = await buildSimplerDevice(