<?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.evolve~" module="msp" category="MC">
	<digest>
		Generate a periodic multichannel function from breakpoint ranges
	</digest>
	<description>
		The <o>mc.evolve~</o> object accepts breakpoints consisting of ranges where both the domain and range go from 0 to 1. It maps this set of ranges across the space of a multichannel output signal, where the first channel in the output signal outputs the low end of the range and the last channel outputs the high end. Connect a <o>phasor~</o> or another time-varying signal to <o>mc.evolve~</o> to drive the 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 Phase, list Sets Function
			</digest>
			<description>
				TEXT_HERE
			</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>
				Query value for an output channel
			</digest>
			<description>
				When <o>mc.evolve~</o> receives a <m>chanval</m> message it will send the value of its output for a given channel index (1 - N) and input value (0-1) out its middle outlet. This value is a point within the output range at the given input position.
			</description>
		</outlet>
		<outlet id="2" type="list">
			<digest>
				Query value of the output range
			</digest>
			<description>
				When <o>mc.evolve~</o> receives a <m>float</m> message (0-1) it will send the two values representing its current output range at the given input position out its right outlet.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="chans" type="int" optional="0">
			<digest>
				Number of output channels
			</digest>
			<description>
				Sets the number of channels in the output multichannel signal.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="function index" type="int" optional="0" />
			</arglist>
			<digest>
				Converted to float
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="function index" type="float" optional="0" />
			</arglist>
			<digest>
				Function range at a given index
			</digest>
			<description>
				When <o>mc.evolve~</o> receive a float (0-1), it outputs a list out its right outlet containing its output range at the given location.
			</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" />
			</arglist>
			<digest>
				Add a new breakpoint
			</digest>
			<description>
				A list message adds a new breakpoint to the function stored by <o>mc.evolve~</o>. Up to 3 values can be used to specify the x (input) postion, upper y (output) value, and lower y (output) value. If the list contains two values, it creates a breakpoint with a fixed y value at the x postion. An optional 3rd value specifies the lower y value range.
			</description>
		</method>
		<method name="chanval">
			<arglist>
				<arg name="channel" type="int" optional="0" />
				<arg name="index" type="float" optional="0" />
			</arglist>
			<digest>
				Query channel value at index
			</digest>
			<description>
				When <o>mc.evolve~</o> receives a <m>chanval</m> message it will send the value of its output for a given channel index (1 - N) and input value (0-1). This value is a point within the output range at the given input position.
			</description>
		</method>
		<method name="clear">
			<arglist>
				<arg name="breakpoint_index" type="int" optional="1" />
			</arglist>
			<digest>
				Clear breakpoints
			</digest>
			<description>
				The <m>clear</m> message with no arguments clears all breakpoints in the current function. An optional index argument can be used to specify a breakpoint to clear. Breakpoints indices are ordered based on their x-position, with position 0 representing the 0.0 x position. The <o>mc.evolve~</o> object always maintains a breakpoint at both the 0. and 1. positions.
			</description>
		</method>
		<method name="printfunction">
			<arglist />
			<digest>
				Print current function
			</digest>
			<description>
				Sending the <m>printfunction</m> message to <o>mc.evolve~</o> prints each breakpoint in the current function on its own line to the console. Breakpoints are multi-element lists in the form <m>x: (float) y: (float1) (float2)</m>.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Driving function
			</digest>
			<description>
				Use a <o>phasor~</o> or other time-varying signal with a 0-1 range to drive the multichannel output of <o>mc.evolve~</o>.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="chans" get="1" set="1" type="int" size="1">
			<digest>
				Output Channels
			</digest>
			<description>
				The number of output channels can be reduced from the value specified by the object's argument; in this case extra outputs will be zero and the output range will be spread over a smaller number of channels.
			</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="inclusive" get="1" set="1" type="int" size="1">
			<digest>
				Include Range Endpoints
			</digest>
			<description>
				Determines how endpoint values are taken into account when calculating values for each output channel.
			</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="1" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="4">
					<enumlist>
						<enum name="Neither">
							<digest>
								Ignore Endpoints
							</digest>
							<description>
								Use neither the low or high endpoint values when calculating mc channel values.
							</description>
						</enum>
						<enum name="Both">
							<digest>
								Use Endpoints
							</digest>
							<description>
								Use the low enpoint value for the first channel and high endpoint value as the last channel when calculating mc channel values.
							</description>
						</enum>
						<enum name="Low Only">
							<digest>
								Use Low
							</digest>
							<description>
								Uses the low endpoint value for the first channel and calculates all other channel values accordingly.
							</description>
						</enum>
						<enum name="High Only">
							<digest>
								Use High
							</digest>
							<description>
								Uses the high endpoint value for the last channel and calculates all other channel values accordingly.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Include Range Endpoints" />
				<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="multirange" />
		<seealso name="mc.gradient~" />
		<seealso name="mc.range~" />
		<seealso name="mc_function_generators" module="core" type="vignette" />
	</seealsolist>
</c74object>
