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

past

Report when input increases beyond a certain number

Description

past sends a bang when a number in a list of numbers rises above a certain specified value.

Arguments

Name Type Opt Description
watch-list list Sets the numbers which must be equaled or exceeded by the numbers received in the inlet.
watch-number int Sets a single number which must be equaled or exceeded by the number received in the inlet.

Messages

int input [int]
If there is only one argument, and the input is greater than or equal to it, and the previous input was not greater than or equal to it, past sends a bang out the outlet.
float input [float]
If there is only one argument, and the input is greater than or equal to it, and the previous input was not greater than or equal to it, past sends a bang out the outlet.
list input [list]
The numbers in the list are compared to the arguments. If all of the numbers in the list are greater than or equal to the corresponding arguments, a bang is sent out the outlet. Before a bang is sent again, however, past must receive a clear message, or must receive another list in which the number that equaled or exceeded its argument goes back below (is less than) its argument.
clear Causes past to forget previously received input, readying it to send a bang message again.
set watch-list [list]
The word set, followed by one or more numbers, sets the numbers which must be equaled or exceeded by the numbers received in the past object's inlet.

Information for box attributes common to all objects

Output

bang: If all of the arguments are equaled or exceeded by the numbers received in the inlet, past sends out a bang. Otherwise, past does nothing. A bang is sent only as a number increases past its threshold. Once the threshold has been passed, the number must go below the threshold again, then increase past it, before another bang will be sent.

Examples

Send out bang only when the input goes past the threshold in an upward direction

See Also

Name Description
maximum Output the greatest in a list of numbers
peak If a number is greater than previous numbers, output it
> Is greater than, comparison of two numbers