<?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.gradient~" module="MSP" category="MC">
	<digest>
		Generate a time-varying function over the space of a multichannel signal
	</digest>
	<description>
		Add breakpoints to the <o>mc.gradient~</o> to specify a function where both the domain and range go from 0 to 1. The output range is mapped across the space of a multichannel signal. Connect a <o>phasor~</o> or another time-varying single- or multichannel signal to the <o>mc.gradient~</o> object to drive its output.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MC
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="multi-channel signal">
			<digest>
				Driving function
			</digest>
			<description>
				Use a single- or multichannel function that varies from 0-1 to drive the output of <o>mc.gradient~</o>. The
			</description>
		</inlet>
		<inlet id="1" type="multi-channel signal">
			<digest>
				Driving Phase, list Sets Function
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="multi-channel signal">
			<digest>
				Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="float">
			<digest>
				Channel value in response to chanval message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="list">
			<digest>
				Output function values for input
			</digest>
			<description>
				A float between 0 and 1 produces a list of output values for the input position.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="chans" type="int" optional="0">
			<digest>
				Number of channels
			</digest>
			<description>
				Change the number of channels in the output multichannel signal. The output channel count will not change until the audio is restarted. The default value of the <at>chans</at> attribute is 0 meaning the object's argument determines the number of output channels.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="function-values" type="int" optional="0" />
			</arglist>
			<digest>
				Converted to float
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="function-values" type="float" optional="0" />
			</arglist>
			<digest>
				Query function values at position
			</digest>
			<description>
				Return the function values for each channel at the specified x-position in the range 0.0 - 1.0.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="x-value" optional="0" type="number" />
				<arg name="y1-value" optional="0" type="number" />
				<arg name="y2-value" optional="1" type="number" />
				<arg name="phase" optional="1" type="number" />
			</arglist>
			<digest>
				Add Breakpoint
			</digest>
			<description>
				The <m>list</m> message adds a new breakpoint. Up to 4 values can be used to specify the x postion, upper y value, lower y value, and phase offset of the breakpoint. If the list contains two values, it creates a breakpoint with a fixed y value at the x postion. An optional third value specifies the lower y value range and a fourth value can be used to specify the phase value (default 0.). If the supplied x value matches an existing breakpoint, that breakpoint will be modified.
			</description>
		</method>
		<method name="chanval">
			<arglist>
				<arg name="channel" type="int" optional="0" />
				<arg name="x-position" type="float" optional="0" />
			</arglist>
			<digest>
				Value of channel at input position
			</digest>
			<description>
				Returns the value of the output function for a given channel and input position.
			</description>
		</method>
		<method name="clear">
			<arglist>
			</arglist>
			<digest>
				Removes all breakpoints in the function
			</digest>
			<description>
				The <m>clear</m> message removes all breakpoints in the current function, restoring it to the default state.
			</description>
		</method>
		<method name="printfunction">
			<arglist />
			<digest>
				Print the function to the Max console.
			</digest>
			<description>
				The <m>printfunction</m> message prints the current function to  the console.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Driving function (0-1)
			</digest>
			<description>
				A single channel signal controls all breakpoints. A multichannel signal maps each channel to a separate breakpoint as they are ordered from left to right, wrapping if the number of input channels is greater than the number of breakpoints.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="chans" get="1" set="1" type="int" size="1">
			<digest>
				Output Channels
			</digest>
			<description>
				Sets the number of channels in the multichannel output signal
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="4" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Channels" />
			</attributelist>
		</attribute>
		<attribute name="mode" get="1" set="1" type="int" size="1">
			<digest>
				Oscillation Mode
			</digest>
			<description>
				Determines the direction of oscillation over the functions domain. Options are up, down, and up/down. Currently only up mode is supported.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Behavior" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="up">
							<digest>
								Values Increase
							</digest>
							<description>
								Oscillation values in the Y-range increase over the functions domain.
							</description>
						</enum>
						<enum name="down">
							<digest>
								Values Decrease
							</digest>
							<description>
								Oscillation values in the Y-range decrease over the functions domain (not currently supported).
							</description>
						</enum>
						<enum name="up down">
							<digest>
								Palindrome Mode
							</digest>
							<description>
								Oscillation values in the Y-range move up then down over the functions domain (not currently supported).
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Oscillation Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="cycle~" />
		<seealso name="function" />
		<seealso name="line~" />
		<seealso name="mc.cycle~" />
		<seealso name="mc.evolve~" />
		<seealso name="mc.line~" />
		<seealso name="mc.phasor~" />
		<seealso name="phasor~" />
		<seealso name="mc_topic" module="topics" type="vignette" />
	</seealsolist>
</c74object>
