<?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="translate" module="max" category="Timing">
	<digest>
		Convert between different units of time.
	</digest>
	<description>
		Converts from any of the fixed or relative Max <link name="maxtime" module="core" type="vignette">time values</link> to any other fixed or relative time value.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			time
		</metadata>
		<metadata name="tag">
			Timing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				list (interval) To Convert To Ticks
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Converted Ticks
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="input-format" optional="1" type="symbol">
			<digest>
				Input time format
			</digest>
			<description>
				The first argument sets the input format to expect. These arguments are a shortcut for setting the attributes of this object which do the same thing. Time can be specified in any of the <link name="maxtime" module="core" type="vignette">time formats</link> used in Max.
			</description>
		</objarg>
		<objarg name="output-format" optional="1" type="symbol">
			<digest>
				Output time format
			</digest>
			<description>
				The second argument sets the format to output. These arguments are a shortcut for setting the attributes of this object which do the same thing. Time can be specified in any of the <link name="maxtime" module="core" type="vignette">time formats</link> used in Max.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Convert the previous value
			</digest>
			<description>
				The last time passed in is converted into the output type specified. Where appropriate, the input type of the last time passed in will be re-assessed by checking the in attribute.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="time" optional="0" type="int" />
			</arglist>
			<digest>
				Convert and cause output
			</digest>
			<description>
				The time value passed-in is converted into the output type specified. Where appropriate, the input type will be assessed by checking the in attribute.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="time" optional="0" type="float" />
			</arglist>
			<digest>
				Convert and cause output
			</digest>
			<description>
				The time value passed-in is converted into the output type specified. Where appropriate, the input type will be assessed by checking the in attribute.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="time" optional="0" type="list" />
			</arglist>
			<digest>
				Convert and cause output
			</digest>
			<description>
				The time value passed-in is converted into the output type specified. Where appropriate, the input type will be assessed by checking the in attribute.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="time" optional="0" type="list" />
			</arglist>
			<digest>
				Convert and cause output
			</digest>
			<description>
				The time value passed-in is converted into the output type specified. Where appropriate, the input type will be assessed by checking the in attribute.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="in" get="1" set="1" type="symbol" size="1">
			<digest>
				Input format
			</digest>
			<description>
				The input format is used to determine the value sent to this object when the value alone is not enough. For example, a simple number could represent milliseconds, hertz, ticks, seconds, etc. This attribute is used to disambiguate such cases.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="7">
					<enumlist>
						<enum name="ticks">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="ms">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="bars.beats.units">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="samples">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hz">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="notevalues">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hh:mm:ss">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Input Format" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="listen" get="1" set="1" type="int" size="1">
			<digest>
				Listen mode
			</digest>
			<description>
				Toggles the output of new values for the current input to the translation when the transport tempo changes. The default is 1 (on).
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Listen to Tempo Changes" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="mode" get="1" set="1" type="symbol" size="1">
			<digest>
				Time value mode
			</digest>
			<description>
				Sets the mode for time values. The <o>translate</o> object can output time values in either <i>position</i> relative to the system start value of 1.1.0 or <i>interval</i>, where a value of 1.1.0 would indicate one bar, one beat, and no units (2400 ticks at 4/4 in the default resolution).
				<br />
				Note: this attribute may not apply, depending on the type of unit conversion.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="interval">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="position">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="out" get="1" set="1" type="symbol" size="1">
			<digest>
				Output format
			</digest>
			<description>
				Set the time format to use for output.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="7">
					<enumlist>
						<enum name="ticks">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="ms">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="bars.beats.units">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="samples">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hz">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="notevalues">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hh:mm:ss">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Format" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="transport" get="1" set="1" type="symbol" size="1">
			<digest>
				Transport name
			</digest>
			<description>
				The name of a <o>transport</o> object with which to associate. By default, the master transport is used.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Transport Name" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="translate.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="metro" />
		<seealso name="timepoint" />
		<seealso name="transport" />
		<seealso name="when">
			Obtain the current time of a transport
		</seealso>
	</seealsolist>
</c74object>
