This commit is contained in:
Felix Roos
2022-03-23 18:18:20 +01:00
parent 68b5fc40f6
commit 2441e70153
5 changed files with 61 additions and 4 deletions
@@ -42144,6 +42144,10 @@ parcelHelpers.export(exports, "invert", ()=>invert
);
parcelHelpers.export(exports, "inv", ()=>inv
);
parcelHelpers.export(exports, "id", ()=>id
);
parcelHelpers.export(exports, "range", ()=>range
);
var _fractionMjs = require("./fraction.mjs");
var _fractionMjsDefault = parcelHelpers.interopDefault(_fractionMjs);
var _ramda = require("ramda"); // will remove this as soon as compose is implemented here
@@ -42156,6 +42160,11 @@ const flatten = (arr)=>[].concat(...arr)
;
const id = (a)=>a
;
const range = (min, max)=>Array.from({
length: max - min + 1
}, (_, i)=>i + min
)
;
function curry(func, overload) {
const fn = function curried(...args) {
if (args.length >= func.length) return func.apply(this, args);
@@ -42818,6 +42827,18 @@ class Pattern {
return this.stack(...funcs.map((func)=>func(this)
));
}
stutWith(times, time, func) {
return stack(...range(0, times - 1).map((i)=>func(this.late(i * time), i)
));
}
stut(times, feedback, time) {
return this.stutWith(times, time, (pat, i)=>pat.velocity(Math.pow(feedback, i))
);
}
iter(times) {
return slowcat(...range(0, times - 1).map((i)=>this.early(i / times)
));
}
edit(...funcs) {
return stack(...funcs.map((func)=>func(this)
));
@@ -183306,4 +183327,4 @@ exports.default = cx;
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["3uVTb"], "3uVTb", "parcelRequire94c2")
//# sourceMappingURL=index.7cec804e.js.map
//# sourceMappingURL=index.95a69858.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,6 +11,6 @@
<body>
<div id="root"></div>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="/tutorial/index.7cec804e.js" defer=""></script>
<script src="/tutorial/index.95a69858.js" defer=""></script>
</body>
</html>