fix: cyclist desync
This commit is contained in:
parent
bea25a28cb
commit
df23ea6cdf
3 changed files with 9 additions and 5 deletions
|
|
@ -37,12 +37,17 @@ export class Cyclist {
|
|||
this.lastBegin = begin;
|
||||
const end = this.num_cycles_at_cps_change + num_cycles_since_cps_change;
|
||||
this.lastEnd = end;
|
||||
this.lastTick = phase;
|
||||
|
||||
if (phase < t) {
|
||||
// avoid querying haps that are in the past anyway
|
||||
console.log(`skip query: too late`);
|
||||
return;
|
||||
}
|
||||
|
||||
// query the pattern for events
|
||||
const haps = this.pattern.queryArc(begin, end, { _cps: this.cps });
|
||||
|
||||
this.lastTick = phase;
|
||||
|
||||
haps.forEach((hap) => {
|
||||
if (hap.hasOnset()) {
|
||||
const targetTime =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue