Documentation
    Preparing search index...

    Class ToneAbstract

    Tone is the base class of all other classes.

    Hierarchy (View Summary)

    Index
    debug: boolean

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

    name: string

    The name of the class

    version: string

    The version number semver

    • get 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.

      Returns boolean

    • disconnect and dispose.

      Returns this

    • Prints the outputs to the console log for debugging purposes. Prints the contents only if either the object has a property called debug set to true, or a variable called TONE_DEBUG_CLASS is set to the name of the class.

      Parameters

      • ...args: any[]

      Returns void

      const osc = new Tone.Oscillator();
      // prints all logs originating from this oscillator
      osc.debug = true;
      // calls to start/stop will print in the console
      osc.start();
    • Convert the class to a string

      Returns string

      const osc = new Tone.Oscillator();
      console.log(osc.toString());
    • Returns all of the default options belonging to the class.

      Returns BaseToneOptions