<?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="ramp~" module="" category="">
	<digest>
		Trigger a Single Ramp With an Audio Signal
	</digest>
	<description>
		The <o>ramp~</o> object generates a single signal ramp between a start and end value when it detects a change in an audio signal connected to its left inlet. The duration of the ramp can be a fixed value or based on the signal in <o>ramp~</o>'s second inlet.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				Trigger Input
			</digest>
			<description>
				An output ramp is triggered when the incoming signal goes from a zero to non-zero value.
			</description>
		</inlet>
		<inlet id="1" type="signal, float">
			<digest>
				Duration Input
			</digest>
			<description>
				If a signal is connected to the second inlet, the ramp duration is set according to the current setting of the <at>mode</at> attribute. If <at>mode</at> is 0, the value of the duration signal at the moment it starts becomes the unchanging duration of the ramp. If <at>mode</at> is 1, the duration can be updated over the course of the ramp if the value of the signal changes.
			</description>
		</inlet>
		<inlet id="2" type="signal, float">
			<digest>
				Start
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="3" type="signal, float">
			<digest>
				End
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Ramp Output
			</digest>
			<description>
				A signal ramp from the <at>start</at> to <at>end</at> values. After the ramp completes, the value is 0 if the <at>reset</at> attribute is enabled, otherwise it remains at the <at>end</at> value.
			</description>
		</outlet>
		<outlet id="1" type="signal">
			<digest>
				bang When Ramp Completes
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="duration" type="float" optional="1">
			<digest>
				Duration
			</digest>
			<description>
				If a float argument to <o>ramp</o> is present, it sets the initial value of the <at>duration</at> attribute. If a signal is connected to the second inlet, the <at>duration</at> attribute value is ignored in favor of the value of the signal.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				Converted to <m>float</m> 
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="ARG_NAME_0" type="float" optional="0" />
			</arglist>
			<digest>
				Set duration or ramp start and end values
			</digest>
			<description>
				In left or second inlet: sets the ramp duration (only used if no signal is connected to the second inlet)
				<br />
				In third inlet: Sets the ramp start value
				<br />
				In right inlet: Sets the ramp end value
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Trigger ramp, set duration, or set ramp start and end values
			</digest>
			<description>
				A signal connected to the left inlet triggers the ramp when it goes from zero to non-zero
				<br />
				A signal connected to the second inlet sets the ramp duration
				<br />
				A signal connected the third inlet sets the ramp start value
				<br />
				A signal connected the right inlet sets the ramp end value
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="curve" get="1" set="1" type="float" size="1">
			<digest>
				Curvature
			</digest>
			<description>
				The <at>curve</at> attribute sets the parameters of the exponential function that generates the non-linear output. It can range between -1 and 1. For ascending ramps, values of <at>curve</at> less than 1 produce values above the linear input and values of <at>curve</at> greater than 1 produce values below the linear input. As <at>curve</at> values near -1 or 1, the curavture becomes more extreme.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Curvature" />
			</attributelist>
		</attribute>
		<attribute name="duration" get="1" set="1" type="float" size="1">
			<digest>
				Duration
			</digest>
			<description>
				Sets the duration of the ramp in milliseconds. The <o>ramp</o> object uses this value only when a signal is <i>not</i> connected to the second inlet.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Duration" />
			</attributelist>
		</attribute>
		<attribute name="end" get="1" set="1" type="float" size="1">
			<digest>
				End Value
			</digest>
			<description>
				Set the final value of the ramp.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="End Value" />
			</attributelist>
		</attribute>
		<attribute name="interval" get="1" set="1" type="int" size="1">
			<digest>
				Sample Interval
			</digest>
			<description>
				The curved output is a piecewise linear approximation of the exponential function. The <at>interval</at> attribute sets the number of samples used for each line segement. Values of <at>interval</at> must be a power of 2 between 2 and 64 samples. Larger values will produce a less accurate approximation but could be more efficient. If the signal vector size is less than <at>interval</at>, the actual segment length will be the signal vector size.
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="6">
					<enumlist>
						<enum name="2">
							<digest>
								2 sample segment length
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="4">
							<digest>
								4 sample segment length
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="8">
							<digest>
								8 sample segment length
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="16">
							<digest>
								16 sample segment length
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="32">
							<digest>
								32 sample segment length
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="64">
							<digest>
								64 sample segment length
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Curve Sample Interval" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="mode" get="1" set="1" type="int" size="1">
			<digest>
				Duration Mode
			</digest>
			<description>
				Sets whether the duration of the ramp is recomputed if the value of the signal connected to the second (duration) inlet changes.
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="Set Duration at Start">
							<digest>
								Duration is set at the start of the ramp and remains constant
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Update Duration Continuously">
							<digest>
								Duration can change if the signal value connected to the right inlet changes.
							</digest>
							<description>
								The total duration of the ramp is recomputed to take into account the elapsed time. For example, if the original ramp was 1000 ms, and the duration signal changes to 1500 ms after the ramp has been going for 400 ms, the ramp will continue for another 1100 ms. In this case the slope of the ramp will be reduced so it takes the extra time to reach the end value.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Duration Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="reset" get="1" set="1" type="int" size="1">
			<digest>
				Reset After Ramp
			</digest>
			<description>
				Sets whether the value of the ramp resets to zero after it completes (<at>reset</at> equal to 1) or remains at the <at>end</at> value (<at>reset</at> equal to 0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Reset After Ramp" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="retrigger" get="1" set="1" type="int" size="1">
			<digest>
				Allow Retrigger During Ramp
			</digest>
			<description>
				When <at>retrigger</at> is set to 0 (off), it is not possible to retrigger a ramp while a current ramp is in progress. When set to 1 (on), you may retrigger a ramp during the current ramp. The default value is 0 (off).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Allow Retrigger During Ramp" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="start" get="1" set="1" type="float" size="1">
			<digest>
				Start Value
			</digest>
			<description>
				Set the initial value of the ramp.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Start Value" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="click~" />
		<seealso name="line~" />
		<seealso name="mc.snowphasor~" />
		<seealso name="rate~" />
		<seealso name="phasor~" />
		<seealso name="pong~" />
		<seealso name="trapezoid~" />
		<seealso name="triangle~" />
		<seealso name="zigzag~" />
	</seealsolist>
</c74object>
