A newer version of Max is available. Click here to access the latest version of this document.

funnel

Tag data with a number that identifies its inlet

Description

funnel makes lists that identify the source of a number. It can be used to store numbers into a table or coll based on their source. Or it can be used in conjunction with other objects such as spray.

Arguments

Name Type Opt Description
number-of-inlets int opt The first argument sets the number of inlets in the funnel. If there is no argument there will be two inlets. The second argument specifies an offset for the first inlet number. If no second argument is present, the inlets are numbered beginning with 0.

Messages

bang In any inlet: The number of the inlet and the stored (most recently received) number in that inlet are sent out as a two-item list.
int input [int]
In any inlet: The number of the inlet and the received number are sent out as a list.
float input [float]
In any inlet: The number of the inlet and the received number are sent out as a list.
list inputs [list]
In any inlet: The number of the inlet is prepended to the list, and the new list is sent out. In a list floats are not converted to ints. The list may contain ints, floats, and symbols (provided that the first element of the list is not a symbol).
anything inputs [list]
Functions the same as list.
offset first/left-inlet-offset [int]
The word offset followed by a number will offset the numbering of inlets by the number given.
set inputs [list]
In any inlet: The word set followed by a list of numbers which correspond with the number of inlets, will set the input list of numbers without sending them through the outputs.

Information for box attributes common to all objects

Output

list: When a number or list is received in any inlet, funnel outputs a list consisting of the inlet number followed the input. funnel can be useful in conjunction with other objects such as coll, funbuff and table.

Examples

Use funnel to tag incoming data or to store data into a coll object

See Also

Name Description
listfunnel Index elements of a list and output them individually
spray Distribute a value to a numbered outlet