pack
Description
Combine items into an output list. The arguments determine the list format and types of the list elements. The number of inlets is based on the number of arguments.
Examples

Numbers and symbols may be mixed as needed in pack
Arguments
list-elements [any]
Optional
The number of inlets is determined by the number of arguments. Each argument sets an initial type and value for an item in the list produced by pack. If there are no arguments, the object will be created with two inlets, and the two list elements will be set to (int) 0 initially.
Attributes
Common Box Attributes
Messages
bang
Output currently stored list
int
Arguments
input
[int]
The number is stored as an item in a list, with its position in the list corresponding to the inlet in which it was received. A number in the left inlet also causes the list to be output. If the inlet has been initialized with a float or symbol argument, the incoming number will be converted to a float or a blank symbol.
float
Arguments
input
[float]
The number is stored as an item in a list, with its position in the list corresponding to the inlet in which it was received. A number in the left inlet also causes the entire list to be the output. If the inlet has been initialized with an int or symbol argument, the incoming number will be converted to an int or a (blank) symbol.
list
Arguments
input
[list]
Any multi-item message is treated as a list. The first item in the incoming list is stored in in the location that corresponds to the inlet in which it was received. Each subsequent item is stored as if it had arrived in subsequent inlets (limited to the number of inlets available). A list received in the left inlet causes the entire stored list to be sent out the outlet.
anything
Arguments
input
[list]
Performs the same function as
. nth
Arguments
index
[int]
The
message will output the stored list element at the index. Output is sent from the first outlet. send
Arguments
receive-name
[list]
Sends the stored list to all receive objects with a matching name.
set
Arguments
input
[list]
Sets the values without causing list output. Although the
message works with any inlet, it is only meaningful in the left inlet, which is the only inlet that will trigger output. symbol
Arguments
input
[symbol]
Stores the symbol in the list at the position corresponding to the inlet it was received. If the list element was initialized as a number, the symbol is converted to 0 before being stored. A symbol in the left inlet triggers output of the list.
Output
any
When the
message is received, the value of the specified item is sent out.list
The length of the list is determined by the number of arguments. When input is received in the left inlet, the stored list is sent out the outlet.
See Also
Name | Description |
---|---|
Working with Video in Jitter | Working with Video in Jitter |
bondo | |
buddy | |
join | |
match | |
pak | |
swap | |
thresh | |
unjoin | |
unpack | |
zl | |
Max Basic Tutorial 9: Mouse Drawing | Max Basic Tutorial 9: Mouse Drawing |