<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="onebang" module="max" category="Control">
	<digest>
		Gate bangs using a bang
	</digest>
	<description>
		Allows a <m>bang</m> in the left inlet to pass through ONLY if a <m>bang</m> has been received in the right inlet. After that, a <m>bang</m> in the left inlet will not get through again until a <m>bang</m> has been received again in the right inlet.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Control
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="bang/anything">
			<digest>
				(bang/anything) Only first bang gets through
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="bang/anything">
			<digest>
				(bang/anything) Set to let one bang through
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="bang">
			<digest>
				(bang) First bang
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="bang">
			<digest>
				(bang) All other bangs
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initialization" optional="1" type="int">
			<digest>
				First-time pass-through
			</digest>
			<description>
				A non-zero argument sets <o>onebang</o> to permit a <m>bang</m> to be sent out the left outlet the first time a <m>bang</m> is received in the left inlet.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Causes a <m>bang</m> 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.
				<br />
				<br />
				In right inlet: Resets <o>onebang</o> to permit a <m>bang</m> to be sent out the next time a <m>bang</m> is received in the left inlet.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In either inlet: Same as a <m>bang</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In either inlet: Same as a <m>bang</m>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In either inlet: Same as a <m>bang</m>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In either inlet: Converted to <m>bang</m>.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Ignore previous right inlet input
			</digest>
			<description>
				In left inlet: Undoes the effect of a <m>bang</m> in the right inlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="onebang.png" caption="Allow just one of (potentially) many bang messages to get through" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="gate" />
		<seealso name="gswitch2" display="Ggate" type="refpage">
			Pass the input out one of two outlets
		</seealso>
	</seealsolist>
	<misc name="Output">
		<entry name="bang">
			<description>
				When <o>onebang</o> receives a <m>bang</m> in its left inlet, it sends a <m>bang</m> out its left outlet only if it has received a <m>bang</m> in its right inlet since the last time it sent out a <m>bang</m>. Otherwise, it sends a <m>bang</m> out its right outlet.
			</description>
		</entry>
	</misc>
</c74object>
