mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-22 11:08:35 +00:00
fix: midi clock drift
This commit is contained in:
parent
b0a8d12112
commit
b55721f16f
@ -105,7 +105,7 @@ Pattern.prototype.midi = function (output) {
|
|||||||
hap.ensureObjectValue();
|
hap.ensureObjectValue();
|
||||||
|
|
||||||
// calculate time
|
// calculate time
|
||||||
const timingOffset = WebMidi.time - getAudioContext().currentTime * 1000;
|
const timingOffset = WebMidi.time - getAudioContext().getOutputTimestamp().contextTime * 1000;
|
||||||
time = time * 1000 + timingOffset;
|
time = time * 1000 + timingOffset;
|
||||||
|
|
||||||
// destructure value
|
// destructure value
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user