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

switch Reference

Accept messages from a specific inlet.

switch

Examples

Arguments

inputs [number]

Optional

Number of inputs.

onoff [number]

Optional

0 Turns switch Off, Non-zero Selects Input, Bang Reports Inlet.

Inlets

onoff [number]

0 Turns switch Off, Non-zero Selects Input, Bang Reports Inlet.

Outlets

out [bang, number, list]

Messages from selected input.

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

inputs [number] (default: 2)

Number of inputs.

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

onoff [number]

0 Turns switch Off, Non-zero Selects Input, Bang Reports Inlet.

See Also

Name Description
gate Pass an input to one of several outlets.
route Select outlet based on input matching.