mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 21:58:37 +00:00
add striate()
This commit is contained in:
parent
eccb20c3b7
commit
1d56d79757
@ -496,6 +496,13 @@ export class Pattern {
|
||||
return this._squeezeBind(func);
|
||||
}
|
||||
|
||||
_striate(n) {
|
||||
const slices = Array.from({ length: n }, (x, i) => i);
|
||||
const slice_objects = slices.map((i) => ({ begin: i / n, end: (i + 1) / n }));
|
||||
const slicePat = slowcat(...slice_objects);
|
||||
return this.union(slicePat)._fast(n);
|
||||
}
|
||||
|
||||
// cpm = cycles per minute
|
||||
_cpm(cpm) {
|
||||
return this._fast(cpm / 60);
|
||||
@ -732,6 +739,7 @@ Pattern.prototype.patternified = [
|
||||
'linger',
|
||||
'ply',
|
||||
'segment',
|
||||
'striate',
|
||||
'slow',
|
||||
'velocity',
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user