add flux function
This commit is contained in:
parent
b54139376e
commit
e2cdce5ac9
1 changed files with 24 additions and 0 deletions
|
|
@ -2337,6 +2337,17 @@ export const { juxBy, juxby } = register(['juxBy', 'juxby'], function (by, func,
|
||||||
return stack(left, right).setSteps(__steps ? lcm(left._steps, right._steps) : undefined);
|
return stack(left, right).setSteps(__steps ? lcm(left._steps, right._steps) : undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Like juxBy, except it flips the ears each cycle.
|
||||||
|
* @name fluxBy
|
||||||
|
* @synonyms fluxby
|
||||||
|
* @example
|
||||||
|
* s("bd lt [~ ht] mt cp ~ bd hh").fluxBy(".8", rev)
|
||||||
|
*/
|
||||||
|
export const { fluxBy, fluxby } = register(['fluxBy', 'fluxby'], function (by, func, pat) {
|
||||||
|
return slowcat(pat._juxBy(by, func, pat), pat._juxBy(-by, func, pat));
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The jux function creates strange stereo effects, by applying a function to a pattern, but only in the right-hand channel.
|
* The jux function creates strange stereo effects, by applying a function to a pattern, but only in the right-hand channel.
|
||||||
* @example
|
* @example
|
||||||
|
|
@ -2350,6 +2361,19 @@ export const jux = register('jux', function (func, pat) {
|
||||||
return pat._juxBy(1, func, pat);
|
return pat._juxBy(1, func, pat);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Like jux, but flips the ears each cycle.
|
||||||
|
* @example
|
||||||
|
* s("bd lt [~ ht] mt cp ~ bd hh").flux(rev)
|
||||||
|
* @example
|
||||||
|
* s("bd lt [~ ht] mt cp ~ bd hh").flux(press)
|
||||||
|
* @example
|
||||||
|
* s("bd lt [~ ht] mt cp ~ bd hh").flux(iter(4))
|
||||||
|
*/
|
||||||
|
export const flux = register('flux', function (func, pat) {
|
||||||
|
return pat._fluxBy(1, func, pat);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Superimpose and offset multiple times, applying the given function each time.
|
* Superimpose and offset multiple times, applying the given function each time.
|
||||||
* @name echoWith
|
* @name echoWith
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue