CLASS-ARRAY

[CLASS]


OM 6.1
Function Reference
SLOTS:

- SELF :object
- NUMCOLS :number of components

Description:

CLASS-ARRAY is a special 2D matrix.

Instances are created by specifying a number of columns or components (input 1 = <numcols>) and specifying values for the different lines represented by the possible other inputs (input 2 and higher).

Initially, a CLASS-ARRAY box has no lines. There exist two complementary ways to add lines to the array :

1) Using the "add keyword inputs" command ('k').
Each line appears as a standard "keyword" input. It should be given a name (click on the input, always begin with ':', e.g. :param1) and a value (connect something).
Lines can be removed with "remove keyword input" command ('K').

2) [object oriented programming] Creating a subclass of class array with additional slots.
Make the slot lines visible using the "add optional inputs" commands (alt + '->' or '>' keys).
Slots are represented with red inputs. The input name can be changed to make it correspond to one of the class additional slots.
Slot lines can be removed with "remove optional input" commands (alt + '<-' or '<' keys).

Each line of a class array can be parameterized using one of the following options :
- Connect a LIST : the values of the list are set to the different array components. If the number of components is higher than the length of the list, then the list is repeated circularly.
- Connect a CONSTANT VALUE : this value is assigned to every array components.
- Connect a BPF : the BPF is sampled according to the number of array components.
- Connect a FUNCTION (function name or box in 'lambda' mode) : the function (should be of one single argument) is evaluated and applied to the successive array component indices.

The matrix "components" can be accessed and modified using the functions get-comp and set-comp.