Documented syncing and updated zifferjs

This commit is contained in:
2023-12-11 22:36:28 +02:00
parent 491461e354
commit 2d3c48c1c1
9 changed files with 103 additions and 23 deletions

View File

@ -87,6 +87,7 @@ export class UserAPI {
public currentSeed: string | undefined = undefined;
public localSeeds = new Map<string, Function>();
public patternCache = new LRUCache({ max: 1000, ttl: 1000 * 60 * 5 });
public cueTimes: { [key: string]: number } = {};
private errorTimeoutID: number = 0;
private printTimeoutID: number = 0;
public MidiConnection: MidiConnection;
@ -2176,4 +2177,10 @@ export class UserAPI {
*/
this.app.clock.time_signature = [numerator, denominator];
};
public cue = (functionName: string|Function): void => {
functionName = typeof functionName === "function" ? functionName.name : functionName;
this.cueTimes[functionName] = this.app.clock.pulses_since_origin;
};
}