Make cps patternable (#1001)

Supports e.g. `note("c d e f g a").cps("<1 1.2 1.3 1.4 1.5 1.6>")`
This commit is contained in:
eefano 2024-11-30 10:09:36 +01:00 committed by GitHub
parent c66f19108c
commit 0531369613
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {