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

match

Look for a series of arguments, output it as a list whenever an input matches

Description

match watches an incoming stream of ints, floats, symbols, lists, or messages, and outputs the stream after it has met the specification of its arguments.

Arguments

Name Type Opt Description
numbers-to-match list Obligatory. The arguments specify numbers to look for, in the proper order. The word nn can be used as a wild card that will match any number.

Messages

int input [int]
If the numbers match the arguments, in the proper order, they are sent out as a list.
float input [float]
If the numbers match the arguments, in the proper order, they are sent out as a list.
list input [list]
If the input-list matches the arguments, in the proper order, they are sent out as a list.
anything input [list]
Performs the same as list.
clear Causes match to forget all numbers it has received up to that time.
set numbers-to-match [list]
The word set, followed by a list of numbers, specifies a new series of numbers match will look for.

Information for box attributes common to all objects

Output

list: The numbers received in the inlet are compared with the arguments. If the numbers are the same, and in the same order, they are sent out the outlet as a list.

Examples

Numbers must be the same and in the same order

See Also

Name Description
iter Break a list up into a series of numbers
pack Combine numbers and symbols into a list
select Select certain inputs, pass the rest on