<?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="jit.shade" module="jit" category="Jitter Compositing">
	<digest>
		Map-based crossfader
	</digest>
	<description>
		<o>jit.shade</o> performs a linear crossfade between corresponding cells in two input matrices at a rate determined by the values of the cells of a third &quot;map&quot; matrix. The crossfade rate is calculated in frames rather than units of time.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
		<metadata name="tag">
			Jitter Compositing
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="matrix">
			<digest>
				in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="matrix">
			<digest>
				in2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="2" type="matrix">
			<digest>
				in3
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="matrix">
			<digest>
				out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="matrix">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MOP-->
	<mop matrixinputcount="3" matrixoutputcount="1">
		<matrixinput name="in2" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="32" mindimcount="1" maxdimcount="32" ioproc="resamp">
			<types>
				char long float32 float64
			</types>
		</matrixinput>
		<matrixinput name="in3" planelink="0" typelink="0" dimlink="1" minplanecount="2" maxplanecount="2" mindimcount="1" maxdimcount="32" ioproc="adapt">
			<types>
				long
			</types>
		</matrixinput>
		<matrixoutput name="out" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="32" mindimcount="1" maxdimcount="32">
			<types>
				char long float32 float64
			</types>
		</matrixoutput>
	</mop>
	<!--MESSAGES-->
	<methodlist>
		<method name="reset">
			<arglist />
			<digest>
				Start the fade over from the beginning
			</digest>
			<description>
				Zeroes the fade counter, causing the fade to start over from the beginning. The fade counter is actually managed in the second plane of matrix 3. If initialization values were provided in that plane, they are lost after a <m>reset</m> message is received.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="clear" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="importattrs" />
		<jittermethod name="outputmatrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="max" get="1" set="1" type="int" size="1">
			<digest>
				Maximum rate
			</digest>
			<description>
				Maximum rate (default = 255)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Max" />
			</attributelist>
		</attribute>
		<attribute name="min" get="1" set="1" type="int" size="1">
			<digest>
				Minimum rate
			</digest>
			<description>
				Minimum rate (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Min" />
			</attributelist>
		</attribute>
		<attribute name="mode" get="1" set="1" type="int" size="1">
			<digest>
				Crossfade mode
			</digest>
			<description>
				Crossfade mode (default = 0 (start to end))
				<br />
				0 = start to end crossfade: Fades from start to end without looping and sends a <m>done</m> message out the right outlet on completion.
				<br />
				1 = palindrome crossfade: Fades from start to end, then reverse direction.
				<br />
				2 = looped cellwise start to end crossfade: Once any cell has finished its fade, it begins again.
				<br />
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Mode" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="outputmode" />
		<jitterattribute name="adapt" />
		<jitterattribute name="in2_name" />
		<jitterattribute name="in2_type" />
		<jitterattribute name="in2_dim" />
		<jitterattribute name="in2_planecount" />
		<jitterattribute name="in3_name" />
		<jitterattribute name="in3_type" />
		<jitterattribute name="in3_dim" />
		<jitterattribute name="in3_planecount" />
		<jitterattribute name="out_name" />
		<jitterattribute name="type" />
		<jitterattribute name="dim" />
		<jitterattribute name="planecount" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jit.shade.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.alphablend" />
		<seealso name="jit.op" />
	</seealsolist>
	<discussion>
		<p>
			Three fade modes are available. <m>mode 0</m> crossfades unidirectionally from start to finish, and sends a <m>done</m> message out the right outlet when the fade is complete. While <m>mode 1</m> and <m>mode 2</m> are more continuous fade processes, the do not provide any feedback upon completion of a crossfade.
		</p>
		<p>
			Generally, a 1-plane <m>long</m> matrix is sent to inlet 3 as the map. If you send a 2-plane matrix, plane 2 of the matrix can be used to set initial values for the crossfade.
		</p>
	</discussion>
</c74object>
