<?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="zmap" module="max" category="Math">
	<digest>
		Maps input range of values to output range
	</digest>
	<description>
		Maps an input range of values and to an output range of values. Similar to <o>scale</o>, but clips values to the ranges, and does not allow inverted scaling.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Math
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Input to be scaled
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Input Minimum
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="INLET_TYPE">
			<digest>
				Input Maximum
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="3" type="INLET_TYPE">
			<digest>
				Output Minimum
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="4" type="INLET_TYPE">
			<digest>
				Output Maximum
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Scaled Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="minimum-input" optional="0" type="number">
			<digest>
				Minimum input value
			</digest>
			<description>
				The minimum input value. If the low values is higher than the corresponding high value, the two values are reversed to preserve the high-low relationship.
			</description>
		</objarg>
		<objarg name="maximum-input" optional="0" type="number">
			<digest>
				Maximum input value
			</digest>
			<description>
				The maximum input value. If the low values is higher than the corresponding high value, the two values are reversed to preserve the high-low relationship.
			</description>
		</objarg>
		<objarg name="minimum-output" optional="0" type="number">
			<digest>
				Minimum output value
			</digest>
			<description>
				The minimum output value. If the low values is higher than the corresponding high value, the two values are reversed to preserve the high-low relationship. The <o>zmap</o> object will clip to the boundaries of the output range.
			</description>
		</objarg>
		<objarg name="maximum-output" optional="0" type="number">
			<digest>
				Maximum output value
			</digest>
			<description>
				The maximum output value. If the low values is higher than the corresponding high value, the two values are reversed to preserve the high-low relationship. The <o>zmap</o> object will clip to the boundaries of the output range.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				Converted to <m>float</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Scale and cause output
			</digest>
			<description>
				In left inlet: The incoming value is scaled according to the mapping provided by the arguments, or values received in the other inlets.
				<br />
				Note: The preservation of the high-low relationship is different from the behavior of the <o>scale</o> object, which lets you do reverse scaling. Also, note that the <o>zmap</o> object will clip to the boundaries of the output range.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Scale all elements of a list
			</digest>
			<description>
				In left inlet: A list of numbers sent to the left inlet will trigger the output of a list consisting of the results of performing the specified scaling operation on each item in the input list.
			</description>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="minimum-input" optional="0" type="float" />
			</arglist>
			<digest>
				Set minimum input value
			</digest>
			<description>
				In second inlet: Sets the low input value. If the value is higher than the high input value, the two values are reversed to preserve the high-low relationship.
			</description>
		</method>
		<method name="ft2">
			<arglist>
				<arg name="maximum-input" optional="0" type="float" />
			</arglist>
			<digest>
				Set maximum input value
			</digest>
			<description>
				In third inlet: Sets the high input value. If the value is lower than the low input value, the two values are reversed to preserve the high-low relationship.
			</description>
		</method>
		<method name="ft3">
			<arglist>
				<arg name="minimum-output" optional="0" type="float" />
			</arglist>
			<digest>
				Set minimum output value
			</digest>
			<description>
				In fourth inlet: Sets the low output value. If the value is higher than the high output value, the two values are reversed to preserve the high-low relationship.
			</description>
		</method>
		<method name="ft4">
			<arglist>
				<arg name="maximum-output" optional="0" type="float" />
			</arglist>
			<digest>
				Set maximum output value
			</digest>
			<description>
				In right inlet: Sets the high output value. If the value is higher than the high output value, the two values are reversed to preserve the high-low relationship.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="zmap.png" caption="An example of how to map an integer slider into a useful range of floating-point values and back again" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="scale" />
		<seealso name="expr" />
	</seealsolist>
	<misc name="Output">
		<entry name="float">
			<description>
				When <o>zmap</o> receives a value in its leftmost inlet, that value is scaled to the indicated output range of values.
			</description>
		</entry>
	</misc>
</c74object>
