<?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="decide" module="max" category="Math">
	<digest>
		Choose randomly between 1 and 0
	</digest>
	<description>
		Outputs random <m>1</m> and <m>0</m> messages. The output sequence depends on the seed value to determine the sequence of values.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Make A Decision
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Set Seed (0 = Use System Time)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Randomly Generated 0 or 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="seed" optional="1" type="int">
			<digest>
				Random seed value
			</digest>
			<description>
				Sets a &quot;seed&quot; value to cause a specific (reproducible) sequence of pseudo-random <m>0</m> and <m>1</m> outputs to occur. If there is no argument, the time elapsed since system startup (an unpredictable value) is used as the seed, ensuring an unpredictable sequence for output.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output <m>1</m> or <m>0</m> 
			</digest>
			<description>
				Causes a randomly chosen output of <m>1</m> or <m>0</m>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Output <m>1</m> or <m>0</m> 
			</digest>
			<description>
				In left inlet: Same as <m>bang</m>.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="seed" optional="0" type="int" />
			</arglist>
			<digest>
				Change the seed value
			</digest>
			<description>
				In right inlet: A given &quot;seed&quot; number causes a specific (reproducible) sequence of pseudo-random <m>0</m> and <m>1</m> outputs to occur. The number <m>0</m> uses the time elapsed since system startup (an unpredictable value) as the seed, ensuring an unpredictable sequence of <m>0</m> and <m>1</m> outputs.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="decide.png" caption="Simulate a coin toss switch randomly between on and off" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="drunk" />
		<seealso name="random" />
		<seealso name="toggle" />
		<seealso name="urn" />
		<seealso name="interfacechapter02" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				<m>1</m> or a <m>0</m>, chosen at random. With certain seed values, the output may seem at first to follow a &quot;non-random&quot; pattern, but over the course of many iterations the sequence becomes unpredictable and the balance between <m>1</m> and <m>0</m> becomes even.
			</description>
		</entry>
	</misc>
</c74object>
