Feature: Implement device ID assignment utility and apply it to build processes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { assignDeviceListIds } from '../src/lib/exporters/ableton/builders';
|
||||
import abletonTransformer, { AblTrack, getDrumRackMidiNote } from '../src/lib/transformers/ableton';
|
||||
import {
|
||||
EffectType,
|
||||
@@ -144,6 +145,15 @@ function trackShape(tracks: AblTrack[]) {
|
||||
}));
|
||||
}
|
||||
|
||||
test('assigns IDs to every device-list member, including nested rack devices', () => {
|
||||
const devices = [{ OriginalSimpler: {} }, { AutoFilter: {} }];
|
||||
|
||||
assignDeviceListIds(devices);
|
||||
|
||||
assert.equal(devices[0].OriginalSimpler['@Id'], 0);
|
||||
assert.equal(devices[1].AutoFilter['@Id'], 1);
|
||||
});
|
||||
|
||||
test('automatically builds a per-group rack without flattening chromatic pads', () => {
|
||||
const result = abletonTransformer(project(), {
|
||||
includeArchivedSamples: true,
|
||||
|
||||
Reference in New Issue
Block a user