Skip to content

Commit

Permalink
Addition: adding the negative euclidean rhythm function
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubobubobubobubo committed Feb 19, 2024
1 parent 694b994 commit 2ee66cd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/API.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,20 @@ export class UserAPI {
};
ry = this.rhythm;


public nrhythm = (
div: number,
pulses: number,
length: number,
rotate: number = 0,
): boolean => {
let rhythm = this._euclidean_cycle(pulses, length, rotate).map(n => !n)
return (
this.beat(div) && rhythm.beat(div)
);
};
nry = this.nrhythm;

_euclidean_cycle(
pulses: number,
length: number,
Expand Down

0 comments on commit 2ee66cd

Please sign in to comment.