strudel icon indicating copy to clipboard operation
strudel copied to clipboard

Mini notation: add dot sub-cycles

Open eilseq opened this issue 2 years ago • 0 comments

This pull request add the dot sub-cycles mini notation to the related package. Equivalent to existing [ ] behaviour. Expected behaviour monitored by tests is:

assert.deepStrictEqual(minS('c3 [d3 e3]'), ['c3: 0 - 1/2', 'd3: 1/2 - 3/4', 'e3: 3/4 - 1']);
assert.deepStrictEqual(minS('c3 [d3 [e3 f3]]'), ['c3: 0 - 1/2', 'd3: 1/2 - 3/4', 'e3: 3/4 - 7/8', 'f3: 7/8 - 1']);
assert.deepStrictEqual(minS('c3 . d3 e3'), ['c3: 0 - 1/2', 'd3: 1/2 - 3/4', 'e3: 3/4 - 1']);
assert.deepStrictEqual(minS('c3 d3 [e3 f3]'), ['c3: 0 - 1/3', 'd3: 1/3 - 2/3', 'e3: 2/3 - 5/6', 'f3: 5/6 - 1']);
assert.deepStrictEqual(minS('c3 . d3 . e3 f3'), ['c3: 0 - 1/3', 'd3: 1/3 - 2/3', 'e3: 2/3 - 5/6', 'f3: 5/6 - 1']);

eilseq avatar Apr 12 '22 10:04 eilseq