<?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.apply~" module="" category="">
	<digest>
		Apply a Function to a Multichannel Signal
	</digest>
	<description>
		The <o>mc.apply~</o> object accepts a breakpoint function in the same format as <o>line~</o> and applies it over the space of channels of a multi-channel signal. Each channel contains a sample of the function evenly divided in the X dimension. In addition, <o>mc.apply~</o> can store up to 64 functions, edited by <o>mc.function</o>, which you can recall and continuously interpolate using a signal input.
	</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="signal, float">
			<digest>
				Function Index
			</digest>
			<description>
				Specifies, either as a signal or float, the index of the stored function to output, where 0 represents the first function. A number with a fractional part will interpolate between functions, so 0.5 will be halfway between the first and second stored.
			</description>
		</inlet>
		<inlet id="1" type="float, list">
			<digest>
				Define Function in line~ Format
			</digest>
			<description>
				A series of breakpoints that defines a function. The number of the function to replace is specified by the right inlet. Connect the second outlet of the <o>function</o> or <o>mc.function</o> objects to this inlet.
			</description>
		</inlet>
		<inlet id="2" type="int">
			<digest>
				Current Function Number
			</digest>
			<description>
				Specifies the function that will be set by a message in the middle inlet. Connect the rightmost outlet of <o>mc.function</o> to this inlet.
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="multi-channel signal">
			<digest>
				Function Applied to Channels
			</digest>
			<description>
				A multi-channel signal containing a space of points representing the current function(s).
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="channels" optional="1" type="int">
			<digest>
				Output channel count
			</digest>
			<description>
				Sets the number of output channels in the multi-channel signal. The default value is 1.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Sets function number to output (starting at 0); only has an effect when there is no signal connected to the left inlet.
				<br />
				In middle inlet: Set the initial Y value of the breakpoint function (at time 0). However until a list is received, the function won't be changed.
				<br />
				In right inlet: Sets the function number that will be modified by a subsequent <m>list</m> message of breakpoints received in the middle inlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="ARG_NAME_0" type="float" optional="0" />
			</arglist>
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: Sets function number to output (starting at 0); only has an effect when there is no signal connected to the left inlet. A <m>float</m> with a fractional part performs interpolation between two functions.
				<br />
				In middle inlet: Set the initial Y value of the breakpoint function (at time 0). However until a list is received, the function won't be changed.
				<br />
				In right inlet: Sets the function number that will be modified by a subsequent <m>list</m> message of breakpoints received in the middle inlet.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Define a function
			</digest>
			<description>
				In middle inlet: A list of breakpoints in <o>line~</o> format (as output by the <o>function</o> object) defines a function for <o>mc.apply~</o> to apply across a space of output channels. The list should consist of alternating value, time pairs. The function is applied such that the beginning (at 0) maps to the first output channel and the end maps to the last output channel.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function index
			</digest>
			<description>
				Specifies the index of the stored function to output, where 0 represents the first function. A number with a fractional part will interpolate between functions, so 0.5 will be halfway between the first and second stored. By sending a ramp into the inlet inlet of <o>mc.apply~</o> you can continuously morph between two functions.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="chans" get="1" set="1" type="int" size="1">
			<digest>
				Number of Channels
			</digest>
			<description>
				Sets the number of output channels in the multi-channel signal. When <at>chans</at> is set as a typed-in argument or when the audio is turned off, the change is reflected immediately. If <at>chans</at> is changed while the audio is on, the change is reflected the next time audio is restarted.
			</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="label" get="1" set="1" type="symbol" size="1" value="Number of Channels" />
			</attributelist>
		</attribute>
		<attribute name="functions" get="1" set="1" type="int" size="1">
			<digest>
				Number of Functions
			</digest>
			<description>
				Sets the number of stored functions. This attribute can only be set as a typed-in argument; it cannot be changed after the object is created.
			</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="label" get="1" set="1" type="symbol" size="1" value="Number of Functions" />
			</attributelist>
		</attribute>
		<attribute name="ramptime" get="1" set="1" type="float" size="1">
			<digest>
				Ramp Time
			</digest>
			<description>
				Sets the ramp time between changes in the output in milliseconds. Note that large ramp time values may cause unpredictable behavior when driving continuous interpolation between functions with a signal input.
			</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="label" get="1" set="1" type="symbol" size="1" value="Ramp Time" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="function" />
		<seealso name="mc.function" />
		<seealso name="mc.gradient~" />
		<seealso name="mc.range~" />
		<seealso name="phasor~" />
	</seealsolist>
</c74object>
