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.
Examples

gate~ routes the input signal to one of its outlets, or shuts it off entirely
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
Messages
int
Arguments
outlet-selected
[int]
Select outlet to route input to. If the number is gate~ ignores or messages.
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 is connected to the left inlet, float
TEXT_HERE
signal
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 is connected to the left inlet,Output
signal
Depending on the value of the left inlet (either
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 |