Tone.Sequence↳ EXTENDS Tone.Part
A 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
CONSTRUCTORnew Tone.Sequence (
The callback to invoke with every note
The subdivision between which events are placed.
.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”.
.length↝ Positive READONLY #
The number of scheduled notes in the part.
.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.
.loopEnd↝ Time #
The loopEnd point determines when it will loop if Tone.Part.loop is true.
.loopStart↝ Time #
The loopStart point determines when it will loop if Tone.Part.loop is true.
.probability↝ NormalRange #
The probability of the notes being triggered.
.add ( )#
The index to add the event to
The value to add at that index
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.
.remove ( )#
Remove a value from the sequence by index
.cancel ( )#
The time after which to cancel the scheduled events.
Cancel scheduled state change events: i.e. “start” and “stop”.
.removeAll ( )#
Remove all of the notes from the group.
.start ( )#
When to start the part.
The offset from the start of the part to begin playing at.
Start the part at the given time.