Simplified clock

This commit is contained in:
2023-09-02 23:50:40 +03:00
parent 969a4c17c1
commit cee8c82c89
3 changed files with 12 additions and 33 deletions

View File

@ -127,8 +127,10 @@ export class Clock {
}
set bpm(bpm: number) {
this._bpm = bpm;
this.transportNode?.setBPM(bpm);
if(this._bpm !== bpm) {
this._bpm = bpm;
this.transportNode?.setBPM(bpm);
}
}
get ppqn(): number {
@ -136,8 +138,10 @@ export class Clock {
}
set ppqn(ppqn: number) {
this._ppqn = ppqn;
this.transportNode?.setPPQN(ppqn);
if(this._ppqn !== ppqn) {
this._ppqn = ppqn;
this.transportNode?.setPPQN(ppqn);
}
}
public convertPulseToSecond(n: number): number {