Gate
The Gate node acts as a conditional passthrough. It has two inputs: a gate signal and a value. The value only passes through to the output when the gate receives a truthy signal (true, a non-zero number, a non-empty string, or a pulse). If the gate signal is falsy, the value is blocked and nothing is sent downstream. This is useful for conditionally enabling or disabling parts of your flow.
Inputs
| Name | Type | Description |
|---|---|---|
Gate | boolean or pulse | The control signal. When truthy, the gate opens and the value passes through. |
Value | any | The data to pass through when the gate is open |
Outputs
| Name | Type | Description |
|---|---|---|
Value | any | The input value, passed through unchanged when the gate is open |
Example
You want TTS alerts to only play when your stream is live. Connect a Stream Status data node to the Gate input -- it outputs true when you are live and false when offline. Connect your TTS text to the Value input. When you are live, the text flows through to the TTS effect. When you are offline, the gate blocks it and nothing plays.