Multi-purpose list processing
Name | Type | Opt | Description |
---|---|---|---|
list-length | int | opt | An optional integer arg sets the maximum list length for all modes of operation for the zl object. The default list length is 256. |
object-mode | symbol | opt | The words zl object. See the message for descriptions of the different modes. | , , , , , , , , , , , , , , , , , , , , , , , , , , , or , , , , , , , , , , , , , or are used as optional arguments to set the mode of the
mode-functionality | int | opt | For the following modes of operation, an additional number may be used as an argument to specify the functionality of a given mode: : Specifies the number of list items beginning at the end of the input list to be sent out the right outlet of the zl object. : Specifies a number of the most recently stored list items to be output. : The currently stored contents of the zl object will be output as a series of lists consisting of the number of items specified by this value. : Specifies the order of an element in the input list (using 0 as the index of the first element of the list) and outputs that element of the list. : Specifies the order of an element in the input list in numerical form (i.e., 1="the" index of the first element of the list) and outputs that element of the list. : Specifies the number of places to rotate the currently stored list. Positive values for rotate the list right, and negative values rotate left. : Specifies the number of list items to be sent out the left outlet of the zl object. : Specifies the length of the output list. The object will collect this number of items input through the left inlet. After the list-length is complete, the list will be output the left outlet. A or a will be output from the right outlet depending on whether the list-length has been defined or not. A signifies that the list-length has been defined and that the object is now collecting the stream. |
mode-functionality | list | opt | For the following modes of operation, an additional list may be used as an argument to specify the functionality of a given mode: : The object will accept a list in as an argument. A list in the left inlet will cause the object to immediately output a version of the input-list that does not contain the elements specified in the argument list. The object will also output a list of the indices of all filtered list items. A list in the right inlet will set the list of items to be filtered without causing output. : 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 is received in the right inlet, a received in the left inlet will cause the object to output out of the left output). : In this mode, the object functions as a register that holds a list. The object will accept a list as an argument to set the initial stored content of the object. |
bang | In left inlet: A bang message will output the most recent list or value calculated. Many modes of the | 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 | input [int] |
In right inlet: Some modes of zl accept an int in the right inlet and behave as follows: : Specifies the number of list items beginning at the end of the input list to be sent out the right outlet of the zl object. Any remaining list elements beyond the number specified by this inlet are sent out the left outlet of the object. : Specifies a number of the most recently stored list items to be output. : The currently stored contents of the zl object will be output as a series of lists consisting of the number of items specified by this value. The final list output may be shorter than the number, depending on the stored contents of the object. : Specifies the order an element in the input list (using 0 as the index of the first element of the list) and outputs that element of the list. : Specifies the order an element in the input list in numerical form (i.e., 1=the index of the first element of the list) and outputs that element of the list. : Specifies the number of places to rotate the currently stored list. Positive values for rotate the list right, and negative values rotate left. : Specifies the number of list items to be sent out the left outlet of the zl object. Any remaining list elements beyond the number specified by this inlet are sent out the right outlet of the object. : Specifies the sorting order. sorts the input list in descending order, and the message with any other value sorts the input list in ascending order. : Specifies the output list length. |
float | input [float] |
Performs the same function as | but with floats.
list | input [list] |
In left inlet: The behavior of the zl object to lists received in the left inlet varies according to the mode of the object, as described under the message. |
anything | input [list] |
Contextual. Allows for the recognition of message symbols. |
mode |
modesymbol [symbol] parameter-setting/input-list [int] |
The word zl object. The modes are: : accepts a list in both inlets. A list in the left inlet will trigger output while a list in the right inlet will only set the input without causing output. The object will output the input list only if it is different from the list which was last received. If it is different, the new list is sent out the left outlet along with a out the right outlet. If the list is not different, nothing is sent out the left outlet while a is sent out the right outlet. : accepts a list in both inlets. A list in the left inlet will trigger output while a list in the right inlet will only set the input without causing output. If the lists in both inlets are the same, a is sent out the left outlet. If the two lists differ, a is sent out the left outlet and a list of the indices for those elements of the lists that differ are sent out the right outlet. : accepts a list in the left inlet and will output a list out of both outlets which consists of every other element in the input list (if the input list is the left output list is and the right output list is ). : is used to divide a list into two lists. This mode takes an additional number argument which specifies the size, in elements, of a list. This value can also be specified as an input in the right inlet in this mode. A list received in the left inlet will be split into two lists -- the first list contains the number of items specified by the argument beginning from the end of the list and counting backward toward the first list element, and is sent out the right outlet. Any remaining list elements are sent out the left outlet of the object. Note: Lists are sent out the right outlet first. : takes an additional number argument which specifies the size, in elements, of a list. A list received in the left inlet will be stored and the length of the list is compared to a number received in the right inlet or an argument to the zl object. If the list of items is longer than the number specified by the right inlet or argument, a list of items of the length specified by the number is sent out the left outlet. Any remaining symbols or list elements are stored. : takes an additional number argument which specifies the size, in elements, of a list. A symbol list of items received in the left inlet will be stored and sent out the left outlet as a series of lists consisting of the number of items specified by argument or by a number received in the right inlet. The final list output may be shorter than the specified number of items, depending on the stored contents of the zl object. : accepts a list in both inlets and sends a list out the left outlet which is the combination of both input lists. : accepts a list in both inlets and will output a list out the left outlet populated with items from both input lists interlaced with each other (if the left input list is and the right input list is the output list is ). : accepts a list in the left inlet and outputs number of elements in the list out the left outlet. : accepts a list in the right inlet. Following receipt of this list, a number in the left inlet will cause the object to output the element located at the list index specified by the number received in the left inlet.(if is received in the right inlet, a received in the left inlet will cause the object to output out of the left output). : accepts a list of numbers and will output the median of those numbers. : works exactly like mode, except the list index numbering begins with 0 as opposed to 1. : accepts a list in the left inlet and outputs the nth element of the list out the left outlet. : functions as a first-in-first-out (FIFO) stack; it outputs the oldest message received. : functions as a register that holds a list. A list received in the left inlet is sent out the left outlet immediately. A list received in the right inlet is stored. A sends the stored list out the left outlet. : accepts a list in its left inlet and sends the list out the left outlet in reverse order. : is used to rotate the contents of a list. An additional argument is used to specify the number of places a list item is to be rotated - positive numbers rotate the list to the right, and negative numbers rotate left. This value can also be specified as an input in the right inlet in this mode. : accepts a list in either inlet. A list in the left inlet will cause the object to immediately output a scrambled version of the input-list (a list containing the same elements as the input-list but in a randomized order). A list in the right inlet will set the input-list without causing output (a subsequent received in the left inlet will cause a randomized version of the right-input list to be sent out the object's left outlet). : accepts a list in both inlets and sends a list out the left outlet that contains the elements common to both lists. : is used to divide a list into two lists. This mode takes an additional number argument which specifies the size, in elements, of a list. This value can also be specified as an input in the right inlet in this mode. A list received in the left inlet will be split into two lists - the first list contains the number of items specified by the argument, and is sent out the left outlet. Any remaining list elements are sent out the right outlet of the object. Note: Lists are sent out the right outlet first. : is used to sort the contents of a list. An additional argument is used to specify the sorting order. sorts the input list in descending order, and the message with any other value sorts the input list in ascending order. This value can also be specified as an input in the right inlet in this mode. : accepts a number in the right inlet which specifies the length of the output list. Following the receipt of this number, the object will collect this number of items input through the left inlet. After the list-length is complete, the list will be output the left outlet. A or a will be output from the right outlet depending on whether the list-length has been defined or not. A signifies that the list-length has been defined and that the object is now collecting the stream. : accepts a list in both inlets and sends the output position for each occurrence of right list in the left list out the left outlet. : functions as a last-in-first-out (LIFO) stack; it outputs the most recently received message. : will output the last N items in a list, where N is user-specifiable. : accepts a list of numbers and will output the sum of those numbers. : accepts a list in the left inlet and will output a list containing all the elements of the input list which are not duplicates. : accepts a list in both inlets and sends a list out the left outlet that contains the contents of both input lists. If the left and right inlets contain any items in common, only one symbol will be output. : accepts a list in both inlets and will output a list out the left outlet populated with items from the left-input-list which were not present in the right-input-list. |
, followed by one of the symbols , , , , , , , , , , , , , , , , , , , , , , , , , , , or sets the current mode of the
zlclear | Reinitializes the zl object. | |
zlmaxsize | list length [int] |
The words zl object. It is equivalent to using an argument to the object, but this message changes the list length dynamically. The default list length is 256. | , followed by a number, sets the maximum list length for all modes of operation for the
Name | Description |
---|---|
fromsymbol | Transform a symbol into individual numbers/messages |
maximum | Output the greatest in a list of numbers |
minimum | Output the smallest in a list of numbers |
mean | Find the running average of a stream of numbers |
pack | Combine numbers and symbols into a list |
regexp | Use PERL-style regular expressions to process input |
swap | Reverse the sequential order of two integers |
thresh | Combine numbers into a list when received close together |
tosymbol | Convert messages, numbers, or lists to a single symbol |
Max Data Tutorial 5: List Processing | Max Data Tutorial 5: List Processing |
Tutorial 11: Lists and Matrices | Tutorial 11: Lists and Matrices |