<?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="mc.sync~" module="msp" category="MSP Analysis, Multichannel">
	<digest>
		Synchronize MSP with an external source  (multichannel)
	</digest>
	<description>
		<o>sync~</o> outputs a 0-1 ramp, like <o>phasor~</o>. The frequency of the ramp can be specified in beats per minute (BPM), or by sending <o>sync~</o> a tempo reference via tap tempo, MIDI beat clock, or an audio signal containing a 'click track.' Also, <o>sync~</o> generates MIDI beat clock to synchronize external devices.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Analysis
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				synchronization input and messages to sync~
			</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>
				synchronized ramp (0-1)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				BPM and beat detect information
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				MIDI beat clock
			</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>
				Set the tap tempo
			</digest>
			<description>
				A sequence of <m>bang</m> messages is used to set the tap tempo. A <m>bang</m> message is interpreted as one tap. If the <o>sync~</o> object receives three taps in a row with reasonably consistent timing, it changes the tempo to match them.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="MIDI-data" optional="0" type="int" />
			</arglist>
			<digest>
				Use MIDI beat clock
			</digest>
			<description>
				MIDI beat clock. Integer input is interpreted as MIDI data - you can directly connect the output of an <o>rtin</o> object. <o>sync~</o> responds to MIDI beat clock start/stop (int 250 and 252), and tick (248). All other values are ignored.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="beats-per-minute" optional="0" type="float" />
			</arglist>
			<digest>
				Set the BPM for the clock
			</digest>
			<description>
				Sets the BPM for the clock.
			</description>
		</method>
		<method name="bpm">
			<arglist>
				<arg name="bpm-rate" optional="0" type="float" />
			</arglist>
			<digest>
				Set the output ramp to match a bpm rate
			</digest>
			<description>
				The word <m>bpm</m>, followed by a number, sets the rate of the current output ramp to a frequency corresponding to the specified beats/minute.
			</description>
		</method>
		<method name="midioffset">
			<arglist>
				<arg name="output-phase" optional="0" type="float" />
			</arglist>
			<digest>
				Adjust the MIDI output &quot;phase&quot; of the output ramp
			</digest>
			<description>
				The word <m>offset</m>, followed by a floating point number in the range 0.-1.0, adjusts the MIDI output &quot;phase&quot; of the current output ramp.
			</description>
		</method>
		<method name="offset">
			<arglist>
				<arg name="ramp-phase" optional="0" type="float" />
			</arglist>
			<digest>
				Adjust the output &quot;phase&quot; of the output ramp
			</digest>
			<description>
				The word <m>offset</m>, followed by a floating point number in the range 0.-1.0, adjusts the &quot;phase&quot; of the current output ramp.
			</description>
		</method>
		<method name="ppq">
			<arglist>
				<arg name="number-of-ticks-per-quarter-note" optional="0" type="int" />
			</arglist>
			<digest>
				Set the number of ticks output per quarter note
			</digest>
			<description>
				The word <m>ppq</m> (parts per quarter), followed by a number, specifies the number of ticks output for each quarter note. By default, MIDI beat clock specifies a PPQ of 24. The <m>ppq</m> message is useful mainly for doubling or halving the tempo for an external device that is set to a different time signature. The ramp signal generated by the <o>sync~</o> object can be scaled for output further by using the <o>rate~</o> object.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Set the tempo to match an audio click track input
			</digest>
			<description>
				The <o>sync~</o> object will set its tempo to match an audio click track input. The click track should contain amplitude peaks at quarter-note intervals of the desired tempo. Signal input will affect the tempo only if <o>sync~</o> detects peak values greater than 0.1 and within the tempo range of approximately 30-240 BPM.
			</description>
		</method>
		<method name="start">
			<arglist />
			<digest>
				Stop current ramp output and reset to 0
			</digest>
			<description>
				The word <m>start</m> causes the current output ramp to halt, and resets the ramp to 0. The <m>start</m> message has the same effect as receiving the MIDI beat clock start value (250). When the <m>start</m> message is received, <o>sync~</o> outputs the number 250 from the MIDI beat clock output so that any external devices will also start.
			</description>
		</method>
		<method name="stop">
			<arglist />
			<digest>
				Stop current ramp output and remain stationary
			</digest>
			<description>
				The word <m>stop</m> causes the current output ramp to halt, and to remain stationary until a <m>start</m> message is received. It is equivalent to sending the MIDI beat clock stop value (252). When the <m>stop</m> message is received, the <o>sync~</o> object sends the number 252 from its MIDI beat clock output. The <o>sync~</o> object does not send MIDI beat clock ticks while it is stopped.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="rtport" get="1" set="1" type="symbol" size="1" force="1">
			<digest>
				MIDI RT Port
			</digest>
			<description>
				Optionally, the <o>sync~</o> object can establish a direct connection to Max's MIDI system and receive MIDI Clock messages without patcher connections. This will ensure the best timing accuracy for MIDI Clock.
				<br />
				<br />
				By default, this attribute is set to <m>None</m> and is disabled. Choosing <m>All</m> will route all MIDI Clock messages from any and all ports to the <o>sync~</o> object -- useful if you have a simple single-source MIDI clocking environment. For more complex usage, choose a specific MIDI Clock source from the menu to avoid conflicting MIDI Clock messages.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="None" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="None">
							<digest>
								MIDI RT Port disabled
							</digest>
							<description>
								Do not use a MIDI RT port for MIDI Clock
							</description>
						</enum>
						<enum name="All">
							<digest>
								MIDI RT Port Omni Mode
							</digest>
							<description>
								Use any (and every) MIDI Clock message available to Max on any (and every) port
							</description>
						</enum>
						<enum name="(available MIDI ports)">
							<digest>
								The active MIDI RT Port
							</digest>
							<description>
								Use a specific MIDI port for receipt of MIDI Clock messages
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="MIDI RT Port" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="sync~.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="midiout" />
		<seealso name="phasor~" />
		<seealso name="rate~" />
		<seealso name="rtin" />
		<seealso name="seq" />
		<seealso name="transport" />
		<seealso name="wave~" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				Left outlet: Like the <o>phasor~</o>-object, the <o>sync~</o> object generates a sawtooth waveform that increases from 0 to 1 for each quarter note of the current tempo. This ramp can be scaled as necessary with the <o>rate~</o> object, for use with <o>wave~</o> and other objects.
			</description>
		</entry>
		<entry name="bpm">
			<description>
				Out middle outlet: Whenever the tempo changes, <o>sync~</o> outputs the message <m>bpm</m>, followed by a float value that specifies the new tempo.
			</description>
		</entry>
		<entry name="tap">
			<description>
				Out middle outlet: When the <o>sync~</o> object receives a tap, it sends a <m>tap</m> message out the middle outlet.
			</description>
		</entry>
		<entry name="click">
			<description>
				Out middle outlet: When the <o>sync~</o> object receives an audio click, it sends a <m>click</m> message out the middle outlet.
			</description>
		</entry>
		<entry name="midi">
			<description>
				Out middle outlet: When the <o>sync~</o> object receives a MIDI beat clock tick, it sends a <m>midi</m> message out the middle outlet.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: <o>sync~</o> generates a MIDI beat clock stream that matches its output ramp. Typically, when needed, this outlet is connected directly to a <o>midiout</o> object.
			</description>
		</entry>
	</misc>
	<mcwrapper>
		<mcwrappermethod name="applymessages" />
		<mcwrappermethod name="applynvalues" />
		<mcwrappermethod name="applyvalues" />
		<mcwrappermethod name="decide" />
		<mcwrappermethod name="deviate" />
		<mcwrappermethod name="ease.in_back" />
		<mcwrappermethod name="ease.in_bounce" />
		<mcwrappermethod name="ease.in_circular" />
		<mcwrappermethod name="ease.in_cubic" />
		<mcwrappermethod name="ease.in_elastic" />
		<mcwrappermethod name="ease.in_exponential" />
		<mcwrappermethod name="ease.in_out_back" />
		<mcwrappermethod name="ease.in_out_bounce" />
		<mcwrappermethod name="ease.in_out_circular" />
		<mcwrappermethod name="ease.in_out_cubic" />
		<mcwrappermethod name="ease.in_out_elastic" />
		<mcwrappermethod name="ease.in_out_exponential" />
		<mcwrappermethod name="ease.in_out_quadratic" />
		<mcwrappermethod name="ease.in_out_quartic" />
		<mcwrappermethod name="ease.in_out_quintic" />
		<mcwrappermethod name="ease.in_out_sine" />
		<mcwrappermethod name="ease.in_quadratic" />
		<mcwrappermethod name="ease.in_quartic" />
		<mcwrappermethod name="ease.in_quintic" />
		<mcwrappermethod name="ease.in_sine" />
		<mcwrappermethod name="ease.linear" />
		<mcwrappermethod name="ease.out_back" />
		<mcwrappermethod name="ease.out_bounce" />
		<mcwrappermethod name="ease.out_circular" />
		<mcwrappermethod name="ease.out_cubic" />
		<mcwrappermethod name="ease.out_elastic" />
		<mcwrappermethod name="ease.out_quadratic" />
		<mcwrappermethod name="ease.out_quartic" />
		<mcwrappermethod name="ease.out_quintic" />
		<mcwrappermethod name="ease.out_sine" />
		<mcwrappermethod name="exponential" />
		<mcwrappermethod name="generate" />
		<mcwrappermethod name="harmonic" />
		<mcwrappermethod name="increment" />
		<mcwrappermethod name="randomrange" />
		<mcwrappermethod name="replicatenvalues" />
		<mcwrappermethod name="replicatevalues" />
		<mcwrappermethod name="scaledexponential" />
		<mcwrappermethod name="setvalue" />
		<mcwrappermethod name="setvaluerange" />
		<mcwrappermethod name="smoothstep" />
		<mcwrappermethod name="spread" />
		<mcwrappermethod name="spreadexclusive" />
		<mcwrappermethod name="spreadincludefirst" />
		<mcwrappermethod name="spreadincludesecond" />
		<mcwrappermethod name="spreadinclusive" />
		<mcwrappermethod name="subharmonic" />
		<mcwrapperattr name="busymapname" />
		<mcwrapperattr name="bz" />
		<mcwrapperattr name="bzname" />
		<mcwrapperattr name="chans" />
		<mcwrapperattr name="fun" />
		<mcwrapperattr name="initialvalues" />
		<mcwrapperattr name="op" />
		<mcwrapperattr name="target" />
		<mcwrapperattr name="usebusymap" />
		<mcwrapperattr name="values" />
		<mcwrapperattr name="voiceprob" />
		<mcwrapperattr name="zero" />
	</mcwrapper>
</c74object>
