mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-12 06:08:37 +00:00
export patternify helpers
This commit is contained in:
parent
0396c3f475
commit
16e2c97e0c
@ -708,8 +708,8 @@ class Pattern {
|
||||
}
|
||||
|
||||
_zoom(s, e) {
|
||||
e = Fraction(e)
|
||||
s = Fraction(s)
|
||||
e = Fraction(e);
|
||||
s = Fraction(s);
|
||||
const d = e.sub(s);
|
||||
return this.withQuerySpan((span) => span.withCycle((t) => t.mul(d).add(s)))
|
||||
.withEventSpan((span) => span.withCycle((t) => t.sub(s).div(d)))
|
||||
@ -1202,11 +1202,11 @@ Pattern.prototype.chunkBack = function (...args) {
|
||||
Pattern.prototype.zoom = function (...args) {
|
||||
args = args.map(reify);
|
||||
return patternify2(Pattern.prototype._zoom)(...args, this);
|
||||
}
|
||||
};
|
||||
Pattern.prototype.compress = function (...args) {
|
||||
args = args.map(reify);
|
||||
return patternify2(Pattern.prototype._compress)(...args, this);
|
||||
}
|
||||
};
|
||||
|
||||
// call this after all Patter.prototype.define calls have been executed! (right before evaluate)
|
||||
Pattern.prototype.bootstrap = function () {
|
||||
@ -1310,4 +1310,7 @@ export {
|
||||
timeCat,
|
||||
union,
|
||||
when,
|
||||
patternify2,
|
||||
patternify3,
|
||||
patternify4,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user