Similar to Tone.Timeline, but all events represent intervals with both "time" and "duration" times. The events are placed in a tree structure optimized for querying an intersection point with the timeline events. Internally uses an Interval Tree to represent the data.
Set this debug flag to log all events that happen in this class.
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.
The number of items in the timeline.
The version number semver
The event to add to the timeline. All events must have a time and duration value
Remove events whose time time is after the given time
The time to query.
Iterate over everything in the array in which the given time overlaps with the time and duration time of the event.
The time to check if items are overlapping
Iterate over everything in the array in which the time is greater than or equal to the given time.
The time to check if items are before
Get an event whose time and duration span the give time. Will return the match whose "time" value is closest to the given time.
Returns all of the default options belonging to the class.
Convert the class to a string
import { Oscillator } from "tone";
const osc = new Oscillator();
console.log(osc.toString());