format
This commit is contained in:
parent
2348023b22
commit
d2a9b9b750
1 changed files with 7 additions and 4 deletions
|
|
@ -3122,12 +3122,15 @@ Pattern.prototype.xfade = function (pos, b) {
|
||||||
* @example
|
* @example
|
||||||
* s("sd").beat("4:12", 16)
|
* s("sd").beat("4:12", 16)
|
||||||
*/
|
*/
|
||||||
const __beat = join => (t, div, pat) => {
|
const __beat = (join) => (t, div, pat) => {
|
||||||
t = Fraction(t).mod(div);
|
t = Fraction(t).mod(div);
|
||||||
div = Fraction(div);
|
div = Fraction(div);
|
||||||
const b = t.div(div);
|
const b = t.div(div);
|
||||||
const e = t.add(1).div(div);
|
const e = t.add(1).div(div);
|
||||||
return join(pat.fmap(x => pure(x)._compress(b,e)));
|
return join(pat.fmap((x) => pure(x)._compress(b, e)));
|
||||||
}
|
};
|
||||||
|
|
||||||
export const {beat} = register(['beat'], __beat(x => x.innerJoin()));
|
export const { beat } = register(
|
||||||
|
['beat'],
|
||||||
|
__beat((x) => x.innerJoin()),
|
||||||
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue