<?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="table" module="max" category="Data">
	<digest>
		Store and edit an array of numbers
	</digest>
	<description>
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Data
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				int Outputs Value at Index, list Stores Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Sets Y Value for Next int at Left Inlet
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Outputs Requested Indices or Values
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Outputs bang When Table Window Edited
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="name" optional="1" type="symbol">
			<digest>
				Name the table context
			</digest>
			<description>
				The argument gives a name to the <o>table</o>. Max looks for a file of the same name to load. If two or more <o>table</o> objects share the same names, they also share the same values.
			</description>
			<discussion>
				For information about using named objects in Max for Live, click <link module="core" name="live_symbols" type="vignette">here</link>.
			</discussion>
		</objarg>
	</objarglist>
	<!--parameter-->
	<parameter />
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output a random quantile
			</digest>
			<description>
				Same as a <m>quantile</m> message with a random number between 0 and 32,768 as an argument. See the <m>quantile</m> message for more details.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Retrieve a number by index
			</digest>
			<description>
				Retrieves the number by address from the <o>table</o>, and sends if out the left outlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="index" optional="0" type="float" />
			</arglist>
			<digest>
				Convert to <m>int</m> 
			</digest>
			<description />
		</method>
		<method name="list">
			<arglist>
				<arg name="index" optional="0" type="int" />
				<arg name="value" optional="0" type="int" />
			</arglist>
			<digest>
				Store a value at an index
			</digest>
			<description>
				The second number is stored in at the address (index) specified by the first number.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Set all values to 0
			</digest>
			<description />
		</method>
		<method name="const">
			<arglist>
				<arg name="value" optional="0" type="int" />
			</arglist>
			<digest>
				Fill the table with a number
			</digest>
			<description />
		</method>
		<method name="(mouse)">
			<digest>
				The values stored in table can be entered and edited graphically with the mouse.
			</digest>
			<description>
				The values stored in table can be entered and edited graphically with the mouse. When a <o>table</o> object is first created in a patcher window, the <o>table</o> object’s graphic editing window is opened, and values can be entered by drawing with the mouse. The editing window provides a palette of graphic editing tools. When the patcher window is locked, the graphic editing window can be opened by double-clicking with the mouse on the <o>table</o> object.
			</description>
			<discussion>
				A table can be created in a separate file by opening a new Table window and choosing the <b>Save</b> command from the File menu. A table can also be created in a separate file by opening a new Text file, and simply beginning the file with the word <m>table</m>, followed by a list of space-separated numbers, specifying values to be stored in the table.
				<br />
				A table which has been saved as a file can be viewed and edited as text by choosing <b>Open as Text…</b> from the File menu. Numbers in the form of text can be pasted in from other sources such as the editing window of a <o>capture</o> object, or even from another program such as a word processor. Text from a capture object can also be pasted directly into a <o>table</o> object’s graphic editing window.
			</discussion>
		</method>
		<method name="dump">
			<arglist />
			<digest>
				Output all numbers
			</digest>
			<description>
				Sends all the numbers stored in the table out the left outlet in immediate succession, beginning with address 0.
			</description>
		</method>
		<method name="cancel">
			<arglist />
			<digest>
				Ignore value received
			</digest>
			<description>
				Causes table to ignore a number received in the right inlet, so that the next number received in the left inlet will output a number, rather than storing a number at that address.
			</description>
		</method>
		<method name="fquantile">
			<arglist>
				<arg name="multiplier" optional="0" type="float" />
			</arglist>
			<digest>
				Return quantile address from float
			</digest>
			<description>
				Given a number between zero and one, multiplies the number by the sum of all the numbers in the table. Then, table sends out the address at which the sum of the all values up to that address is greater than or equal to the result.
			</description>
		</method>
		<method name="getbits">
			<arglist>
				<arg name="address" optional="0" type="int" />
				<arg name="start" optional="0" type="int" />
				<arg name="bits" optional="0" type="int" />
			</arglist>
			<digest>
				Get bit values from an index
			</digest>
			<description>
				Gets the value of one or more specific bits of a number stored in the table, and sends that value out the left outlet. The first argument is the address to query; the second argument is the starting bit location in the number stored at that address (the bit locations are numbered 0 to 31, from the least significant bit to the most significant bit); and the third argument specifies how many bits to the right of the starting bit location should be sent out. The specified bits are sent out the outlet as a single decimal integer.
			</description>
			<discussion>
				For example, the message <m>getbits 61 4 3</m> will look at address 61 in the table, start at bit location 4 (the fifth bit from the right), and send out the decimal number that corresponds to the 3 bits starting at that location. So, suppose that address 61 of the table stores the number 87. The binary form of 87 is 10 <i>101</i> 11. The 3 bits starting at bit location 4 are 101, which is the binary form of the decimal integer 5, so 5 is the number that is sent out the outlet.
			</discussion>
		</method>
		<method name="goto">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Set the pointer location
			</digest>
			<description>
				Sets a pointer to the address specified by the number. The pointer is set at the beginning of the table initially.
			</description>
		</method>
		<method name="flags">
			<arglist>
				<arg name="save-with-patcher" optional="0" type="list" />
				<arg name="dont-save" optional="0" type="list" />
			</arglist>
			<digest>
				Change the file save options
			</digest>
			<description>
				Changes the <o>table</o> object’s saving options as found in the Inspector. The first argument affects the Save with Patcher option, and the second argument affects the Don’t Save option. If the argument is zero the option is unchecked, otherwise it is checked.
			</description>
			<discussion>
				For example, the message <m>flags 1 1</m> will cause the <o>table</o> object’s contents to be saved as part of the patch that contains it, and Max will not ask to save any changes that are made to the table.
			</discussion>
		</method>
		<method name="in1">
			<arglist>
				<arg name="value" optional="0" type="int" />
			</arglist>
			<digest>
				Store a value
			</digest>
			<description>
				Stores the value at the next index number received at the left inlet.
			</description>
		</method>
		<method name="inv">
			<arglist>
				<arg name="value" optional="0" type="int" />
			</arglist>
			<digest>
				Find the index of a value
			</digest>
			<description>
				Finds the first value which is greater than or equal to that number, and sends the address of that value out the left outlet.
			</description>
		</method>
		<method name="length">
			<arglist />
			<digest>
				Output the table size
			</digest>
			<description />
		</method>
		<method name="max">
			<arglist />
			<digest>
				Retrieve the maximum stored value
			</digest>
			<description />
		</method>
		<method name="min">
			<arglist />
			<digest>
				Retrieve the minimum stored value
			</digest>
			<description />
		</method>
		<method name="load">
			<arglist />
			<digest>
				Fill a table with a stream of data
			</digest>
			<description>
				Places the table in load mode. In load mode, every number received in the left inlet gets stored in the table, beginning at address 0 and continuing until the table is filled (or until the table is taken out of load mode by a <m>normal</m> message). If more numbers are received than will fit in the size of the table, additional numbers are ignored.
			</description>
		</method>
		<method name="open">
			<arglist />
			<digest>
				Open the graphic editor
			</digest>
			<description>
				Opens the object’s graphic editor window and brings it to the foreground. Double-clicking on the <o>table</o> object in a locked patcher has the same effect.
			</description>
		</method>
		<method name="next">
			<arglist />
			<digest>
				Output value, then move the pointer
			</digest>
			<description>
				Sends the value stored in the address pointed at by the pointer out the left outlet, then sets the pointer to the next address. If the pointer is currently at the last address in the table, it wraps around to the first address.
			</description>
		</method>
		<method name="normal">
			<arglist />
			<digest>
				Exit load mode
			</digest>
			<description>
				Takes the table out of load mode and reverts it to normal operation. See the <m>load</m> message for more details.
			</description>
		</method>
		<method name="quantile">
			<arglist>
				<arg name="number" optional="0" type="int" />
			</arglist>
			<digest>
				Return quantile address
			</digest>
			<description>
				Multiplies the incoming number by the sum of all the numbers in the table. This result is then divided by 2^15 (32,768). Then, table sends out the address at which the sum of all values up to that address is greater than or equal to the result.
			</description>
		</method>
		<method name="prev">
			<arglist />
			<digest>
				Output value, then move the pointer
			</digest>
			<description>
				Causes the same output as the <m>next</m> message, but the pointer is then decremented rather than incremented. If the pointer is currently at the first address in the table, it wraps around to the last address.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="start" optional="0" type="int" />
				<arg name="values" optional="0" type="list" />
			</arglist>
			<digest>
				Store a list of values
			</digest>
			<description>
				Stores values in certain addresses. The first argument specifies an address. The next number is the value to be stored in that address, and each number after that is stored in a successive address.
			</description>
		</method>
		<method name="setbits">
			<arglist>
				<arg name="address" optional="0" type="int" />
				<arg name="start" optional="0" type="int" />
				<arg name="count" optional="0" type="int" />
				<arg name="value" optional="0" type="int" />
			</arglist>
			<digest>
				Change the bit values of an address
			</digest>
			<description>
				Changes the value of one or more specific bits of a number stored in the table. The first argument is the address being referred to; the second argument is the starting bit location in the number stored at that address (the bit locations are numbered 0 to 31, from the least significant bit to the most significant bit); the third argument specifies how many bits to the right of the starting bit location should be modified, and the fourth argument is the value (stated in decimal or hexadecimal form) to which those bits should be set.
			</description>
			<discussion>
				For example, the message <m>setbits 47 5 3 6</m> will look at address 47 in the table, start at bit location 5 (the sixth bit from the right), and replace the 3 bits starting at that location with the bits 110 (the binary equivalent of the decimal integer 6). Suppose that address 47 of the table stores the number 87. The binary form of 87 is 1010111, so replacing the 3 bits starting at bit location 5 with 110 would change the number to 1110111, which is the binary form of the decimal integer 119. The new number stored at address 47 in the table will therefore be 119.
			</discussion>
		</method>
		<method name="sum">
			<arglist />
			<digest>
				Output the sum of all values
			</digest>
			<description />
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" optional="0" type="symbol" />
			</arglist>
			<digest>
				Read a data file from disk
			</digest>
			<description>
				Opens and reads data values from a file in Text or Max binary format. Without an argument, <m>read</m> opens a standard Open Document dialog to choose a file. If the file contains valid data, the entire contents of the existing table are replaced with the file contents.
			</description>
		</method>
		<method name="send">
			<arglist>
				<arg name="receive-name" optional="0" type="symbol" />
				<arg name="address" optional="0" type="int" />
			</arglist>
			<digest>
				Send a value to a receive object
			</digest>
			<description>
				Sends the value stored at the incoming address to all <o>receive</o> objects with that name.
			</description>
		</method>
		<method name="refer">
			<arglist>
				<arg name="name" optional="0" type="symbol" />
			</arglist>
			<digest>
				Change table data context
			</digest>
			<description>
				Sets the receiving <o>table</o> object to read its data values from the named table.
			</description>
		</method>
		<method name="wclose">
			<arglist />
			<digest>
				Close the graphic editing window
			</digest>
			<description />
		</method>
		<method name="write">
			<arglist />
			<digest>
				Write data to disk
			</digest>
			<description>
				Opens a standard save file dialog for choosing a name to write data values from the table. The file can be saved in Text or Max binary format.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="embed" get="1" set="1" type="int" size="1">
			<digest>
				Embed data into the patch file
			</digest>
			<description>
				Toggles the ability to embed the table and save its data as part of the main patch. The default behavior is 1 (save the data).
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Save Data With Patcher" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="name" get="1" set="1" type="symbol" size="1">
			<digest>
				Specify the table name
			</digest>
			<description>
				Specifies the name of a table. You can also specify the name of a <o>table</o> object using an argument. Max looks for a table of the s ame name which has been saved as a separate file. If two or more table objects share the same names, they also share the same values.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Table Name" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="notename" get="1" set="1" type="int" size="1">
			<digest>
				Use MIDI note names.
			</digest>
			<description>
				Toggles Y axis display using MIDI note names.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Note Name Legend" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="parameter_enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable parameter mode handling
			</digest>
			<description>
				Enables use of this object with <link module="core" name="live_parameters" type="vignette">Max for Live Parameters</link>.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Parameter" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Parameter Mode Enable" />
				<attribute name="order" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="range" get="1" set="1" type="int" size="1">
			<digest>
				Specify the Y axis value range
			</digest>
			<description>
				Specifies the range of values which can be displayed on the y axis of the editing window. A newly created table has a range of 128, from 0 to 127.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Table Range" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="signed" get="1" set="1" type="int" size="1">
			<digest>
				Signed Values
			</digest>
			<description>
				Toggles the ability to store and display signed integer values. A newly created table with signed values has a range of 256, from -128 to 127.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Signed Values" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="size" get="1" set="1" type="int" size="1">
			<digest>
				Specify the number of values
			</digest>
			<description>
				Specifies the number of values stored in the table. The default is 128 values, indexed with numbers from 0 to 127.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Table Size" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="table.png" caption="An array of any size and range can be stored, recalled, and modified" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="capture" />
		<seealso name="coll" />
		<seealso name="funbuff" />
		<seealso name="histo" />
		<seealso name="itable" />
		<seealso name="multislider" />
		<seealso name="text" />
		<seealso module="max" name="basicchapter17" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				All numbers sent out by <o>table</o> are sent out the left outlet.
			</description>
		</entry>
		<entry name="bang">
			<description>
				When the contents of a <o>table</o> have been changed by an edit in the graphic editing window, <m>bang</m> is sent out the right outlet.
			</description>
		</entry>
	</misc>
</c74object>
