Tone.Timeline
↳ EXTENDS ToneA 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.
CONSTRUCTOR
new Tone.Timeline ( [The number of previous events that are retained.
DEFAULTS
Members
Methods
.removeEvent ( )
#The event object to remove from the list.
this
Remove an event from the timeline.
.cancel ( )
#The time to query.
this
Cancel events after the given time
.cancelBefore ( )
#The time to cancel before.
this
Cancel events before or equal to the given time.
.forEach ( )
#The callback to invoke with every item
this
Iterate over everything in the array
.forEachAfter ( )
#The time to check if items are before
The callback to invoke with every item
this
Iterate over everything in the array after the given time.
.forEachAtTime ( )
#The time to check if items are before
The callback to invoke with every item
this
Iterate over everything in the array at the given time
.forEachBefore ( )
#The time to check if items are before
The callback to invoke with every item
this
Iterate over everything in the array at or before the given time.
.forEachFrom ( )
#The time to check if items are before
The callback to invoke with every item
this
Iterate over everything in the array at or after the given time. Similar to forEachAfter, but includes the item(s) at the given time.
.getEvent ( )
#Get the event whose time is less than or equal to the given time.
.getEventAfter ( )
#Get the event which is scheduled after the given time.
.getEventBefore ( )
#Get the event before the event at the given time.
.addEvent ( )
#The event object to insert into the timeline.
this
Insert an event object onto the timeline. Events must have a “time” attribute.