zl.lookup Reference

Output elements of a list

zl.lookup

Description

Outputs the elements of an input list. Element indexing begins at 0.

Arguments

initial-list [list]

Optional

The object will accept a list in as an argument. A number in the right inlet will cause the object to output the element located at the list index specified by the number received in the left inlet. (if 6.2 3 5.6 5.3 3.8 2.4 is received in the right inlet, a 2 received in the left inlet will cause the object to output 5.6 out of the left output). Indexing begins at 0.

Attributes

fuzzy [atom] (default: 0.)

Fuzzy floating-point comparison epsilon

zlmaxsize [atom_long]

Sets the maximum list length for all modes of operation. This is the equivalent to using an argument to the object, but allows the list length to be changed dynamically. The default list length is 256, and the maximum list length limit is 32,767.

Common Box Attributes

Messages

bang

In left inlet: A bang message will output the most recent list or value calculated. Many modes of the zl object take inputs through their right inlet which will only set the input without triggering output. In these cases, a subsequent bang received in the left inlet will trigger the output.

int

In left inlet: Outputs the element located at the specified index. Indexing starts at 0.
In right inlet: Sets the list

float

See int message.

list

In left inlet: Output elements located at the specified indexes. Indexing starts at 0.
In right inlet: Set lookup list

anything

Arguments

input [list]
Allows for the recognition of lists that begin with symbols.

mode

The word 'mode' followed by one of the following words will set the mode of the object:
change, compare, delace, ecils, group, indexmap, iter, join, lace, len, lookup, median, mth, nth, queue, reg, rev, rot, scramble, sect, slice, sort, stack, stream, sub, sum, swap, thin, union, or unique.

See the reference for the corresponding mode for more information.

zlclear

Clears the currently held list.

Output

list

Out left outlet:
A list of the element(s) as specified by the input to the leftmost inlet.

See Also

Name Description
zl
zl.change
zl.compare
zl.delace
zl.ecils
zl.filter
zl.group
zl.indexmap
zl.iter
zl.join
zl.lace
zl.len
zl.median
zl.mth
zl.nth
zl.queue
zl.reg
zl.rev
zl.rot
zl.scramble
zl.sect
zl.slice
zl.sort
zl.stack
zl.stream
zl.sub
zl.sum
zl.swap
zl.thin
zl.union
zl.unique