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

split Reference

Look for a range of numbers

split

Description

Check if input can fall within a specified range. If it falls within that range, it sends the number out the left outlet and if it does not, then it sends the number out the right outlet.

Examples

Used to divert a certain range of numbers to a different destination

Arguments

minimum [number]

The first argument sets the minimum value to be sent out the left outlet. If the first argument is an int, then the split object will convert all float values to ints.

maximum [number]

The second argument sets the maximum value to be sent out the left outlet. If the first argument to split is an int, the output is int. If it is float, the output is float. This is true regardless of the type of the input.

Attributes

Common Box Attributes

Messages

int

Arguments

input [int]
In left inlet: If the number is within a specified range, it is sent out the left outlet. Otherwise, it is sent out the right outlet.

In middle inlet: The number is stored as the minimum value in the range of numbers looked for by split. If the number is an int, then the split object will convert all float values to ints.

In right inlet: The number is stored as the maximum value in the range of numbers looked for by split.

float

Arguments

input [float]
In left inlet: If the number is within a specified range, it is sent out the left outlet. Otherwise, it is sent out the right outlet.

In middle inlet: The number is stored as the minimum value in the range of numbers looked for by split. If the number is an int, then the split object will convert all float values to ints.

In right inlet: The number is stored as the maximum value in the range of numbers looked for by split.

Output

int

If the number received in the left inlet is greater than or equal to the specified minimum, and it is less than or equal to the specified maximum, it is sent out the left outlet. Otherwise, it is sent out the right outlet.

See Also

Name Description
Working with Video in Jitter Working with Video in Jitter
route
select
<=
>=
Max Basic Tutorial 19: Timing Max Basic Tutorial 19: Timing