adding logicalTime and realTime getters

This commit is contained in:
2023-10-27 09:56:28 +02:00
parent dcd4388053
commit 0e205b6b6c

View File

@ -144,6 +144,14 @@ export class Clock {
return this._ppqn;
}
get logicalTime(): number {
return this.tick * this.pulse_duration;
}
get realTime(): number {
return this.elapsed;
}
set ppqn(ppqn: number) {
if (ppqn > 0 && this._ppqn !== ppqn) {
this._ppqn = ppqn;