<?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="accum" module="max" category="Math">
	<digest>
		Store, add to, and multiply a number
	</digest>
	<description>
		Stores a value (int or float), then adds or multiplies into it. If the argument is an integer, the multiplication is done in floating-point then converted to integer.
	</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>
				int Sets and Outputs Value, bang Outputs Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Add Input to Current Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Multiplies Current Value by Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Accumulator Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial" optional="1" type="int or float">
			<digest>
				Initial stored value
			</digest>
			<description>
				Sets the initial value stored in <o>accum</o>. An argument with a decimal point causes the value to be stored as a float.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output the stored value
			</digest>
			<description>
				In left inlet: Outputs the value currently stored in <o>accum</o>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Store value and cause output
			</digest>
			<description>
				In left inlet: Replaces the value stored in <o>accum</o>, and sends the new value out the outlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left and middle inlet: Converted to <m>int</m>, unless <o>accum</o> has a float argument.
				<br />
				<br />
				In right inlet: Multiplication is done with floats, even if the value is stored as an int.
			</description>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="ARG_NAME_0" type="float" optional="0" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Add to the stored value with no output
			</digest>
			<description>
				In middle inlet: The number is added to the stored value, without triggering output.
			</description>
		</method>
		<method name="in2">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Multiply by stored value with no output
			</digest>
			<description>
				In right inlet: The stored value is multiplied by the input, without triggering output.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Set the stored value with no output
			</digest>
			<description>
				In left inlet: The word <m>set</m>, followed by a number, sets the stored value to that number, without triggering output.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="accum.png" caption="Add to and/or multiply a stored value....... Used here to increment by different amounts" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="counter" />
		<seealso name="float" />
		<seealso name="int" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				The value currently held by <o>accum</o>.
			</description>
		</entry>
		<entry name="float">
			<description>
				Floats are output only if there is an argument with a decimal point.
			</description>
		</entry>
	</misc>
</c74object>
