onebang Reference

Gate bangs using a bang

onebang

Description

Allows a bang in the left inlet to pass 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.

Examples

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

Arguments

initialization [int]

Optional

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.

Attributes

Common Box Attributes

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

Arguments

input [int]
In either inlet: Same as a bang.

float

Arguments

input [float]
In either inlet: Same as a bang.

list

Arguments

input [list]
In either inlet: Same as a bang.

anything

Arguments

input [list]
In either inlet: Converted to bang.

stop

In left inlet: Undoes the effect of a bang in the right inlet.

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.

See Also

Name Description
Sharing Max Patchers Sharing Max Patchers
gate
Ggate