<?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="transport" module="max" category="Timing">
	<digest>
		Control a clock
	</digest>
	<description>
		Starts and stops the passage of time for objects linked to a transport. If given a name, the transport object will control a time context of the given name, otherwise it will control Max's global 'internal' transport. The <o>transport</o> object reports time consistent with the <link name="maxtime" module="core" type="vignette">time formats</link> used in Max.
	</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>
				Non-zero Starts Transport, Zero Stops
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Set Transport Position in Ticks
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Bars
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Beats
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				Units
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				Current Resolution (PPQ)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="4" type="OUTLET_TYPE">
			<digest>
				Tempo
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="5" type="OUTLET_TYPE">
			<digest>
				Time Signature (list)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="6" type="OUTLET_TYPE">
			<digest>
				Transport State
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="7" type="OUTLET_TYPE">
			<digest>
				Raw Ticks
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="8" type="OUTLET_TYPE">
			<digest>
				Clocksource List
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Report current state
			</digest>
			<description>
				Report current state
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: toggle whether or not the transport is running on or off
				<br />
				In right inlet: set the current position of the transport in ticks
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: toggle whether or not the transport is running on or off
				<br />
				In right inlet: set the current position of the transport in ticks
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="position" optional="0" type="list" />
			</arglist>
			<digest>
				Set the current position of the transport
			</digest>
			<description>
				Set the current position of the transport using a time unit.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Open the GlobalTransport window
			</digest>
			<description>
				Double-clicking on the <o>transport</o> object opens the GlobalTransport window.
			</description>
		</method>
		<method name="dump">
			<arglist />
			<digest>
				Causes a report of the current state of the transport to be sent to the Max Console.
			</digest>
			<description>
				Causes a report of the current state of the transport to be sent to the Max Console.
			</description>
		</method>
		<method name="getclocksources">
			<arglist />
			<digest>
				Report active clock sources
			</digest>
			<description>
				Causes a list of active clock sources to be sent out the right outlet.
			</description>
		</method>
		<method name="timesig">
			<arglist>
				<arg name="beats" optional="0" type="list" />
				<arg name="value" optional="0" type="list" />
			</arglist>
			<digest>
				Set this transport's time signature
			</digest>
			<description>
				Set the time signature for this transport using two numbers. The default is 4 4.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="clocksource" get="1" set="1" type="symbol" size="1">
			<digest>
				Timing source
			</digest>
			<description>
				The current timing source for the transport. The default source is Max's internal clock but other timing sources may also be used.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Clock Source" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="text_onesymbol" />
			</attributelist>
		</attribute>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				The name of this transport
			</digest>
			<description>
				There can be multiple named transports running simultaneously. By default, a transport will be associated with Max's global transport. If a name is provided then a new transport is created with that name and can be referenced using this attribute.
			</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="Name" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="text_onesymbol" />
			</attributelist>
		</attribute>
		<attribute name="resetbarcount" get="1" set="1" type="int" size="1">
			<digest>
				Advance on time signature change
			</digest>
			<description>
				Toggles whether the bar/beat/unit counter advances to the beginning of the next measure when a time signature change is received. By default, this is disabled (0).
			</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="Reset Bar on Time Signature Change" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="tempo" get="1" set="1" type="float" size="1">
			<digest>
				Transport tempo
			</digest>
			<description>
				Sets the tempo in beats-per-minute for this transport.
			</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="Tempo" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="transport.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="metro" />
		<seealso name="translate" />
		<seealso name="timepoint" />
		<seealso name="when">
			Obtain the current time of a transport
		</seealso>
		<seealso name="basicchapter19" module="max" type="tutorial" />
	</seealsolist>
	<discussion>
		Note for Max For Live Users: Currently translating a beat time song position in Max for Live will only take the global tempo into account and might not be accurate when the Live set contains tempo changes.
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				Out 1st outlet: When <o>transport</o> receives a bang, the current bar is sent out the first outlet.
				<br />
				<br />
				Out 2nd outlet: When <o>transport</o> receives a bang, the current beat (within the bar) is sent out the second outlet.
				<br />
				<br />
				Out 7th outlet: When <o>transport</o> receives a bang, the Transport State is sent out the seventh outlet. A value of 1 means that the transport is on, and a value of 0 means that the transport it off.
			</description>
		</entry>
		<entry name="float">
			<description>
				Out 3rd outlet: When <o>transport</o> receives a bang, the units are sent out the third outlet.
				<br />
				<br />
				Out 4th outlet: When <o>transport</o> receives a bang, the current resolution (ticks per beat) is sent out the fourth outlet.
				<br />
				<br />
				Out 5th outlet: When <o>transport</o> receives a bang, the current tempo is sent out the fifth outlet.
				<br />
				<br />
				Out 8th outlet: When <o>transport</o> receives a bang, the number if raw ticks is sent out the eighth outlet.
			</description>
		</entry>
		<entry name="list">
			<description>
				Out 6th outlet: When <o>transport</o> receives a bang, the current time signature is sent out the sixth outlet.
				<br />
				<br />
				Out 9th outlet: When the message <m>getclocksources</m> is sent to <o>transport</o>, a list of active clock sources is sent out the right outlet.
			</description>
		</entry>
	</misc>
</c74object>
