mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 21:58:37 +00:00
fix latency issues for larger intervals
This commit is contained in:
parent
24f8f48a2f
commit
d0b07c4890
@ -42,7 +42,8 @@ export class Scheduler {
|
||||
if (!hap.part.begin.equals(hap.whole.begin)) {
|
||||
return;
|
||||
}
|
||||
const scheduled = time + (hap.whole.begin - begin) / this.cps + latency - passed; // this took me ages...
|
||||
// the following line took me ages to come up with.. handle with care
|
||||
const scheduled = time + (hap.whole.begin - begin) / this.cps - passed + interval + latency;
|
||||
const duration = hap.duration / this.cps; // TODO: use legato / duration of objectified value
|
||||
const now = getTime();
|
||||
const deadline = scheduled - now;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user