add .range
This commit is contained in:
parent
0e7b345010
commit
fb1976a6bc
1 changed files with 5 additions and 1 deletions
|
|
@ -780,7 +780,7 @@ class Pattern {
|
|||
|
||||
// known as iter' in tidalcycles
|
||||
iterBack(times) {
|
||||
return this.iter(times, true)
|
||||
return this.iter(times, true);
|
||||
}
|
||||
|
||||
_chunk(n, func, back = false) {
|
||||
|
|
@ -823,6 +823,10 @@ class Pattern {
|
|||
_velocity(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue