fix striate: union -> set
This commit is contained in:
parent
c305e82f5c
commit
8e441ecb19
2 changed files with 9 additions and 1 deletions
|
|
@ -499,7 +499,7 @@ export class Pattern {
|
||||||
const slices = Array.from({ length: n }, (x, i) => i);
|
const slices = Array.from({ length: n }, (x, i) => i);
|
||||||
const slice_objects = slices.map((i) => ({ begin: i / n, end: (i + 1) / n }));
|
const slice_objects = slices.map((i) => ({ begin: i / n, end: (i + 1) / n }));
|
||||||
const slicePat = slowcat(...slice_objects);
|
const slicePat = slowcat(...slice_objects);
|
||||||
return this.union(slicePat)._fast(n);
|
return this.set(slicePat)._fast(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
// cpm = cycles per minute
|
// cpm = cycles per minute
|
||||||
|
|
|
||||||
|
|
@ -709,6 +709,14 @@ describe('Pattern', function () {
|
||||||
assert.equal(sequence(1, 2, 3).ply(2).early(8).firstCycle().length, 6);
|
assert.equal(sequence(1, 2, 3).ply(2).early(8).firstCycle().length, 6);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('striate', () => {
|
||||||
|
it('Can striate(2)', () => {
|
||||||
|
sameFirst(
|
||||||
|
sequence({ sound: 'a' }).striate(2),
|
||||||
|
sequence({ sound: 'a', begin: 0, end: 0.5 }, { sound: 'a', begin: 0.5, end: 1 }),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
describe('chop', () => {
|
describe('chop', () => {
|
||||||
it('Can _chop(2)', () => {
|
it('Can _chop(2)', () => {
|
||||||
assert.deepStrictEqual(
|
assert.deepStrictEqual(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue