add ribbon + test + docs
This commit is contained in:
parent
e058ae54ef
commit
9731eb8c5b
4 changed files with 42 additions and 0 deletions
|
|
@ -2028,6 +2028,16 @@ export const bypass = register('bypass', function (on, pat) {
|
|||
return on ? silence : pat;
|
||||
});
|
||||
|
||||
/**
|
||||
* Loops the pattern inside at `offset` for `cycles`.
|
||||
* @param {number} offset start point of loop in cycles
|
||||
* @param {number} cycles loop length in cycles
|
||||
* @example
|
||||
* // Looping a portion of randomness
|
||||
* note(irand(8).segment(4).scale('C3 minor')).ribbon(1337, 2)
|
||||
*/
|
||||
export const ribbon = register('ribbon', (offset, cycles, pat) => pat.early(offset).restart(pure(1).slow(cycles)));
|
||||
|
||||
// sets absolute duration of haps
|
||||
// TODO - fix
|
||||
export const duration = register('duration', function (value, pat) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue