vcella
Prev | Orchestra Opcodes and Operators | Next

## vcella

vcella — Cellular Automata

## Description

Unidimensional Cellular Automata applied to Csound vectors

## Syntax

    vcella  ifn1, ifn2, ielements

## Initialization

ioutFunc - number of the table where the state of each cell is stored

initStateFunc - number of a table containig the inital states of each cell

iRuleFunc - number of a lookup table containing the rules

ielements - total number of cells

irulelen - total number of rules

iradius (optional) - radius of Cellular Automata. At present time CA radius can be 1 or 2 (1 is the default)

## Performance

ktrig - trigger signal. Each time it is non-zero, a new generation of cells is evaluated

kreinit - trigger signal. Each time it is non-zero, state of all cells is forced to be that of initStateFunc.

vcella supports unidimensional cellular automata, where the state of each cell is stored in ioutFunc. So ioutFunc is a vector containing current state of each cell. This variant vector can be used together with any other vector-based opcode, such as adsynt, vmap, vpowv etc.

initStateFunc is an input vector containing the inital value of the row of cells, while iRuleFunc is an input vector containing the rules in the form of a lookup table. Notice that initStateFunc and iRuleFunc can be updated during the performance by means of other vector-based opcodes (for example vcopy) in order to force to change rules and status at performance time.

A new generation of cells is evaluated each time ktrig contains a non-zero value. Also the status of all cells can be forced to assume the status corresponding to the contents of initStateFunc each time kreinit contains a non-zero value.

Radius of CA algorithm can be 1 or 2 (optional iradius arguement).

## Credits

Written by Gabriel Maldonado.

New in Csound 5 (Previously available only on CsoundAV)

Prev | Up | Next
vbapzmove | Home | vco