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

selector~ Reference

Assign one of several inputs to an outlet

selector~

Examples

Arguments

choices [number]

Optional

Number of inputs signals to select from.

Inlets

onoff [auto]

Select which input to route to the outlet. If the value is 0 or negative, a zero signal is sent out. If the value is greater than the number of inputs, the right-most input is used. If a signal is connected to the left inlet, this message is ignored.

Outlets

out [signal]

The output is the signal coming in the "open" inlet, as specified by a number or signal in the left inlet. The output is a zero signal if all signal inlets are shut off.

Fixed Attributes

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

choices [number] (default: 1)

Number of inputs signals to select from.

Dynamic Attributes

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

onoff [auto]

Select which input to route to the outlet. If the value is 0 or negative, a zero signal is sent out. If the value is greater than the number of inputs, the right-most input is used. If a signal is connected to the left inlet, this message is ignored.

See Also

Name Description
gate~ Pass a signal to one of several outlets.
switch Accept messages from a specific inlet.