UNPKG

3.5 kBTypeScriptView Raw
1export { getContext, setContext } from "./core/Global.js";
2export * from "./classes.js";
3export * from "./version.js";
4import { ToneAudioBuffer } from "./core/context/ToneAudioBuffer.js";
5export { start } from "./core/Global.js";
6import { Seconds } from "./core/type/Units.js";
7export { supported } from "./core/context/AudioContext.js";
8import type { TransportClass } from "./core/clock/Transport.js";
9import type { DestinationClass } from "./core/context/Destination.js";
10import type { DrawClass } from "./core/util/Draw.js";
11import type { ListenerClass } from "./core/context/Listener.js";
12/**
13 * The current audio context time of the global {@link BaseContext}.
14 * @see {@link Context.now}
15 * @category Core
16 */
17export declare function now(): Seconds;
18/**
19 * The current audio context time of the global {@link Context} without the {@link Context.lookAhead}
20 * @see {@link Context.immediate}
21 * @category Core
22 */
23export declare function immediate(): Seconds;
24/**
25 * The Transport object belonging to the global Tone.js Context.
26 * @see {@link TransportClass}
27 * @category Core
28 * @deprecated Use {@link getTransport} instead
29 */
30export declare const Transport: TransportClass;
31/**
32 * The Transport object belonging to the global Tone.js Context.
33 * @see {@link TransportClass}
34 * @category Core
35 */
36export declare function getTransport(): TransportClass;
37/**
38 * The Destination (output) belonging to the global Tone.js Context.
39 * @see {@link DestinationClass}
40 * @category Core
41 * @deprecated Use {@link getDestination} instead
42 */
43export declare const Destination: DestinationClass;
44/**
45 * @deprecated Use {@link getDestination} instead
46 */
47export declare const Master: DestinationClass;
48/**
49 * The Destination (output) belonging to the global Tone.js Context.
50 * @see {@link DestinationClass}
51 * @category Core
52 */
53export declare function getDestination(): DestinationClass;
54/**
55 * The {@link ListenerClass} belonging to the global Tone.js Context.
56 * @category Core
57 * @deprecated Use {@link getListener} instead
58 */
59export declare const Listener: ListenerClass;
60/**
61 * The {@link ListenerClass} belonging to the global Tone.js Context.
62 * @category Core
63 */
64export declare function getListener(): ListenerClass;
65/**
66 * Draw is used to synchronize the draw frame with the Transport's callbacks.
67 * @see {@link DrawClass}
68 * @category Core
69 * @deprecated Use {@link getDraw} instead
70 */
71export declare const Draw: DrawClass;
72/**
73 * Get the singleton attached to the global context.
74 * Draw is used to synchronize the draw frame with the Transport's callbacks.
75 * @see {@link DrawClass}
76 * @category Core
77 */
78export declare function getDraw(): DrawClass;
79/**
80 * A reference to the global context
81 * @see {@link Context}
82 * @deprecated Use {@link getContext} instead
83 */
84export declare const context: import("./classes.js").BaseContext;
85/**
86 * Promise which resolves when all of the loading promises are resolved.
87 * Alias for static {@link ToneAudioBuffer.loaded} method.
88 * @category Core
89 */
90export declare function loaded(): Promise<void>;
91import { ToneAudioBuffers } from "./core/context/ToneAudioBuffers.js";
92import { ToneBufferSource } from "./source/buffer/ToneBufferSource.js";
93/** @deprecated Use {@link ToneAudioBuffer} */
94export declare const Buffer: typeof ToneAudioBuffer;
95/** @deprecated Use {@link ToneAudioBuffers} */
96export declare const Buffers: typeof ToneAudioBuffers;
97/** @deprecated Use {@link ToneBufferSource} */
98export declare const BufferSource: typeof ToneBufferSource;