init

init — Puts the value of the i-time expression into a k- or a-rate variable.

Syntax

ares init iarg
ires init iarg
kres init iarg
ares, ...  init iarg, ...
ires, ... init iarg, ...
kres, ...init iarg, ...

Description

Put the value of the i-time expression into a k- or a-rate variable.

Initialization

Puts the value of the i-time expression iarg into a k- or a-rate variable, i.e., initialize the result. Note that init provides the only case of an init-time statement being permitted to write into a perf-time (k- or a-rate) result cell; the statement has no effect at perf-time.

Since version 5.13 it is possible to initialise upto 24 variables of the same class in one statement. If there are more output variables than input expressions then the last one is repeated. It is an error to have more inputs than outputs.

See Also

=, divz, tival

Credits

Init first appeared in the original Csound, but the extension to multiple values is by

Author: John ffitch
University of Bath, and Codemist Ltd.
Bath, UK
February 2010

New in version 5.13