Skip to content
Tone.js

Tone

internal class Core

Tone is the base class of all other classes.

new Tone()
debug: boolean

Set this debug flag to log all events that happen in this class.

Default: false

static

version: string

The version number semver

Default: version

read-only

disposed: boolean

Indicates if the instance was disposed. ‘Disposing’ an instance means that all of the Web Audio nodes that were created for the instance are disconnected and freed for garbage collection.

dispose(): this

disconnect and dispose.

Returns this

toString(): string

Convert the class to a string

const osc = new Tone.Oscillator();
console.log(osc.toString());

Returns string

static

getDefaults(): BaseToneOptions

Returns all of the default options belonging to the class.

Returns BaseToneOptions