A Timeline class for scheduling and maintaining state along a timeline. All events must have a "time" property. Internally, events are stored in time order for fast retrieval.
The number of previous events that are retained.
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.
If the time value must always be greater than or equal to the last element on the list.
The memory of the timeline, i.e. how many events in the past it will retain
The version number semver
Insert an event object onto the timeline. Events must have a "time" attribute.
The event object to insert into the timeline.
Cancel events at and after the given time
The time to query.
Cancel events before or equal to the given time.
The time to cancel before.
Iterate over everything in the array
The callback to invoke with every item
Iterate over everything in the array after the given time.
The callback to invoke with every item
Iterate over everything in the array at the given time
The time to check if items are before
The callback to invoke with every item
Iterate over everything in the array at or before the given time.
The callback to invoke with every item
Iterate over everything in the array between the startTime and endTime. The timerange is inclusive of the startTime, but exclusive of the endTime. range = [startTime, endTime).
The time to check if items are before
The end of the test interval.
The callback to invoke with every item
Iterate over everything in the array at or after the given time. Similar to forEachAfter, but includes the item(s) at the given time.
The time to check if items are before
The callback to invoke with every item
Get the nearest event whose time is less than or equal to the given time.
Get the event which is scheduled after the given time.
The time to query.
Get the event before the event at the given time.
The time to query.
Returns all of the default options belonging to the class.
Return the first event in the timeline without removing it
Returns the previous event if there is one. null otherwise
The event to find the previous one of
Remove an event from the timeline.
The event object to remove from the list.
Return the first event in the timeline and remove it
Convert the class to a string
import { Oscillator } from "tone";
const osc = new Oscillator();
console.log(osc.toString());