Skip to content

Commit

Permalink
Make cps patternable (#1001)
Browse files Browse the repository at this point in the history
Supports e.g. `note("c d e f g a").cps("<1 1.2 1.3 1.4 1.5 1.6>")`
  • Loading branch information
eefano authored Nov 30, 2024
1 parent c66f191 commit 0531369
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/cyclist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export class Cyclist {
// see https://github.com/tidalcycles/strudel/pull/1004
const deadline = targetTime - phase;
onTrigger?.(hap, deadline, duration, this.cps, targetTime);
if (hap.value.cps !== undefined && this.cps != hap.value.cps) {
this.cps = hap.value.cps;
this.num_ticks_since_cps_change = 0;
}
}
});
} catch (e) {
Expand Down

0 comments on commit 0531369

Please sign in to comment.