<?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="average~" module="msp" category="MSP Operators">
	<digest>
		Multi-mode signal average
	</digest>
	<description>
		Use the <o>average~</o> to perform <m>bipolar</m>, <m>absolute</m>, or <m>rms</m> averaging on any input signal.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Analysis
		</metadata>
		<metadata name="tag">
			MSP Operators
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				(signal) Input and Messages
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Running Mean Average Out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="max-averaging-interval" optional="1" units="samples" type="int">
			<digest>
				Maximum averaging interval
			</digest>
			<description>
				Sets the maximum averaging interval in samples. The default value is 100.
			</description>
		</objarg>
		<objarg name="averaging-mode" optional="1" type="symbol">
			<digest>
				Averaging mode
			</digest>
			<description>
				Sets the averaging mode, as defined in the &quot;Messages&quot; section. The default is <m>bipolar</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="averaging-sample-interval" optional="0" units="samples" type="int" />
			</arglist>
			<digest>
				Set the averaging sample interval
			</digest>
			<description>
				Sets the interval in samples used for each of the three modes of signal averaging. The default value is <m>100</m>.
			</description>
		</method>
		<method name="bipolar">
			<arglist />
			<digest>
				Set bipolar averaging mode (default)
			</digest>
			<description>
				Sets bipolar averaging mode (default). In bipolar mode, the sample values are averaged.
			</description>
		</method>
		<method name="absolute">
			<arglist />
			<digest>
				Set absolute averaging mode
			</digest>
			<description>
				Sets absolute averaging mode. This mode averages the absolute value of the incoming samples.
			</description>
		</method>
		<method name="rms">
			<arglist />
			<digest>
				Set root mean square (RMS) averaging mode
			</digest>
			<description>
				Sets root mean square (RMS) averaging mode. This mode computes the square root of the average of the sample values squared.
				<br />
				<br />
				The RMS mode of the <o>average~</o> object is more CPU-intensive than the bipolar and absolute modes.While RMS values are often used to measure signal levels, the absolute mode often works as well as the RMS mode in many level-detection tasks.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				The signal to be averaged
			</digest>
			<description>
				The signal to be averaged.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="average~.png" caption="Running average of a signal across n samples" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="avg~" />
		<seealso name="meter~" />
		<seealso name="17_msp_compress_00" module="msp" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				The running average value of the input signal averaged over the specified number of samples.
			</description>
		</entry>
	</misc>
</c74object>
