<?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="plugsync~" module="msp" category="MSP Plug-ins">
	<digest>
		Report host synchronization information
	</digest>
	<description>
		The <o>plugsync~</o> object provides information about the current state of Ableton Live host applicaiton.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Plug-ins
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				bang Polls Timing Info
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				bang Polls Timing Info
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="int">
			<digest>
				(int) Transport State (1 = Play, 0 = Off)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="int">
			<digest>
				(int) Current Bar Count
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="int">
			<digest>
				(int) Current Beat Count
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="double">
			<digest>
				(float) Current Ticks Within a Beat (1 PPQ)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="4" type="list">
			<digest>
				(list) Time Signature
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="5" type="double">
			<digest>
				(float) Tempo
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="6" type="double">
			<digest>
				(float) Ticks (1 PPQ)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="7" type="int">
			<digest>
				(int) Sample Count
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="8" type="long">
			<digest>
				(long) Flags Indicating Which Data Are Valid
			</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>
				Poll the object and output timing information
			</digest>
			<description>
				<m>bang</m> message may be used to manually poll the <o>plugsync~</o> object that cause it to output timing information.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="plugphasor~" />
	</seealsolist>
	<discussion>
		Sample count information is available in any host; even Max. The validity of the other information output by the object is dependent upon what synchronization capabilities the host implements; the value from the flags (9th) outlet tells you what information is valid. Output from <o>plugsync~</o> is continuous when the scheduler is running. <b>Note: plug-in building for hosts other than Ableton Live is no longer supported. For more information to help you make the transition to creating plug-ins in Max for Live, see <link name="live_pluggo" module="core" type="vignette">Max for Live for Pluggo Developers</link>.</b> 
	</discussion>
	<misc name="Output">
		<entry name="int">
			<description>
				Out left outlet: <m>1</m> if the host's transport is currently running; <m>0</m> if it is stopped or paused.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out 2nd outlet: The current bar count in the host sequence, starting at 1 for the first bar. If the host does not support synchronization, there is no output from this outlet.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out 3rd outlet: The current beat count in the host sequence, starting at 1 for the first beat. If the host does not support synchronization, there is no output from this outlet.
			</description>
		</entry>
		<entry name="float">
			<description>
				Out 4nd outlet: The current beat fraction, from 0 to 1.0. If the host does not support synchronization, the output is 0. If the host does not support synchronization, there is no output from this outlet.
			</description>
		</entry>
		<entry name="list">
			<description>
				Out 5th outlet: The current time signature as a list containing numerator followed by denominator. For instance, 3/4 time would be output as the list <m>3 4</m>. If the host does not support time signature information, there is no output from this outlet.
			</description>
		</entry>
		<entry name="float">
			<description>
				Out 6th outlet: The current tempo in samples per beat. This number can be converted to beats per minute using the following formula: (sampling-rate / samples-per-beat) * 60. If the host does not support synchronization, there is no output from this outlet.
			</description>
		</entry>
		<entry name="float">
			<description>
				Out 7th outlet: The current number of beats, expressed in 1 PPQ. This number will contain a fractional part between beats. If the host does not support synchronization, there is no output from this outlet.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out 8th outlet: The current sample count, as defined by the host.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out 9th outlet: A number representing the validity of the other information coming from <o>plugsync~</o>. Mask with the following values to determine if the information from <o>plugsync~</o> will be valid.
				<br />
				<br />
				Sample Count Valid - 1 (always true)
				<br />
				<br />
				Beats Valid - 2 (2nd, 3rd, 4th, and 7th outlets valid)
				<br />
				<br />
				Time Signature Valid - 4 (5th outlet valid)
				<br />
				<br />
				Tempo Valid - 8 (6th outlet valid)
				<br />
				<br />
				Transport Valid - 16 (left outlet valid)
			</description>
		</entry>
	</misc>
</c74object>
