Tone.IntervalTimeline
↳ EXTENDS ToneSimilar 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.
CONSTRUCTOR
new Tone.IntervalTimeline ( )- length
Members
Methods
.remove ( )
#The event to remove from the timeline
this
Remove an event from the timeline.
.cancel ( )
#The time to query.
this
Remove events whose time time is after the given time
.forEach ( )
#The callback to invoke with every item
this
Iterate over everything in the timeline.
.forEachAfter ( )
#The time to check if items are before
The callback to invoke with every item
this
Iterate over everything in the array in which the time is greater than the given time.
.forEachAtTime ( )
#The time to check if items are overlapping
The callback to invoke with every item
this
Iterate over everything in the array in which the given time overlaps with the time and duration time of the event.
.get ( )
#The event to add to the timeline
The event which spans the desired time
Get an event whose time and duration span the give time. Will return the match whose “time” value is closest to the given time.
.add ( )
#The event to add to the timeline
this
The event to add to the timeline. All events must have a time and duration value