Ops.WebAudio.Lib.Tonejs.Control.CtrlMarkov

summary (oneliner)

CtrlMarkov represents a Markov Chain where each call to `next`

will move to the next state. If the next state choice is an array, the next state is chosen randomly with even probability for all of the choices. For a weighted probability of the next choices, pass in an object with `state`

and `probability`

attributes. The probabilities will be normalized and then chosen. If no next options are given for the current state, the state will stay there.

Markov Chains can be used for many things, e.g. generating music or visuals.

doc

issues

youtube id

collections

#### Inputs

An object with state values, e.g. `{ "beginning" : [ "end", "middle"], "middle" : "end" }`

*string*Number)

Which value to start with (optional), e.g. `"beginning"`

Sets the output port `Next Value`

#### Outputs

*string*Number)

The next value in the chain after calling `Next`