Tone.js/Tone/index.ts

31 lines
857 B
TypeScript
Raw Normal View History

export { getContext, setContext } from "./core/Global";
export * from "./core/index";
2019-07-11 13:57:06 +00:00
export * from "./source/index";
2019-08-04 19:27:44 +00:00
export * from "./signal/index";
2019-07-18 18:48:02 +00:00
export * from "./instrument/index";
2019-07-25 01:54:57 +00:00
export * from "./event/index";
2019-07-25 15:29:36 +00:00
export * from "./effect/index";
export * from "./component/index";
2019-08-02 14:36:59 +00:00
import { Seconds } from "./core/type/Units";
import { getContext } from "./core/Global";
2019-07-30 14:26:13 +00:00
export { start } from "./core/Global";
/**
* The current audio context time
*/
export function now(): Seconds {
return getContext().now();
}
2019-07-25 15:29:36 +00:00
/**
* The Transport object belonging to the global Tone.js Context
*/
2019-07-25 15:29:36 +00:00
// tslint:disable-next-line: variable-name
export const Transport = getContext().transport;
/**
* The Destination (output) belonging to the global Tone.js Context
*/
2019-07-25 15:29:36 +00:00
// tslint:disable-next-line: variable-name
export const Destination = getContext().destination;