<?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="togedge" module="max" category="Control">
	<digest>
		Report zero/non-zero transitions
	</digest>
	<description>
		Output bangs for 0-to-1 transitions out the left outlet, and bangs the right outlet for 1-to-0 transitions. Outlets alternate output when bangs are received.
	</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="INLET_TYPE">
			<digest>
				Connect to a checkbox (or bang it to toggle outs)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Connect to a checkbox (or bang it to toggle outs)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				In Phase With Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Out Of Phase With Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Toggle and cause output
			</digest>
			<description>
				Switches the value stored in <o>togedge</o> from 0 to non-zero, or vice versa, and reports the change by sending a <m>bang</m> out one of the outlets.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store and cause output
			</digest>
			<description>
				The number is stored in <o>togedge</o>. If it is not 0, and the previously stored number was <m>0</m>, <o>togedge</o> sends a <m>bang</m> out the left outlet. If the number is <m>0</m>, and the previously stored number was not 0, <o>togedge</o> sends a <m>bang</m> out the right outlet. Otherwise, <o>togedge</o> sends no output.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="togedge.png" caption="Used as a detector of on/off status, or to switch back and forth between two triggers" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="change" />
		<seealso name="led" />
		<seealso name="toggle" />
	</seealsolist>
	<misc name="Output">
		<entry name="bang">
			<description>
				Out left outlet: If the stored value is changed from 0 to not 0.
				<br />
				<br />
				Out right outlet: If the stored value is changed from not 0 to 0.
			</description>
		</entry>
	</misc>
</c74object>
