onebang

Traffic control for bang messages

Description

When onebang receives a bang in the left inlet. It lets a bang in the left inlet get through ONLY if a bang has been received in the right inlet. After that, a bang in the left inlet will not get through again until a bang has been received again in the right inlet.

Arguments

Name Type Opt Description
initialization-flag int opt A non-zero argument sets onebang to permit a bang to be sent out the left outlet the first time a bang is received in the left inlet.

Messages

bang In left inlet: Causes a bang to be sent out the left inlet only if a bang has been received in the right inlet since the last bang was sent out.

In right inlet: Resets onebang to permit a bang to be sent out the next time a bang is received in the left inlet.
int input [int]
In either inlet: Same as a bang.
float input [float]
In either inlet: Same as a bang.
list input [list]
In either inlet: Same as a bang.
anything input [list]
In either inlet: Converted to bang.
stop In left inlet: Undoes the effect of a bang in the right inlet.

Information for box attributes common to all objects

Output

bang: When onebang receives a bang in its left inlet, it sends a bang out its left outlet only if it has received a bang in its right inlet since the last time it sent out a bang. Otherwise, it sends a bang out its right outlet.

Examples

Allow just one of (potentially) many bang messages to get through

See Also

Name Description
gate Pass the input out a specific outlet
Ggate Pass the input out one of two outlets