Revert "Faster PPQN and bigger latency"
This reverts commit ca4f7acfe2.
This commit is contained in:
@ -54,7 +54,7 @@ export class Clock {
|
||||
this.logicalTime = 0;
|
||||
this.tick = 0;
|
||||
this._bpm = 120;
|
||||
this._ppqn = 48 * 2;
|
||||
this._ppqn = 48;
|
||||
this.transportNode = null;
|
||||
this.ctx = ctx;
|
||||
this.running = true;
|
||||
@ -175,6 +175,7 @@ export class Clock {
|
||||
if (ppqn > 0 && this._ppqn !== ppqn) {
|
||||
this._ppqn = ppqn;
|
||||
this.transportNode?.setPPQN(ppqn);
|
||||
this.logicalTime = this.realTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ class TransportProcessor extends AudioWorkletProcessor {
|
||||
this.currentPulsePosition = currentTime;
|
||||
} else if (message.data.type === "ppqn") {
|
||||
this.ppqn = message.data.value;
|
||||
this.currentPulsePosition = currentTime;
|
||||
} else if (message.data.type === "nudge") {
|
||||
this.nudge = message.data.value;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ export class Editor {
|
||||
// Audio stuff
|
||||
audioContext: AudioContext;
|
||||
clock: Clock;
|
||||
dough_nudge: number = 40;
|
||||
dough_nudge: number = 20;
|
||||
manualPlay: boolean = false;
|
||||
isPlaying: boolean = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user