mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-23 11:38:37 +00:00
add .range
This commit is contained in:
parent
0e7b345010
commit
fb1976a6bc
@ -780,7 +780,7 @@ class Pattern {
|
|||||||
|
|
||||||
// known as iter' in tidalcycles
|
// known as iter' in tidalcycles
|
||||||
iterBack(times) {
|
iterBack(times) {
|
||||||
return this.iter(times, true)
|
return this.iter(times, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
_chunk(n, func, back = false) {
|
_chunk(n, func, back = false) {
|
||||||
@ -823,6 +823,10 @@ class Pattern {
|
|||||||
_velocity(velocity) {
|
_velocity(velocity) {
|
||||||
return this._withContext((context) => ({ ...context, velocity: (context.velocity || 1) * velocity }));
|
return this._withContext((context) => ({ ...context, velocity: (context.velocity || 1) * velocity }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
range(min, max) {
|
||||||
|
return this.mul(max - min).add(min)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// methods of Pattern that get callable factories
|
// methods of Pattern that get callable factories
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user