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

gswitch

Receive the input in one of two inlets

Description

gswitch switches its output between two input streams.

Arguments

None.

Messages

bang In left inlet: Causes the connection to be made to the other inlet.
int outlet-number (0 or non-zero) [int]
In left inlet: The number specifies which one of the other inlets is to be open. 0 specifies the middle inlet, any number other than 0 specifies the right inlet. The gswitch icon shows the open inlet.
float outlet-number (0 or non-zero) [float]
In left inlet: Converted to int.
(mouse) Clicking on gswitch causes the connection to be made to the other inlet.

Attributes

Name Type g/s Description
int int
def.:0
Specifies which one of the other two inlets is to be open. The default is 0 (middle inlet).

Information for box attributes common to all objects

Output

anything: If the number in the left inlet is 0, all messages received in the middle inlet are passed out the outlet, and messages received in the right inlet are ignored. If the number in the left inlet is not 0, messages received in the middle inlet are ignored, and all messages received in the right inlet are passed out the outlet.

Examples

Specify one of two inlets Any comparison can be used as a criterion

See Also

Name Description
gate Pass the input out a specific outlet
ggate Pass the input out one of two outlets
pictctrl Picture-based control
receive Receive messages without patch cords
route Selectively pass the output out a specific outlet
router matrixctrl-compatible Max message router
switch Output messages from a specific inlet