change behaviour of polymeter, and remove polymeterSteps (#1302)

* change behaviour of polymeter, and remove polymeterSteps

* format
This commit is contained in:
Alex McLean 2025-03-04 18:17:37 +00:00 committed by GitHub
parent 86333ab6f6
commit b15843f3a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 53 additions and 105 deletions

View file

@ -22,7 +22,6 @@ import {
sequence,
palindrome,
polymeter,
polymeterSteps,
polyrhythm,
silence,
fast,
@ -611,17 +610,10 @@ describe('Pattern', () => {
});
describe('polymeter()', () => {
it('Can layer up cycles, stepwise, with lists', () => {
expect(polymeterSteps(3, ['d', 'e']).firstCycle()).toStrictEqual(
fastcat(pure('d'), pure('e'), pure('d')).firstCycle(),
);
expect(polymeter(['a', 'b', 'c'], ['d', 'e']).fast(2).firstCycle()).toStrictEqual(
stack(sequence('a', 'b', 'c', 'a', 'b', 'c'), sequence('d', 'e', 'd', 'e', 'd', 'e')).firstCycle(),
);
});
it('Can layer up cycles, stepwise, with weighted patterns', () => {
sameFirst(polymeterSteps(3, sequence('a', 'b')).fast(2), sequence('a', 'b', 'a', 'b', 'a', 'b'));
});
});
describe('firstOf()', () => {