Skip to content

Commit 89556a4

Browse files
committed
updated to v2.10, updated docs, updated multiEval
1 parent b0798a9 commit 89556a4

File tree

8 files changed

+240
-111
lines changed

8 files changed

+240
-111
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,32 @@
2323

2424
# 👾 Newest features
2525

26+
## multiEval
27+
28+
Evaluate a function for all the possible combinations of the arguments provided up to the least common multiple of the list lengths. A very powerful feature to quickly calculate long generative pieces out of a single function.
29+
30+
```js
31+
// 3x the euclidean algorithm, like:
32+
// join(euclid(8, 5), euclid(8, 7), euclid(8, 3))
33+
Util.multiEval(Algo.euclid, 8, [5, 7, 3])
34+
// [
35+
// 1, 0, 1, 1, 0, 1, 1, 0,
36+
// 1, 1, 1, 1, 1, 1, 1, 0,
37+
// 1, 0, 0, 1, 0, 0, 1, 0
38+
// ]
39+
40+
// 3x the spread function like:
41+
// join(spread(5, 0, 12), spread(3, 0, 24), spread(8, 0, 12),
42+
// spread(5, 0, 24), spread(3, 0, 12), spread(8, 0, 24))
43+
Util.multiEval(Gen.spread, [5, 3, 8], 0, [12, 24])
44+
// [
45+
// 0, 2, 4, 7, 9, 0, 8, 16, 0,
46+
// 1, 3, 4, 6, 7, 9, 10, 0, 4,
47+
// 9, 14, 19, 0, 4, 8, 0, 3, 6,
48+
// 9, 12, 15, 18, 21
49+
// ]
50+
```
51+
2652
## Binary & Spacing
2753

2854
Generative rhythmical patterns of 1's and 0's by converting a number to binary or using the integer value as spacing between onsets

build/ts.bundle.js

Lines changed: 101 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)