<?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="linedrive" module="max" category="Math">
	<digest>
		Scale numbers exponentially
	</digest>
	<description>
		Scales number from one range to another with an exponential curve. Both the input and output ranges are expressed as single arguments representing the maximum value. The minimum values are the negative values of the ranges (argument * -1).
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Math
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<!--OUTLETS-->
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="input" optional="0" type="number">
			<digest>
				Input range
			</digest>
			<description>
				The first argument is the maximum input value. The range used is from (argument * -1) to (argument).
			</description>
		</objarg>
		<objarg name="output" optional="0" type="number">
			<digest>
				Output range
			</digest>
			<description>
				The second argument is the maximum output value. The range used is from (argument * -1) to (argument).
			</description>
		</objarg>
		<objarg name="curve" optional="0" type="number">
			<digest>
				Output curve
			</digest>
			<description>
				The third argument specifies the nature of the scaling curve. The third argument must be greater than 1. The larger the value, the more steeply exponential the curve is. An appropriate value for this argument is 1.06.
			</description>
		</objarg>
		<objarg name="delay" optional="0" units="ms" type="int">
			<digest>
				Delay
			</digest>
			<description>
				The fourth argument specifies a ramp time (slew rate). The <o>linedrive</o> object outputs a list consisting of the scaled output value followed by a ramp time in milliseconds which can be sent to a <o>line</o> or <o>line~</o> object. The initial argument value can be modifed using the <o>linedrive</o> object's right inlet.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Convert value
			</digest>
			<description>
				In left inlet: The number is converted according to the following expression
				<br />
				y = b e^{-a log c} e^{x log c}
				<br />
				where x is the input, y is the output, a, b, and c are the three typed-in arguments, and e is the base of the natural logarithm (approximately 2.718282). The output is a two-item list containing y followed by the delay time most recently received in the right inlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input-to-conversion" optional="0" type="float" />
			</arglist>
			<digest>
				Convert value
			</digest>
			<description>
				In left inlet: The number is converted according to the following expression
				<br />
				y = b e^{-a log c} e^{x log c}
				<br />
				where x is the input, y is the output, a, b, and c are the three typed-in arguments, and e is the base of the natural logarithm (approximately 2.718282). The output is a two-item list containing y followed by the delay time most recently received in the right inlet.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="delay" optional="0" type="int" />
			</arglist>
			<digest>
				Set delay time
			</digest>
			<description>
				In right inlet: Sets the current delay time appended to the scaled output. A connected <o>line~</o> object will ramp to the new target value over this time interval.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="linedrive.png" caption="Use linedrive for exponential value scaling" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="expr" />
		<seealso name="scale" />
	</seealsolist>
	<misc name="Output">
		<entry name="list">
			<description>
				When an <m>int</m> or <m>float</m> is received in the left inlet, a <m>list</m> is sent out containing a scaled version of the input (see the formula above) and the current delay time.
			</description>
		</entry>
	</misc>
</c74object>
