<?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="random" module="max" category="Math">
	<digest>
		Generate a random number
	</digest>
	<description>
		Outputs random numbers within the range between 0 and 1 less than the argument specified.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Math
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Causes Random Number Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Causes Random Number Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Random Number Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="range" optional="1" type="int">
			<digest>
				Initial limit
			</digest>
			<description>
				Sets an initial limit to the random output. The output will always be between 0 and one less than this maximum limit. If there is no argument, the limit is initially set to <m>1</m>, which causes <o>random</o> to output 0 whenever it receives a <m>bang</m>.
			</description>
		</objarg>
		<objarg name="seed" optional="1" type="int">
			<digest>
				Random generator seed value
			</digest>
			<description>
				A second argument is used to set a &quot;seed&quot; value for the random generator. If no argument is specified, the time value will be used to initialize the seed.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output a random number
			</digest>
			<description>
				In left inlet: Sends out a randomly generated number between 0 and one less than its maximum limit.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="maximum" optional="0" type="int" />
			</arglist>
			<digest>
				Set the maximum limit
			</digest>
			<description>
				In right inlet: The number is stored as the maximum limit for the random output. The output will always be between 0 and one less than this maximum limit.
			</description>
		</method>
		<method name="seed">
			<arglist>
				<arg name="seed-value" optional="0" type="int" />
			</arglist>
			<digest>
				Seed the random generator
			</digest>
			<description>
				In left inlet: The word <m>seed</m>, followed by a number, provides a &quot;seed&quot; value for the random generator, which causes a specific (reproducible) sequence of pseudo-random numbers 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 numbers. This unpredictable seed is used by default when the <o>random</o> object is created.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="random.png" caption="Generate random events, or make decisions based on probability" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="decide" />
		<seealso name="drunk" />
		<seealso name="urn" />
		<seealso name="basicchapter10" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				When a <m>bang</m> is received in the left inlet, <o>random</o> generates a random number between 0 and one less than its maximum limit.
			</description>
		</entry>
	</misc>
</c74object>
