Update test structure for MIDI event handling and project data
This commit is contained in:
@@ -131,6 +131,11 @@ test('routes each source curve only to its matching pad clip, including MIDI-onl
|
||||
const source1 = midiEvent(48, 1, 60);
|
||||
const source2 = midiEvent(72, 2, 90);
|
||||
const params = faderParams();
|
||||
const events = [source0, source1, source2].map((event) => ({
|
||||
type: 'midi' as const,
|
||||
kind: PatternEventKind.Midi,
|
||||
...event,
|
||||
}));
|
||||
const project = {
|
||||
pads: {
|
||||
a: [pad('a', 0), pad('a', 1), pad('a', 2)],
|
||||
@@ -140,7 +145,10 @@ test('routes each source curve only to its matching pad clip, including MIDI-onl
|
||||
},
|
||||
scenes: [
|
||||
{
|
||||
number: 1,
|
||||
name: '01',
|
||||
patternNumbers: { a: 1, b: 0, c: 0, d: 0 },
|
||||
timeSignature: { numerator: 4, denominator: 4 },
|
||||
patterns: [
|
||||
{ pad: 'a0', group: 'a', notes: [], bars: 1 },
|
||||
{ pad: 'a1', group: 'a', notes: [], bars: 1 },
|
||||
@@ -152,15 +160,22 @@ test('routes each source curve only to its matching pad clip, including MIDI-onl
|
||||
patternNumber: 1,
|
||||
bars: 1,
|
||||
recordCount: 3,
|
||||
events: [source0, source1, source2].map((event) => ({
|
||||
type: 'midi' as const,
|
||||
kind: PatternEventKind.Midi,
|
||||
...event,
|
||||
})),
|
||||
events,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
groupPatterns: [
|
||||
{
|
||||
group: 'a',
|
||||
patternNumber: 1,
|
||||
bars: 1,
|
||||
recordCount: 3,
|
||||
events,
|
||||
notes: { 0: [], 1: [], 2: [] },
|
||||
},
|
||||
],
|
||||
songPositions: [],
|
||||
settings: {
|
||||
bpm: 120,
|
||||
scale: 0,
|
||||
@@ -190,8 +205,8 @@ test('routes each source curve only to its matching pad clip, including MIDI-onl
|
||||
assert.deepEqual(
|
||||
result.tracks.map((track) => [
|
||||
track.padCode,
|
||||
track.lane?.clips[0].notes.length,
|
||||
track.lane?.clips[0].midiEvents.map((event) => event.data[1]),
|
||||
track.lane?.sessionClips[0].notes.length,
|
||||
track.lane?.sessionClips[0].midiEvents.map((event) => event.data[1]),
|
||||
]),
|
||||
[
|
||||
['a0', 0, [30]],
|
||||
|
||||
Reference in New Issue
Block a user