latch~
Conditionally pass or hold input
Description
Latch an input signal based on the values read from the right inlet. The latch is closed on initialization, resulting in an output of . Once a non-zero value is provided to the right inlet, signals from the left inlet are routed to the output until another zero value is sent to the right inlet.
Arguments
control [auto]
A zero value will close the latch while a non-zero value will open the latch.
Inlets
x [auto]
Input to be latchedcontrol [auto]
A zero value will close the latch while a non-zero value will open the latch.
Outlets
out1 [signal]
The latched outputFixed Attributes
These attributes must be set in the object box and determine the behavior of the object at runtime.
init [number] (default: 0)
Initial held value
Dynamic Attributes
These attributes can be modified in the code during execution using the set object
control [auto]
A zero value will close the latch while a non-zero value will open the latch.
reset [bang] (default: 0)
Banging this attribute will reset the object to its default state.
x [auto]
Input to be latched
See Also
| Name | Description |
|---|---|
| gate | Pass an input to one of several outlets. |
| gate~ | Pass a signal to one of several outlets. |
| selector~ | Assign one of several inputs to an outlet |