<?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="slide" module="max" category="Math">
	<digest>
		Smooth values logarithmically
	</digest>
	<description>
		Filters an input value logarithmically between changes. It's particularly useful for envelope following and lowpass filtering to smooth a stream of continuous data.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="float">
			<digest>
				(float) Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="float">
			<digest>
				(float) Slide up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="float">
			<digest>
				(float) Slide down
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="float">
			<digest>
				(float) Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="slide-up" optional="1" type="float">
			<digest>
				Slide-up value
			</digest>
			<description>
				Specifies the slide up value. The default is 1.
			</description>
		</objarg>
		<objarg name="slide-down-value" optional="1" type="float">
			<digest>
				Slide-down value
			</digest>
			<description>
				A second argument specifies the slide down value. The default is 1.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Smooth last received value
			</digest>
			<description>
				Performs the same function as <m>float</m> using the last input value.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Smooth input value logarithmically
			</digest>
			<description>
				Converted to <m>float</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Smooth input value logarithmically
			</digest>
			<description>
				In left inlet: An input value to be filtered. When a new value is received, object filters an input value logarithmically between changes using the formula
				<br />
				<br />
				y (n) = y (n-1) + ((x (n) - y (n-1))/slide)
				<br />
				<br />
				A given sample output from <o>slide</o> is equal to the last value plus the difference between the last value and the input divided by the slide value. Given a slide value of 1, the output will therefore always equal the input. Given a slide value of 10, the output will only change 1/10th as quickly as the input. This can be particularly useful for lowpass filtering or envelope following.
			</description>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Set slide-up value
			</digest>
			<description>
				In middle inlet: Specifies the slide up value to be used when an incoming value is greater than the current value.
			</description>
		</method>
		<method name="ft2">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Slide-down value
			</digest>
			<description>
				In right inlet: Specifies the slide down value to be used when an incoming value is less than the current value.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Set the current value
			</digest>
			<description>
				The word <m>set</m> followed by a number will set the current input value to the given number without causing output (<m>bang</m> can be used to cause successive output).
			</description>
		</method>
		<method name="reset">
			<arglist />
			<digest>
				Reset the current output value
			</digest>
			<description>
				Resets the current output sample to 0.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="slide.png" caption="slide performs logarithmic smoothing of an input" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="expr" />
		<seealso name="datachapter02" module="max" type="tutorial" />
	</seealsolist>
	<discussion>
		The formula is y (n) = y (n-1) + ((x (n) - y (n-1))/slide).
	</discussion>
	<misc name="Output">
		<entry name="float">
			<description>
				The filtered input value.
			</description>
		</entry>
	</misc>
</c74object>
