adding elapsed time, missing pause/resume mechanism
This commit is contained in:
@ -12,6 +12,9 @@ export class TransportNode extends AudioWorkletNode {
|
||||
|
||||
/** @type {(this: MessagePort, ev: MessageEvent<any>) => any} */
|
||||
handleMessage = (message) => {
|
||||
if (message.data && message.data.type === "elapsed") {
|
||||
this.app.clock.elapsed = message.data.value
|
||||
}
|
||||
if (message.data && message.data.type === "bang") {
|
||||
if (this.app.settings.send_clock)
|
||||
this.app.api.MidiConnection.sendMidiClock();
|
||||
@ -20,9 +23,8 @@ export class TransportNode extends AudioWorkletNode {
|
||||
this.app.clock.tick
|
||||
);
|
||||
this.app.clock.time_position = futureTimeStamp;
|
||||
this.timeviewer.innerHTML = `${zeroPad(futureTimeStamp.bar, 2)}:${
|
||||
futureTimeStamp.beat + 1
|
||||
}:${zeroPad(futureTimeStamp.pulse, 2)} / ${this.app.clock.bpm}`;
|
||||
this.timeviewer.innerHTML = `${zeroPad(futureTimeStamp.bar, 2)}:${futureTimeStamp.beat + 1
|
||||
}:${zeroPad(futureTimeStamp.pulse, 2)} / ${this.app.clock.bpm}`;
|
||||
if (this.app.exampleIsPlaying) {
|
||||
tryEvaluate(this.app, this.app.example_buffer);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user