<?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="line~" module="msp" category="MSP Functions">
	<digest>
		Linear ramp generator
	</digest>
	<description>
		Use the <o>line~</o> object to generate a signal ramp or envelope. It uses the Max <link name="maxtime" module="core" type="vignette">time format</link> syntax; envelope times can be either single valued fixed or tempo-relative.
	</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="INLET_TYPE">
			<digest>
				Destination Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Ramp Time
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Output Ramp
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="signal">
			<digest>
				bang When Line Reaches Destination
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial-value" optional="1" type="float or int">
			<digest>
				Initial value
			</digest>
			<description>
				Sets an initial value for the signal output. The default value is <m>0</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="target-value/delta-time" optional="0" units="ms" type="int" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The number is the target value, to be arrived at in the time specified by the number in the right inlet. If no time has been specified since the last target value, the time is considered to be 0 and the output signal jumps immediately to the target value.
				<br />
				<br />
				In right inlet: The number is the time, in milliseconds, in which the output signal will arrive at the target value.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="target-value/delta-time" optional="0" units="ms" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The number is the target value, to be arrived at in the time specified by the number in the right inlet. If no time has been specified since the last target value, the time is considered to be 0 and the output signal jumps immediately to the target value.
				<br />
				<br />
				In right inlet: The number is the time, in milliseconds, in which the output signal will arrive at the target value.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="target-value" optional="0" type="float" />
				<arg name="delta-time" optional="0" units="ms" type="number" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The first number specifies a target value and the second number specifies a total amount of time (in milliseconds) in which <o>line~</o> should reach the target value. In the specified amount of time, <o>line~</o> generates a ramp signal from its current value to the target value.
				<br />
				<o>line~</o> accepts up to 128 target-time pairs in a list, to generate compound ramps. (An example would be <m>0 1000 1 1000</m>, which would go from the current value to 0 in a second, then to 1 in a second.) Once one of the ramps has reached its target value, the next one starts. A subsequent <m>list</m>, <m>float</m>, or <m>int</m> in the left inlet clears all ramps yet to be generated.
				<br />
				<br />
				In right inlet: A list may be used to specify time in one of the Max <link name="maxtime" module="core" type="vignette">time formats</link>.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="target-value" optional="0" type="float" />
				<arg name="delta-time" optional="0" units="ms" type="number" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The first number specifies a target value and the second number specifies a total amount of time (in milliseconds) in which <o>line~</o> should reach the target value. In the specified amount of time, <o>line~</o> generates a ramp signal from its current value to the target value.
				<br />
				<o>line~</o> accepts up to 128 target-time pairs in a list, to generate compound ramps. (An example would be <m>0 1000 1 1000</m>, which would go from the current value to 0 in a second, then to 1 in a second.) Once one of the ramps has reached its target value, the next one starts. A subsequent <m>list</m>, <m>float</m>, or <m>int</m> in the left inlet clears all ramps yet to be generated.
				<br />
				<br />
				In right inlet: A list may be used to specify time in one of the Max <link name="maxtime" module="core" type="vignette">time formats</link>.
			</description>
		</method>
		<method name="pause">
			<arglist />
			<digest>
				Pause the internal ramp at its present location
			</digest>
			<description>
				In left inlet: Pauses the internal ramp but does not change the target value nor clear pending target-time pairs. <o>line~</o> will continue outputting whatever value was its current value when the <m>pause</m> message was received, until either it receives a <m>resume</m> message or until a new ramp is input.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Stop the internal ramp and clear pending target-time pairs
			</digest>
			<description>
				In left inlet: Stops the internal ramp and clears pending target-time pairs. <o>line~</o> will continue outputting whatever value was its current value when the <m>stop</m> message was received, resetting its target value to that value.
			</description>
		</method>
		<method name="resume">
			<arglist />
			<digest>
				Resume the current ramp
			</digest>
			<description>
				In left inlet: Resumes the internal ramp and subsequent pending target-time pairs if the <o>line~</o> object was paused as a result of the <m>pause</m> message.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="line~.png" caption="Linearly changing signal, or a function made up of several line segments" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="adsr~" />
		<seealso name="click~" />
		<seealso name="curve~" />
		<seealso name="transport" />
		<seealso name="zigzag~" />
		<seealso name="05_mspbasicchapter02" module="msp" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				Out left outlet: The current target value, or a ramp moving toward the target value according to the currently stored value and the target time.
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out right outlet: When <o>line~</o> has finished generating all of its ramps, <m>bang</m> is sent out.
			</description>
		</entry>
	</misc>
</c74object>
