<?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.chord~" module="" category="">
	<digest>
		Store and Recall Signal Values Associated with an Index
	</digest>
	<description>
		The <o>mc.chord~</o> object is something like a version of the Max <o>coll</o> object that generates audio signals. You can store lists (which you can think of as <i>chords</i>) of numbers associated with a unique index, then recall your lists with messages or signals. When recalled, list values are assigned to channels in a multi-channel signal according to one of several allocation modes.
	</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, list">
			<digest>
				Input
			</digest>
			<description>
				A signal connected to <o>mc.chord~</o> recalls stored lists according to the current <at>inputmode</at>. You can also store or recall values using messages.
			</description>
		</inlet>
		<inlet id="1" type="signal, list">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="multi-channel signal">
			<digest>
				List Values
			</digest>
			<description>
				A multi-channel signal containing the values of the most recently recalled list. The assignment of list values to channels is set by the <at>allocmode</at> attribute. If <at>offmode</at> is set to zero, unused channels will be set to zero, otherwise they contain values from previously recalled lists.
			</description>
		</outlet>
		<outlet id="1" type="multi-channel signal">
			<digest>
				1 if On, 0 if Off
			</digest>
			<description>
				If a channel in the left outlet is currently allocated to a list value, the corresponding channel in the second outlet will be 1, otherwise it will be 0.
			</description>
		</outlet>
		<outlet id="2" type="list">
			<digest>
				Chord as a List
			</digest>
			<description>
				When a stored list in <o>mc.chord~</o> is recalled, it will be sent out the third outlet. The order of the list is the order the values were initially stored, which may not correpond to the order they appear in the channels of the left outlet depending on the current setting of <at>allocmode</at>.
			</description>
		</outlet>
		<outlet id="3" type="int">
			<digest>
				Last Index Recalled
			</digest>
			<description>
				When a list is recalled, its index is sent out the right outlet.
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="channels" type="int" optional="1">
			<digest>
				Channel Count
			</digest>
			<description>
				An <m>int</m> supplied as an argument sets the initial output channel count.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output next chord
			</digest>
			<description>
				<m>bang</m> outputs the next stored list as a multi-channel signal out the left outlet; repeated <m>bang</m> messages will cycle through all stored lists.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				Output list associated with index
			</digest>
			<description>
				An <m>int</m> outputs the list associated with the number as a multi-channel signal out the left outlet. If no list was stored at this number, zero signals are output.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="ARG_NAME_0" type="float" optional="0" />
			</arglist>
			<digest>
				Converted to int
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Store values
			</digest>
			<description>
				<m>list</m> stores the items starting at the second value at an index specified by the first value. Example: <m>5 30 40 50</m> will store the list <m>30 40 50</m> at index 5.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Clear all lists
			</digest>
			<description>
				The <m>clear</m> message clears all lists stored in the object. To delete an individual list using its associated index, use <m>delete</m>.
			</description>
		</method>
		<method name="delete">
			<arglist />
			<digest>
				Delete a list associated with an index
			</digest>
			<description>
				The word <m>delete</m> followed by an index deletes a list of values associated with that index.
			</description>
		</method>
		<method name="dictionary">
			<arglist>
				<arg name="name" type="symbol" optional="0" />
			</arglist>
			<digest>
				Replace all values
			</digest>
			<description>
				When <o>mc.chord~</o> receives a <m>dictionary</m> in the proper format, it will replace all stored lists with those in the dictionary. Data must be in the form of an array of dictionaries associated with the key <m>data</m>. Each dictionary has the key <m>index</m> with the index to associate with the list, followed by a list of values associated with the key <m>values</m>.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Output matching lists based on signal values
			</digest>
			<description>
				When <at>inputmode</at> is set to Lookup (0), the signal value is truncated to an integer. When this integer value changes, <o>mc.chord~</o> checks whether it matches an index for a stored list; if so, it outputs the associated list as a multi-channel signal.
				<br />
				When <at>inputmode</at> is set to Increment Index (1), any change in the value of the input signal will cause the next stored list to be output in a cyclic fashion.
			</description>
		</method>
		<method name="store">
			<arglist>
				<arg name="values" type="list" optional="0" />
			</arglist>
			<digest>
				Store values
			</digest>
			<description>
				The word <m>store</m> followed by a list argument, stores the items in the list starting at the second value at an index specified by the first value. Example: <m>store 5 30 40 50</m> will store the list <m>30 40 50</m> at index 5.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="allocmode" get="1" set="1" type="int" size="1">
			<digest>
				Allocation Mode
			</digest>
			<description>
				Determine how list values are allocated to channels
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="4">
					<enumlist>
						<enum name="Lowest">
							<digest>
								Start at first channel
							</digest>
							<description>
								WHen <at>allocmode</at> is set to Lowest (0), list items are output starting with the first item allocated to the first output channel.
							</description>
						</enum>
						<enum name="Highest">
							<digest>
								Start at last channel
							</digest>
							<description>
								WHen <at>allocmode</at> is set to Highest (1), list items are output starting with the first item allocated to the last output channel, the second item to the second-to-last channel, etc.
							</description>
						</enum>
						<enum name="Cyclic">
							<digest>
								Assign to least recently used channels
							</digest>
							<description>
								When <at>allocmode</at> is set to Cyclic (2), list items are assigned to least recently used channels in ascending order.
							</description>
						</enum>
						<enum name="Random">
							<digest>
								Assign randomly
							</digest>
							<description>
								When <at>allocmode</at> is set to Random (3), list items are assigned to randomly chosen channels.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Allocation Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="busymapname" get="1" set="1" type="symbol" size="1">
			<digest>
				Busy Map Name
			</digest>
			<description>
				Sets the name of a busy map (within an <o>mc.noteallocator~</o> or <o>mc.voiceallocator~</o> object)to use in determining channel allocation. When there is an active busy map (<at>usebusymap</at> is enabled), items will be assigned to channels accoding to the current <at>allocmode</at> but only non-busy channels will be used. The value <m>none</m> resets the busy map to the default busy map for the patcher.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Busy Map Name" />
			</attributelist>
		</attribute>
		<attribute name="chans" get="1" set="1" type="int" size="1">
			<digest>
				Output Channels
			</digest>
			<description>
				Sets the number of channels in the two <o>mc.chord~</o> multi-channel outputs. If the audio is on, the change will take place the next time the audio is restarted.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Channels" />
			</attributelist>
		</attribute>
		<attribute name="embed" get="1" set="1" type="int" size="1">
			<digest>
				Save data with patcher
			</digest>
			<description>
				When <at>embed</at> is enabled, list and index data currently stored inside <o>mc.chord~</o> will be saved in its patcher and recalled when the patcher is reopened.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Save Data With Patcher" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="extendmode" get="1" set="1" type="int" size="1">
			<digest>
				Extend (Missing Index) Mode
			</digest>
			<description>
				Sets how non-existent indices are matched or ignored
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="Nearest">
							<digest>
								Match Nearest
							</digest>
							<description>
								When an <m>int</m> is received that does not match an existing index, the list associated with the closest index will be output.
							</description>
						</enum>
						<enum name="Zero">
							<digest>
								Output zero
							</digest>
							<description>
								When an <m>int</m> is received that does not match an existing index, zero signals will be output.
							</description>
						</enum>
						<enum name="Ignore">
							<digest>
								Do nothing
							</digest>
							<description>
								When an <m>int</m> is received that does not match an existing index, no change in the output occurs.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Extend (Missing Index) Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="inputmode" get="1" set="1" type="int" size="1">
			<digest>
				Input Mode
			</digest>
			<description>
				Determines how a signal value change is mapped to an output
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="Lookup">
							<digest>
								Treat signal value as index
							</digest>
							<description>
								When <at>inputmode</at> is set to Lookup (0), the signal value is converted to an <m>int</m> by truncation. When the <m>int</m> value changes, the value is used to match a stored list.
							</description>
						</enum>
						<enum name="Increment Index">
							<digest>
								Signal changes output next
							</digest>
							<description>
								When <at>inputmode</at> is set to Increment Index (1), any change in the input signal according to the current value of <at>triggermode</at> causes the next stored list to be output in a cyclic fashion.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Input Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="offmode" get="1" set="1" type="int" size="1">
			<digest>
				Off Mode
			</digest>
			<description>
				Determines handling of output channels with inactive values
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="Zero">
							<digest>
								Zero inactive outputs
							</digest>
							<description>
								When <at>offmode</at> is set to Zero (0), inactive output channels are set to zero.
							</description>
						</enum>
						<enum name="Hold">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								When <at>offmode</at> is set to Hold (1), inactive output channels retain their previous value. You can determine which output channels are active by using the corresponding channel's signal value within the multi-channel signal output from the second outlet of <o>mc.chord~</o>.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Off Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="triggermode" get="1" set="1" type="int" size="1">
			<digest>
				Trigger Mode
			</digest>
			<description>
				Determines a signal change for increment index <at>inputmode</at> 
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="Zero to Non-Zero">
							<digest>
								Trigger changes on zero to non-zero transitions
							</digest>
							<description>
								When <at>triggermode</at> is set to Zero to Non-Zero (0), signal changes for incrementing the index of the output (when <at>inputmode</at> is set to Increment Index) are defined as the previous sample being zero and the current sample being non-zero.
							</description>
						</enum>
						<enum name="Change">
							<digest>
								Any signal change
							</digest>
							<description>
								When <at>triggermode</at> is set to Change (1), signal changes for incrementing the index of the output (when <at>inputmode</at> is set to Increment Index) are defined as any difference between the value of the previous and current samples in the input signal.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Trigger Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="usebusymap" get="1" set="1" type="int" size="1">
			<digest>
				Use Allocator Busy Map
			</digest>
			<description>
				When <at>usebusymap</at> is enabled, <o>mc.chord~</o> will only allocate output values to non-busy channels of the current busy map.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Use Allocator Busy Map" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="coll" />
		<seealso name="mc.op~" />
		<seealso name="mc.snowphasor~" />
	</seealsolist>
</c74object>
