gswitch Reference

Select output from two inlets

gswitch

Examples

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

Arguments

None.

Attributes

bgcolor [4 floats]7.0.0

Sets the outline color of the gswitch object in RGBA format.

color [4 floats]7.0.0

Sets the color of the gswitch pathway in RGBA format.

inputs [atom_long] (default: 2)

Sets the number of inputs for the gswitch object.

int [atom_long] (default: 0)

Specifies which one of the other two inlets is to be open. The default is 0 (middle inlet).

parameter_enable [int]

Enables use of this object with Max for Live Parameters and allows for setting initial parameter values in the Max environment.

parameter_mappable [int] (default: 1)

When parameter_mappable is enabled, the object will be available for mapping to keyboard or MIDI input using the Mappings feature.

style [symbol] (default: )7.0.0

Sets the style to be applied to the object. Styles can be set using the Format palette.

switchcolor [4 floats]7.0.0

Sets the switch contacts color of the gswitch object in RGBA format.

Common Box Attributes

Parameter Attributes

Messages

bang

In left inlet: Causes the connection to be made to the other inlet.

int

Arguments

inlet [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

Arguments

inlet [float]
In left inlet: Converted to int.

list

Arguments

input [list]
A list sent to one of the gswitch inlets will pass through if the appropriate connection is made.

anything

Arguments

input [list]
Any message sent to one of the gswitch inlets will pass through if the appropriate connection is made.

(mouse)

Clicking on gswitch causes the connection to be made to the other inlet.

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.

See Also

Name Description
gate
ggate
pictctrl
receive
route
router
switch