<?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="curve~" module="msp" category="MSP Functions">
	<digest>
		Exponential ramp generator
	</digest>
	<description>
		Use the <o>curve~</o> object to produce a signal that goes from an initial to target value over a specified time. It is similar to the <o>line~</o> object, it produces non-linear ramps using a piecewise approximation of an exponential function.
	</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>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Curve Parameter (-1.0 to 1.0)
			</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 Curve Reaches Destination
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial-value" optional="1" type="number">
			<digest>
				Initial value
			</digest>
			<description>
				The first argument sets an initial value for the signal output. The default value for the parameter is 0.
			</description>
		</objarg>
		<objarg name="curve-parameter" optional="1" type="number">
			<digest>
				Curve parameter
			</digest>
			<description>
				The second argument sets the initial curve parameter. The default value for the curve parameter is 0.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="target-value" optional="0" type="int" />
			</arglist>
			<digest>
				Set the target value to be arrived at
			</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 to be 0 and the output signal jumps immediately to the target value (ints are converted to floats).
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="target-value" optional="0" type="float" />
			</arglist>
			<digest>
				Set the target value to be arrived at
			</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 to be 0 and the output signal jumps immediately to the target value.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="target-value" optional="0" type="number" />
				<arg name="ramp-time" optional="0" units="ms" type="float" />
				<arg name="curve-parameter" optional="0" type="float" />
			</arglist>
			<digest>
				Set the target value, ramp time, and curve parameter
			</digest>
			<description>
				In left inlet: The first number specifies a target value; the second number specifies an amount of time, in milliseconds, to arrive at that value; and the optional third number specifies a curve parameter, for which values from 0 to 1 produce an exponential curve and values from -1 to 0 produce a logarithmic curve. The closer to 0 the curve parameter is, the more the curve resembles a straight line, and the farther away the parameter is from 0, the more the curve resembles a step. In the specified amount of time, <o>curve~</o> generates an exponential ramp signal from the currently stored value to the target value.
				<br />
				<br />
				In middle 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="number" />
				<arg name="ramp-time" optional="0" units="ms" type="float" />
				<arg name="curve-parameter" optional="0" type="float" />
			</arglist>
			<digest>
				Set the target value, ramp time, and curve parameter
			</digest>
			<description>
				In left inlet: The first number specifies a target value; the second number specifies an amount of time, in milliseconds, to arrive at that value; and the optional third number specifies a curve parameter, for which values from 0 to 1 produce an exponential curve and values from -1 to 0 produce a logarithmic curve. The closer to 0 the curve parameter is, the more the curve resembles a straight line, and the farther away the parameter is from 0, the more the curve resembles a step. In the specified amount of time, <o>curve~</o> generates an exponential ramp signal from the currently stored value to the target value.
				<br />
				<br />
				In middle 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="factor">
			<arglist>
				<arg name="nonlinear-factor" optional="0" type="float" />
			</arglist>
			<digest>
				Adjust the non-linear shaping parameters of <o>curve~</o> 
			</digest>
			<description>
				The word <m>factor</m> followed by a float will adjust the non-linear shaping parameters of <o>curve~</o>.
			</description>
		</method>
		<method name="pause">
			<arglist />
			<digest>
				Pause the internal exponential ramp
			</digest>
			<description>
				In left inlet: Pauses the internal exponential ramp but does not change the target value nor clear pending target-time-parameter triples. <o>curve~</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 and clear the internal exponential ramp
			</digest>
			<description>
				In left inlet: Stops the internal exponential ramp and clears pending target-time parameter triples. <o>curve~</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>
				Pause the internal exponential ramp
			</digest>
			<description>
				In left inlet: Resumes the internal exponential ramp and subsequent pending target-time pairs if the <o>curve~</o> object was paused as a result of the <m>pause</m> message.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="curve~.png" caption="Curved ramps used as control signals for frequency and amplitude" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="line~" />
		<seealso name="transport" />
	</seealsolist>
	<discussion>
		This object 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. The <o>curve~</o> object produces non-linear ramps using a piecewise approximation of an exponential function. You specify the parameter to this exponential function in the curve~ object's right inlet. Values from 0 to 1 produce an &quot;exponential&quot; curve when increasing in value and values from -1 to 0 produce a &quot;logarithmic&quot; curve. The closer to 0 the curve parameter is, the closer the curve is to a straight line, and the farther away the parameter is from 0, the steeper the curve. <o>curve~</o> can also accept a list of up to two or three arguments (the previous curve parameter is used if there are two arguments), or a list with two or more value, time, parameter triples. The <o>curve~</o> is limited to 42 such triples in a single list. The object's approximation of the exponential becomes better when the vector size is smaller, but the object also becomes more computationally expensive.
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				Out left outlet: The current target value, or an exponential curve moving toward the target value according to the most recently received target value, transition time, and curve parameter.
			</description>
		</entry>
		<entry name="bang">
			<description>
				Out right outlet: When <o>curve~</o> has finished generating all of its ramps, <m>bang</m> is sent out.
			</description>
		</entry>
	</misc>
</c74object>
