-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtransport.d.ts
More file actions
30 lines (30 loc) · 977 Bytes
/
transport.d.ts
File metadata and controls
30 lines (30 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { type ITransportEvent } from "./event-types.ts";
import { Clock } from "./clock.ts";
export declare const TransportState: {
readonly Stopped: "Stopped";
readonly Running: "Running";
readonly Starting: "Starting";
};
export type TTransportState = (typeof TransportState)[keyof typeof TransportState];
export type TTransportListener = (e: ITransportEvent) => void;
export declare class Transport {
private tempo;
private nextBeatTime;
private nextContextTime;
private contextTimeWhenTransportStarted;
private state;
private listener;
private clock;
private lastTransportPlaybackEvent?;
constructor(clock: Clock, listener: TTransportListener);
get currentBeatTime(): number;
cleanup(): void;
setTempo(t: number): void;
getTempo(): number;
getState(): TTransportState;
start(): void;
stop(): void;
private onClock;
private getCurrentBeatTime;
private getBeatTimeForAudioContextTime;
}