Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
daslyfe committed Jan 16, 2025
1 parent 2348023 commit d2a9b9b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/core/pattern.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3122,12 +3122,15 @@ Pattern.prototype.xfade = function (pos, b) {
* @example
* s("sd").beat("4:12", 16)
*/
const __beat = join => (t, div, pat) => {
const __beat = (join) => (t, div, pat) => {
t = Fraction(t).mod(div);
div = Fraction(div);
const b = t.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()),
);

0 comments on commit d2a9b9b

Please sign in to comment.