<?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/float">
			<digest>
				Initial limit
			</digest>
			<description>
				Sets an initial limit to the random output. If an <m>int</m>, the output will always be between 0 and one less than this maximum limit. If a <m>float</m>, the output will be between 0 and the 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="int">
			<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="float">
			<arglist>
				<arg name="maximum" optional="0" type="float" />
			</arglist>
			<digest>
				Set the maximum limit (floating-point)
			</digest>
			<description>
				In right inlet: The number is stored as the maximum limit for the random output. Additionally <at>floatoutput</at> will be enabled and the object will generate floating-point output
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="minimum" optional="0" type="atom" />
				<arg name="maximum" optional="0" type="atom" />
			</arglist>
			<digest>
				Set the range
			</digest>
			<description>
				In right inlet: The numbers are used to set the <at>range</at> of the object. The <at>range</at> can be any two numerical values, including negative values. If the <at>range</at> contains a floating-point value, <at>floatoutput</at> will be enabled, and the object will generate floating-point output.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="classic" get="1" set="1" type="int" size="1">
			<digest>
				Use Bad Old Random Number Generator
			</digest>
			<description>
				Enable/disable classic mode, which uses the bad old random number generator. Default is 0 (disabled).
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Use Bad Old Random Number Generator" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="floatoutput" get="1" set="1" type="int" size="1">
			<digest>
				Generate Floating-Point Values
			</digest>
			<description>
				Enable/disable float output using the current <at>range</at>.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Generate Floating-Point Values" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="range" get="1" set="1" type="atom" size="2">
			<digest>
				Range of Generated Values
			</digest>
			<description>
				The <at>range</at> can be any two numerical values, including negative values. If the <at>range</at> contains a floating-point value, <at>floatoutput</at> will be enabled, and the object will generate floating-point output.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="atom" size="2" value="0 1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Range of Generated Values" />
			</attributelist>
		</attribute>
		<attribute name="seed" get="1" set="1" type="atom_long" size="1">
			<digest>
				Random Seed
			</digest>
			<description>
				The seed is now an attribute, permitting users to acquire automatically-awarded seed values via an object such as <o>getattr</o>.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Random Seed" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--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>
