Tone.CtrlPattern

↳ EXTENDS Tone

Generate patterns from an array of values. Has a number of arpeggiation and randomized selection patterns. <ul> <li>“up” - cycles upward</li> <li>“down” - cycles downward</li> <li>“upDown” - up then and down</li> <li>“downUp” - cycles down then and up</li> <li>“alternateUp” - jump up two and down one</li> <li>“alternateDown” - jump down two and up one</li> <li>“random” - randomly select an index</li> <li>“randomWalk” - randomly moves one index away from the current position</li> <li>“randomOnce” - randomly select an index without repeating until all values have been chosen.</li> </ul>

CONSTRUCTOR

new Tone.CtrlPattern (
values
, [
type
] )
values

An array of options to choose from.

type: Array
type

The name of the pattern.

optional

DEFAULTS

{
type : Tone.CtrlPattern.Type.Up ,
values : []
}

Members

.index

Number #

The current position in the values array

</>

.type

Tone.CtrlPattern.Type #

The pattern used to select the next item from the values array

</>

.value

* READONLY #

The value at the current index of the pattern.

</>

.values

Array #

The array of values to arpeggiate over

</>

Methods

.dispose ( )

#
↪ returns Tone.CtrlPattern

this

Clean up

</>

.next ( )

#
↪ returns *

The next value

Return the next value given the current position and pattern.

</>
docs generated Sep 15 2019