From 2ee66cd9fb9e1aea376a2200791bc8686cbeab44 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 19 Feb 2024 16:12:34 +0100 Subject: [PATCH] Addition: adding the negative euclidean rhythm function --- src/API.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/API.ts b/src/API.ts index cef113a..ad9d872 100644 --- a/src/API.ts +++ b/src/API.ts @@ -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,