Tone.Sequence
↳ EXTENDS Tone.PartA sequence is an alternate notation of a part. Instead of passing in an array of [time, event] pairs, pass in an array of events which will be spaced at the given subdivision. Sub-arrays will subdivide that beat by the number of items are in the array. Sequence notation inspiration from Tidal
CONSTRUCTOR
new Tone.Sequence (The callback to invoke with every note
The sequence
The subdivision between which events are placed.
DEFAULTS
EXAMPLE
EXAMPLE
Members
.subdivision
↝ Time READONLY #The subdivision of the sequence. This can only be set in the constructor. The subdivision is the interval between successive steps.
.progress
↝ NormalRange READONLY #The current progress of the loop interval. Returns 0 if the event is not started yet or it is not set to loop.
.state
↝ String READONLY #Returns the playback state of the note, either “started” or “stopped”.
.probability
↝ NormalRange #The probability of the notes being triggered.
.loop
↝ Boolean or Positive #If the part should loop or not between Tone.Part.loopStart and Tone.Part.loopEnd. An integer value corresponds to the number of loops the Part does after it starts.
EXAMPLE
.loopEnd
↝ TransportTime #The loopEnd point determines when it will loop if Tone.Part.loop is true.
.loopStart
↝ TransportTime #The loopStart point determines when it will loop if Tone.Part.loop is true.
Methods
.add ( )
#The index to add the event to
The value to add at that index
this
Add an event at an index, if there’s already something at that index, overwrite it. If value
is an array, it will be parsed as a subsequence.
.at ( )
#The index to get or set
Optionally pass in the value to set at the given index.
Get/Set an index of the sequence. If the index contains a subarray, a Tone.Sequence representing that sub-array will be returned.
EXAMPLE
.remove ( )
#The index of the event to remove
this
Remove a value from the sequence by index
.stop ( )
#When to stop the part.
this
Stop the part at the given time.
.removeAll ( )
#this
Remove all of the notes from the group.
.cancel ( )
#The time after which to cancel the scheduled events.
this
Cancel scheduled state change events: i.e. “start” and “stop”.