fix drawLine polyrhythm
This commit is contained in:
parent
58a936cf33
commit
283e5fde69
2 changed files with 9 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { fastcat, stack, slowcat, silence } from '../pattern.mjs';
|
||||
import { fastcat, stack, slowcat, silence, pure } from '../pattern.mjs';
|
||||
import { strict as assert } from 'assert';
|
||||
import drawLine from '../drawLine.mjs';
|
||||
|
||||
|
|
@ -16,6 +16,10 @@ describe('drawLine', () => {
|
|||
it('supports unequal silence', () => {
|
||||
assert.equal(drawLine(fastcat(0, silence, [1, 2]), 10), '|0-..12|0-..12');
|
||||
});
|
||||
it('supports polyrhythms', () => {
|
||||
'0*2 1*3';
|
||||
assert.equal(drawLine(fastcat(pure(0).fast(2), pure(1).fast(3)), 10), '|0--0--1-1-1-');
|
||||
});
|
||||
it('supports multiple lines', () => {
|
||||
assert.equal(
|
||||
drawLine(fastcat(0, stack(1, 2)), 10),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue