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

next

Detect logical separation of messages

Description

next sends a bang out its left outlet when an incoming message is not part of the same Max "event" as a previous message. (An "event" is a mouse click, key press, MIDI event, or tick of the scheduler.) Otherwise, next sends a bang out its right outlet. Use next to do something once per dump of an object such as coll.

Arguments

None.

Messages

bang Performs the same as anything.
int input [int]
Performs the same as anything.
float input [float]
Performs the same as anything.
anything input-messages [list]
Messages are tested to determine whether they are part of the same logical event. A logical event is one of the following: a mouse click, the ongoing polling of a mouse drag, an event generated by the scheduler (such as the bang from a metro), a MIDI event, or a keyboard event. next determines whether the current message is part of the same event as the previously received message. For example, if you click on a bang twice, the two bangs are not part of the same logical event. But if you put bang, bang in a message box, or use the uzi object to send out two bangs in a row, these bangs are part of the same logical event.

Information for box attributes common to all objects

Output

bang: Out left outlet: A bang is sent out if the current message is not part of the same logical event as the previously received message.

Out right outlet: A bang is sent out if the current message is part of the same logical event as the previously received message.

Examples

next detects when separate Max messages occur within the same logical event

See Also

Name Description
uzi Send a specific number of bang messages
defer De-prioritize a message
delay Delay a bang before passing it on.