mc.gate~ Reference

Route a signal to one of several outlets (multichannel)

mc.gate~

Description

Use gate~ to route an input signal at the second inlet to one of several outlets, or to no outlet at all. When there is only one outlet (the default case), it acts as a simple switch. Unlike the Max gate object, any outlet which is not selected outputs a signal composed of zero values.

Arguments

number-of-outlets [int]

Optional

Number of outlets

initial-open-outlet [int]

Optional

Set the outlet that is initially selected. If 0, all signals are shut off and zero signals are sent out all outlets.

Attributes

Common Box Attributes

Multichannel Group Attributes

Messages

int

Arguments

outlet-selected [int]
Select outlet to route input to. If the number is 0 or negative a zero signal is sent out. If the number is greater than the number of outlets, the signal is sent to the rightmost outlet. If a signal is connected to the left inlet, gate~ ignores int or float messages.

float

TEXT_HERE

signal

In left inlet: Select outlet to route input to. If the number is 0 or negative a zero signal is sent out. If the number is greater than the number of outlets, the signal is sent to the rightmost outlet. If a signal is connected to the left inlet, gate~ ignores int or float messages.

In right inlet: The input signal to be passed through to one of the gate~ object's outlets, according to the most recently received int or float in the left inlet, or the value of the signal coming in the left inlet.

Multichannel Group Messages

Output

signal

Depending on the value of the left inlet (either signal or number), one of the object's outlets will send out the input signal and rest will send out zero signals, or (if the inlet is closed) all outlets will send out zero signals.

See Also

Name Description
selector~
matrix~
gate
MSP Basics Tutorial 4: Routing Signals MSP Basics Tutorial 4: Routing Signals
MSP Panning Tutorial 1: Simple panning MSP Panning Tutorial 1: Simple panning