timeCat seems to work
This commit is contained in:
parent
f5fb5857df
commit
5b8c34e504
2 changed files with 22 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ import Fraction from 'fraction.js'
|
|||
|
||||
import { strict as assert } from 'assert';
|
||||
|
||||
import {TimeSpan, Hap, Pattern, pure, stack, fastcat, slowcat, cat, sequence, polyrhythm, silence, fast} from "../strudel.mjs";
|
||||
import {TimeSpan, Hap, Pattern, pure, stack, fastcat, slowcat, cat, sequence, polyrhythm, silence, fast, timeCat} from "../strudel.mjs";
|
||||
//import { Time } from 'tone';
|
||||
import pkg from 'tone';
|
||||
const { Time } = pkg;
|
||||
|
|
@ -224,4 +224,12 @@ describe('Pattern', function() {
|
|||
)
|
||||
})
|
||||
})
|
||||
describe('timeCat()', function() {
|
||||
it('Can concatenate patterns with different relative durations', function() {
|
||||
assert.deepStrictEqual(
|
||||
sequence("a", ["a", "a"]).firstCycle,
|
||||
timeCat([1,"a"], [0.5, "a"], [0.5, "a"]).firstCycle
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue