This commit is contained in:
Felix Roos
2022-03-24 23:57:32 +01:00
parent b1cde584bf
commit a19d789145
7 changed files with 70 additions and 13 deletions
@@ -42013,7 +42013,7 @@ hackLiteral(String, [
'p'
], bootstrapped.pure); // comment out this line if you panic
// this will add everything to global scope, which is accessed by eval
Object.assign(globalThis, bootstrapped, _tone1, _tone, _voicings, _drawMjs, _uiMjs, {
Object.assign(globalThis, _tone1, bootstrapped, _tone, _voicings, _drawMjs, _uiMjs, {
gist: _gistJsDefault.default,
euclid: _euclidMjsDefault.default,
mini: _parse.mini
@@ -42847,12 +42847,12 @@ class Pattern {
);
}
// these might change with: https://github.com/tidalcycles/Tidal/issues/902
echoWith(times, time, func) {
_echoWith(times, time, func) {
return stack(...range(0, times - 1).map((i)=>func(this.late(i * time), i)
));
}
echo(times, time, feedback) {
return this.echoWith(times, time, (pat, i)=>pat.velocity(Math.pow(feedback, i))
_echo(times, time, feedback) {
return this._echoWith(times, time, (pat, i)=>pat.velocity(Math.pow(feedback, i))
);
}
iter(times) {
@@ -43144,6 +43144,23 @@ function makeComposable(func) {
});
return func;
}
const patternify2 = (f)=>(pata, patb, pat)=>pata.fmap((a)=>(b)=>f.call(pat, a, b)
).appLeft(patb).outerJoin()
;
const patternify3 = (f)=>(pata, patb, patc, pat)=>pata.fmap((a)=>(b)=>(c)=>f.call(pat, a, b, c)
).appLeft(patb).appLeft(patc).outerJoin()
;
const patternify4 = (f)=>(pata, patb, patc, patd, pat)=>pata.fmap((a)=>(b)=>(c)=>(d)=>f.call(pat, a, b, c, d)
).appLeft(patb).appLeft(patc).appLeft(patd).outerJoin()
;
Pattern.prototype.echo = function(...args) {
args = args.map(reify);
return patternify3(Pattern.prototype._echo)(...args, this);
};
Pattern.prototype.echoWith = function(...args) {
args = args.map(reify);
return patternify3(Pattern.prototype._echoWith)(...args, this);
};
// call this after all Patter.prototype.define calls have been executed! (right before evaluate)
Pattern.prototype.bootstrap = function() {
// makeComposable(Pattern.prototype);
@@ -183357,4 +183374,4 @@ exports.default = cx;
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["3uVTb"], "3uVTb", "parcelRequire94c2")
//# sourceMappingURL=index.fbb7f699.js.map
//# sourceMappingURL=index.1d7e465c.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.fbb7f699.js" defer=""></script>
<script src="/tutorial/index.1d7e465c.js" defer=""></script>
</body>
</html>