<?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="max" category="Data, Timing">
	<digest>
		Generate timed ramp
	</digest>
	<description>
		Generate ramps and line segments from one value to another within a specified amount of time.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
		<metadata name="tag">
			Timing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Destination Value of Ramp
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Total Ramp Time in Milliseconds
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Time Grain in Milliseconds
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Ramp Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Signals End of Ramp
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial" optional="1" type="number">
			<digest>
				Initial value and type
			</digest>
			<description>
				Sets the initial value to be stored in <o>line</o> and the output type for the object (floating-point or integer). If there is no argument, the initial value is <m>0</m> and the output type is <m>int</m>.
			</description>
		</objarg>
		<objarg name="grain" optional="1" type="number">
			<digest>
				Output granularity
			</digest>
			<description>
				Sets an initial value for the grain: the time interval at which numbers are sent out. If the grain is not specified, <o>line</o> outputs a number every 20 milliseconds. The minimum grain allowed is 1 millisecond; any number less than 1 will be set to <m>20</m>.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" 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 middle inlet. If no time has been specified since the last target value, the time is considered 0 and <o>line</o> immediately outputs the target value.
				<br />
				<br />
				Note: the output type for the <o>line</o> object is set by using the first argument to the object (see Arguments).
				<br />
				<br />
				In middle inlet: The number is the time, in milliseconds, in which to arrive at the target value.
				<br />
				<br />
				In right inlet: The number is the interval (in milliseconds) at which intermediary numbers are regularly sent out.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				Performs the same function as <m>int</m> but with floats only if the object-argument is a float.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Set target value and time
			</digest>
			<description>
				Use various list combinations to reach a target value.
				<br />
				In one list combination, the first number specifies a starting value,  followed by a comma and a number pair. The first number in the pair specifies the target value. The second number of the pair specifies the total amount of time (in milliseconds) in which <o>line</o> should reach the target value. In that amount of time, numbers are output regularly in a line from the currently stored value to the target value.
				<br />
				<br />
				An example of this type of list is <m>0, 1 1000 0 1000</m>. In this example, line would go from the starting value of 0 to 1 in one second, then back down to 0 in one second. Once the first ramp 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 another combination, the first number specifies a target value, not followed a comma, and the second number specifies a total amount of time (in milliseconds) in which <o>line</o> should reach the target value. The third number, which is optional, sets the grain. Grain will affect the time interval at which numbers are sent out. Once grains are set in a list, they will override the default until manually reset.
				<br />
				<br />
				An example of this type of list is <m>1 1000 100</m>. In this example, line would go from the current value to 1 in a second, outputting a value every 100 milliseconds.
				<br />
				<br />
				If the list has an even number of elements greater than three, each pair of elements is considered a destination-ramptime pair in a breakpoint function. If the list has an odd number of elements greater than three, the last element will be ignored.
			</description>
		</method>
		<method name="clock">
			<arglist>
				<arg name="setclock object name" optional="0" type="symbol" />
			</arglist>
			<digest>
				Select a clock for timing
			</digest>
			<description>
				The word <m>clock</m>, followed by the name of an existing <m>setclock</m> object, sets the <o>line</o> object to be controlled by that <m>setclock</m> object rather than by Max’s internal millisecond clock. The word <m>clock</m> by itself sets the <o>line</o> object back to using Max’s regular millisecond clock.
			</description>
		</method>
		<method name="pause">
			<arglist />
			<digest>
				Pause ramp
			</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="resume">
			<arglist />
			<digest>
				Resume 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>
		<method name="set">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Set a new starting value
			</digest>
			<description>
				In left inlet: The word <m>set</m>, followed by a number, makes that number the new starting value from which to proceed to the next received target value. The <m>set</m> message also stops <o>line</o> if it is in the process of sending out numbers.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Stop generating output
			</digest>
			<description>
				In left inlet: Stops <o>line</o> from sending out numbers, until a new target value is received.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="compatmode" get="1" set="1" type="int" size="1">
			<digest>
				Compatibility Mode
			</digest>
			<description>
				Provides compatibility when importing patches created with versions 7.x and earlier of Max. Set <at>compatmode</at> to 1 to use legacy behavior.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Compatibility Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="floatoutput" get="1" set="1" type="int" size="1">
			<digest>
				Floating-Point Output
			</digest>
			<description>
				Sets the floating-point output mode for the <o>line</o> object. The default is 2 (auto).
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="2" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="Off">
							<digest>
								Floating-Point Output off
							</digest>
							<description>
								Does not output float values. If the <ar>initial</ar> argument is an integer, the <at>floatoutput</at> is set to off.
							</description>
						</enum>
						<enum name="On">
							<digest>
								Floating-Point Output on
							</digest>
							<description>
								Outputs float values if specified in the <ar>initial</ar> argument.
							</description>
						</enum>
						<enum name="Auto">
							<digest>
								Floating-Point Output Auto
							</digest>
							<description>
								Ouputs float values if distance is &lt;= 1, line does not have a float argument, and step size is &lt; 0.4.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Floating-Point Output" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="grain" get="1" set="1" type="float" size="1">
			<digest>
				Time Grain (ms)
			</digest>
			<description>
				Sets the grain value: the time interval at which numbers are sent out. The default is 20 milliseconds. The minimum grain allowed is 1 millisecond.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="float" size="1" value="20." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Time Grain (ms)" />
			</attributelist>
		</attribute>
		<attribute name="maxpoints" get="1" set="1" type="int" size="1">
			<digest>
				Maximum Line Points
			</digest>
			<description>
				Sets the maximum number of user defined points. The default is 129. To allow a greater number of points, use the <at>maxpoints</at> attribute.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="129" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Maximum Line Points" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="line.png" caption="Output values in a straight line... and bang when finished" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bline" />
		<seealso name="funbuff" />
		<seealso name="line~" />
		<seealso name="setclock" />
		<seealso name="uzi" />
		<seealso name="basicchapter11" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: Numbers are sent out at regular intervals, describing a straight line toward a target value. If a new target value and time are specified before the line is completed, the new line starts from the most recent output value, in order to avoid discontinuities.
				<br />
				<br />
				If a value is received in the left inlet without an accompanying time value, it is sent out immediately (time is considered 0).
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out right outlet: When <o>line</o> has arrived at its target value, <m>bang</m> is sent out.
				<br />
				<br />
				Note: In practice, the target value is arrived at in just under the amount of time specified (time minus grain).
			</description>
		</entry>
	</misc>
</c74object>
