fix fastgap for events that go across cycle boundaries (#225)
This commit is contained in:
parent
b7b576e38b
commit
a5bf8f6732
2 changed files with 18 additions and 6 deletions
|
|
@ -372,6 +372,11 @@ describe('Pattern', () => {
|
|||
sequence(['a', 'b', 'c'], silence, ['a', 'b', 'c'], silence).firstCycle(),
|
||||
);
|
||||
});
|
||||
it('copes with breaking up events across cycles', () => {
|
||||
expect(pure('a').slow(2)._fastGap(2)._setContext({}).query(st(0, 2))).toStrictEqual(
|
||||
[hap(ts(0, 1), ts(0, 0.5), 'a'), hap(ts(0.5, 1.5), ts(1, 1.5), 'a')]
|
||||
);
|
||||
});
|
||||
});
|
||||
describe('_compressSpan()', () => {
|
||||
it('Can squash cycles of a pattern into a given timespan', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue