<?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="updown~" module="MSP" category="msp">
	<digest>
		Trapezoidal Function Generator With Constant Attack and Release
	</digest>
	<description>
		The <o>updown~</o> object is driven by a ramp from 0 - 1 or 1 - 0. It generates a trapezoidal function where the attack and release times are independent of the speed of the input ramp, unlike <o>trapezoid~</o> where start and end times are specified as a proportion of the total input ramp cycle and thus will vary with the speed of the input ramp.
		<br />
		<br />
		Note that the <at>up</at> phase of the <o>updown~</o> object's output occurs after the reset of a phasor or a zero-to-non-zero transition, whether the input ramp moves up or down. The <at>down</at> phase of the output occurs in the time before a reset (or the end of the ramp) is expected to occur.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Functions
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				Phasor Input
			</digest>
			<description>
				Drive an <o>updown~</o> object with a signal that ramps from 0 to 1 or 1 to 0.
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
				Phasor Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Trapezoidal Output
			</digest>
			<description>
				The <o>updown~</o> signal ramp that goes from 0 to the value specified by the <at>level</at> attribute and back to 0.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="signal">
			<arglist />
			<digest>
				Phasor Input
			</digest>
			<description>
				The <o>updown~</o> object produces a trapezoidal output in response to a signal ramp from 0 - 1 or 1 - 0.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="down" get="1" set="1" type="float" size="1">
			<digest>
				Down (Release) Time
			</digest>
			<description>
				Sets the time of the output ramp descending from the maximum value to 0 in milliseconds
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Down (Release) Time" />
			</attributelist>
		</attribute>
		<attribute name="level" get="1" set="1" type="float" size="1">
			<digest>
				Level
			</digest>
			<description>
				Sets the maximum value of the trapezoidal function
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="float" size="1" value="1." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Level" />
			</attributelist>
		</attribute>
		<attribute name="up" get="1" set="1" type="float" size="1">
			<digest>
				Up (Attack) Time
			</digest>
			<description>
				Sets the time of the output ramp ascending from 0 the maximum value in milliseconds
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Up (Attack) Time" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="phasor~" />
		<seealso name="trapezoid~" />
		<seealso name="kink~" />
		<seealso name="line~" />
		<seealso name="subdiv~" />
		<seealso name="zigzag~" />
	</seealsolist>
</c74object>
