<?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="pattrstorage" module="max" category="Data">
	<digest>
		Save and recall pattr presets
	</digest>
	<description>
		View and modify client object data, and store or recall presets.
	</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, float, messages
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="name" optional="1" type="symbol">
			<digest>
				Scripting name
			</digest>
			<description>
				A symbol argument may be optionally used to set the <o>pattrstorage</o> object's scripting name. In the absence of an argument, the <o>pattrstorage</o> object is given an arbitrary, semi-random name, such as u197000004.
			</description>
		</objarg>
	</objarglist>
	<!--parameter-->
	<parameter />
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Recall a preset
			</digest>
			<description>
				Recalls the data from the preset specified by <m>int</m>.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="index" optional="0" type="float" />
			</arglist>
			<digest>
				Interpolate between presets
			</digest>
			<description>
				Recalls the data from the preset specified by <m>float</m>. If the number falls between two whole numbers (e.g. <m>1.5</m>), the <o>pattrstorage</o> object will interpolate between the data stored in the preset corresponding to the integer portion of the float and the data stored at the preset numbered one higher (e.g. <m>1.5</m> will cause <o>pattrstorage</o> to interpolate 50% between presets 1 and 2). See the <m>interp</m> message for more information about interpolation modes.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="arguments" optional="0" type="list" />
			</arglist>
			<digest>
				Direct pattr access
			</digest>
			<description>
				Incoming messages to the <o>pattrstorage</o> object are analyzed. If the first element of the message matches the path name or alias of an object maintained by the <o>pattrstorage</o> object (visible in the object's client list), the subsequent arguments in the message set that object's value. Otherwise, the message is ignored.
			</description>
		</method>
		<method name="active">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Set client active status
			</digest>
			<description>
				The word <m>active</m>, followed by a symbol that specifies the path name or alias of a client object and a 1 or 0, sets that object's active status. When a client object is active (default), its data will be recalled when presets are recalled--otherwise, the object is ignored during recall. Setting the <m>active</m> state of a parent object (such as a patcher-any client object containing other client objects), automatically sets the <m>active</m> state of the child objects of the parent to the same value.
			</description>
		</method>
		<method name="alias">
			<arglist>
				<arg name="client" optional="1" type="symbol" />
				<arg name="alias" optional="1" type="symbol" />
			</arglist>
			<digest>
				Create an alias for a client
			</digest>
			<description>
				The word <m>alias</m>, followed by two symbols, generates an alias for the client object whose path name is given in the first argument. The alias permits the object to be referred to by a name given in the second argument.
				<br />
				<br />
				For example, <m>alias a_patcher::a_pattr the_pattr</m> would alias the object at the location a_patcher::a_pattr to the name the_pattr.
				<br />
				<br />
				Aliases can be used interchangeably with path names within the <o>pattrstorage</o> object, and are useful for referring to long paths by simpler, shorter names.
				<br />
				<br />
				get <m>alias</m> The word get <m>alias</m>, followed by a symbol that specifies the path name of a client object, returns that object's alias (if any) from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>alias</m>.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Delete all presets
			</digest>
			<description>
				The word <m>clear</m> removes all presets from the <o>pattrstorage</o> object's internal list.
			</description>
		</method>
		<method name="client_close">
			<arglist />
			<digest>
				Close the client list window
			</digest>
			<description>
				Closes the client list window.
			</description>
		</method>
		<method name="clientwindow">
			<arglist>
				<arg name="name" optional="0" type="list" />
			</arglist>
			<digest>
				Open a pattrstorage client window
			</digest>
			<description>
				Opens the <o>pattrstorage</o> object's client list window (the title bar reads clientwindow (name), where (name) is the patcher name of the pattrstorage object which created the window).
			</description>
		</method>
		<method name="copy">
			<arglist>
				<arg name="pattrstorage" optional="1" type="symbol" />
				<arg name="from-index" optional="0" type="int" />
				<arg name="t0-index" optional="0" type="int" />
			</arglist>
			<digest>
				Copy a preset
			</digest>
			<description>
				The word <m>copy</m>, followed by 2 or 3 arguments, copies the stored values from one numbered preset to another. Followed by 2 numbers, the stored values from the preset slot specified by the first number will be copied to the preset slot specified by the second number. If that slot doesn't yet exist, it will be automatically created. Followed by a symbol and 2 numbers, the stored values from a preset slot, as specified by the first number, of the <o>pattrstorage</o> object referred to by the symbol will be copied to a preset slot, as specified by the second number, of the object receiving the <m>copy</m> message. For example, the message <m>copy parent::psto_parent 3 1</m> would cause preset 3 of the <o>pattrstorage</o> object called psto_parent, located in the parent patch of the <o>pattrstorage</o> object receiving the <m>copy</m> message, to be copied to preset 1 of the <o>pattrstorage</o> object receiving the message. In order for this to function reliably, client path names must match exactly. If they do not, the data for that client is ignored.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Open the client window
			</digest>
			<description>
				Double-clicking on a <o>pattrstorage</o> object opens the object's client list window, as if the object had received the <m>clientwindow</m> message.
			</description>
		</method>
		<method name="delete">
			<arglist>
				<arg name="index" optional="1" type="list" />
			</arglist>
			<digest>
				Delete one or all presets
			</digest>
			<description>
				The word <m>delete</m>, followed by a number, clears any data in the preset whose index is specified by that number and removes the preset from the <o>pattrstorage</o> object's internal list. If <m>delete</m> is not followed by an argument, all presets are cleared and removed. See the <m>getslotlist</m> message for further information on viewing the object's list of presets.
			</description>
		</method>
		<method name="dump">
			<arglist />
			<digest>
				Output all current values
			</digest>
			<description>
				The word <m>dump</m> reports the current value of all client objects from the <o>pattrstorage</o> object's outlet as a series of messages, each in the form <m>[object pathname] [data ...]</m>. The output of <m>dump</m> is finished when the message <m>dump done</m> is output.
			</description>
		</method>
		<method name="fade">
			<arglist>
				<arg name="list" optional="0" type="list" />
			</arglist>
			<digest>
				Recall preset data
			</digest>
			<description>
				Identical to the <m>recall</m> message. Deprecated.
			</description>
		</method>
		<method name="fillempty">
			<arglist />
			<digest>
				Fill all empty presets
			</digest>
			<description>
				The word <m>fillempty</m> sets the value of any empty preset slots for all client objects to the current value of the respective object. For client <o>pattr</o> objects with an <at>initial</at> value, the initial value will be used instead. No data is sent to the client objects themselves.
			</description>
		</method>
		<method name="getactive">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Report client active state
			</digest>
			<description>
				The word <m>getactive</m>, followed by a symbol that specifies the path name or alias of a client object, reports the active status of the client object from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>active</m>.
			</description>
		</method>
		<method name="getalias">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Report a client's alias
			</digest>
			<description>
				The word <m>getalias</m>, followed by a symbol that specifies the path name or alias of a client object, will cause <o>pattrstorage</o> to return that client-object's alias from its outlet.
			</description>
		</method>
		<method name="getclientlist">
			<arglist />
			<digest>
				Output a list of pattr clients
			</digest>
			<description>
				The word <m>getclientlist</m> reports the path names of any client objects from the <o>pattrstorage</o> object's outlet as a series of messages, each preceded by the symbol <m>clientlist</m>. The output of <m>getclientlist</m> is finished when the message <m>clientlist done</m> is output.
			</description>
		</method>
		<method name="getcurrent">
			<arglist />
			<digest>
				Report the current preset
			</digest>
			<description>
				The word <m>getcurrent</m> reports the currently active preset from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>current</m>.
			</description>
		</method>
		<method name="getedited">
			<arglist />
			<digest>
				Report the preset edit state
			</digest>
			<description>
				The word <m>getedited</m> reports the edit state of the currently active preset from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>edited</m>. If the data in the currently active preset has been edited, the state is reported as <m>1</m>. Otherwise, the edit state is reported as <m>0</m>.
			</description>
		</method>
		<method name="getinterp">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Report client interpolation mode
			</digest>
			<description>
				The word <m>getinterp</m>, followed by a symbol that specifies the path name or alias of a client object, reports that object's interpolation mode from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>interp</m>.
			</description>
		</method>
		<method name="getlockedslots">
			<arglist />
			<digest>
				Output a list of locked presets
			</digest>
			<description>
				The word <m>getlockedslots</m> reports the indices of any locked slots from the <o>pattrstorage</o> object's outlet as a list, preceded by the symbol <m>lockedslots</m>.
			</description>
		</method>
		<method name="getpriority">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Report client priority
			</digest>
			<description>
				The word <m>getpriority</m>, followed by a symbol that specifies the path name or alias of a client object, reports that object's priority from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>priority</m>.
			</description>
		</method>
		<method name="getslotlist">
			<arglist />
			<digest>
				Output a list of available presets
			</digest>
			<description>
				The word <m>getslotlist</m> reports the numbers of any valid presets from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>slotlist</m>.
			</description>
		</method>
		<method name="getslotname">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Retrieve a preset name
			</digest>
			<description>
				The word <m>getslotname</m>, followed by a number, causes the name of the preset slot specified by the number to be output from the pattrstorage object's outlet, preceded by the symbol <m>slotname</m>.
			</description>
		</method>
		<method name="getslotnamelist">
			<arglist>
				<arg name="range" optional="1" type="int" />
			</arglist>
			<digest>
				Output a list of preset names
			</digest>
			<description>
				The word <m>getslotnamelist</m>, followed by an optional number, reports the slot names of all used slots to be sent from the <o>pattrstorage</o> object's outlet as a series of messages, each preceded by the symbol <m>slotlist</m>. The output of <m>getslotlist</m> is finished when the message <m>slotname done</m> is output.
				<br />
				<br />
				Without an argument, or with an argument of 0, the <m>getslotnamelist</m> message will cause all slots from 0 to the largest stored slot number to be output, regardless of whether the slot has been defined or not. The facilitates the use of the <m>getslotlist</m> message with objects such as <o>umenu</o>. To filter undefined slots (even if they have names), send the <m>getslotlist</m> message with a non-0 argument.
				<br />
				<br />
				For more information, see the <o>pattrstorage</o> object's help file.
			</description>
		</method>
		<method name="getstoredvalue">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Retrieve a client value
			</digest>
			<description>
				The word <m>getstoredvalue</m>, followed by a symbol that specifies the path name or alias of a client object and a number which specifies a preset, reports that object's value, as stored in that preset slot, from the <o>pattrstorage</o> object's outlet, in the form <m>[object pathname or alias] [data ...]</m>.
			</description>
		</method>
		<method name="getsubscriptionlist">
			<arglist />
			<digest>
				Output a list of subscribed items
			</digest>
			<description>
				The word <m>getsubscriptionlist</m> causes the names of all subscribed objects to be sent from the <o>pattrstorage</o> object's outlet as a series of messages, each preceded by the symbol <m>subscriptionlist</m>. The output of <m>getsubscriptionlist</m> is finished when the message <m>subscriptionlist done</m> is output. See the <at>subscribemode</at> attribute for more information.
			</description>
		</method>
		<method name="grab">
			<arglist />
			<digest>
				Access current pattr values
			</digest>
			<description>
				The word <m>grab</m> causes the current value of all client objects to be reacquired by the <o>pattrstorage</o> object. This is particularly useful when the <o>pattrstorage</o> object is managing client objects whose data changes internally, without sending notifications to the <o>pattr</o> system.
			</description>
		</method>
		<method name="insert">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Insert a new preset
			</digest>
			<description>
				The word <m>insert</m>, followed by a number, stores the data for every object maintained by <o>pattrstorage</o> in a numbered preset. The number argument specifies the index of the preset to be stored. Any presets numbers at the specified index or higher are automatically incremented to make room for the inserted preset.
			</description>
		</method>
		<method name="interp">
			<arglist>
				<arg name="arguments" optional="0" type="list" />
			</arglist>
			<digest>
				Set client interpolation mode
			</digest>
			<description>
				The word <m>interp</m>, followed by at least 1 and up to 3 arguments (<m>symbol</m>, <m>symbol</m>, <m>float/symbol</m>), sets the interpolation status and mode for a specific client object. The first symbol specifies the path name or alias of a client object. The second symbol argument determines the mode, and can be one of the following values:
				<br />
				<br />
				<m>off</m>- No interpolation. Same as no additional argument.
				<br />
				<br />
				<m>linear</m>- Linear interpolation. Presets recalled using <m>float</m> or <m>fade</m> messages will be interpolated using a standard linear algorithm.
				<br />
				<br />
				<m>thresh</m>- Threshold. Takes optional 3rd argument, which sets the threshold. Presets recalled using <m>float</m> or <m>fade</m> messages will recall data from the first preset specified when the fade amount is below the threshold, and will recall data from the second preset specified when the fade amount is greater than or equal to the threshold.
				<br />
				<br />
				<m>ithresh</m>- Inverse threshold. Takes optional 3rd argument (<m>float</m>), which sets the threshold. Presets recalled using <m>float</m> or <m>fade</m> messages will recall data from the first preset specified when the fade amount is greater than or equal to the threshold, and will recall data from the second preset specified when the fade amount is less than the threshold.
				<br />
				<br />
				<m>pow</m>- Power curve. Takes optional 3rd argument (<m>float</m>), which sets the exponent to which the fade amount will be raised. Presets recalled using <m>float</m> or <m>fade</m> messages will recall data between the two specified presets, along the curve described. Power curves can be used to create faster or slower &quot;attacks&quot; and &quot;decays&quot; for the fade envelope.
				<br />
				<br />
				<m>table</m>- Table-specified curve. Takes optional 3rd argument (<m>symbol</m>), which specifies the name of a table to use for curve lookup. Presets recalled using <m>float</m> or <m>fade</m> messages will recall data between the two specified presets, along the curve described in the table. Tables are assumed to contain values between 0 and 100, representing the new fade amount * 100 (this is clipped internal to the <o>pattrstorage</o> object, but is not normalized). The length of the table is stretched to match the expected fade values (between 0 and 1), so any number of table entries can be used. If the lookup fade amount does not fall exactly onto a table-specified value, linear interpolation is used to determine the new fade amount. Please see the <o>pattrstorage</o> help file for examples of table-specified interpolation.
			</description>
		</method>
		<method name="locate">
			<arglist>
				<arg name="client" optional="0" type="symbol" />
			</arglist>
			<digest>
				Open the patcher containing an object
			</digest>
			<description>
				The word <m>locate</m>, followed by a symbol corresponding to the path name or alias of an object, will cause the containing patcher of that object to be opened.
			</description>
		</method>
		<method name="lock">
			<arglist>
				<arg name="index" optional="0" type="int" />
				<arg name="status" optional="0" type="int" />
			</arglist>
			<digest>
				Set the lock status of a preset
			</digest>
			<description>
				The word <m>lock</m>, followed by 2 numbers, sets the lock status for a particular preset number. The first argument specifies the preset number to be locked or unlocked. The second argument specifies the lock state, and should be either 0 (unlocked) or 1 (locked). Locked presets cannot be deleted (using the <m>delete</m> or <m>remove</m> messages) or overwritten (using the <m>store</m> message). Locked presets can be moved (as a result of <m>insert</m>, <m>remove</m> or <m>renumber</m> messages, if performed on other presets). Locks are saved in the preset data file.
			</description>
		</method>
		<method name="lockall">
			<arglist>
				<arg name="status" optional="0" type="int" />
			</arglist>
			<digest>
				Lock all presets
			</digest>
			<description>
				The word <m>lockall</m>, followed by a number, sets the lock status for all presets at once. The argument specifies the lock state, and should be either 0 (unlocked) or 1 (locked). Locked presets cannot be deleted (using the <m>delete</m> or <m>remove</m> messages) or overwritten (using the <m>store</m> message). Locked presets can be moved (as a result of <m>insert</m>, <m>remove</m> or <m>renumber</m> messages, if performed on other, unlocked presets). Locks are saved in the preset data file.
			</description>
		</method>
		<method name="priority">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Set client priority
			</digest>
			<description>
				The word <m>priority</m>, followed by a symbol that specifies the path name or alias of a client object and a number, sets the recall and display priority for that object. When presets are recalled, the data for client objects will be restored in the order established by <m>priority</m>. Lower priorities are executed first. Negative priorities are permitted. Priority is only respected within a single level of the patcher hierarchy. Data in parent patchers will always be restored before data in nested patchers.
			</description>
		</method>
		<method name="purge">
			<arglist />
			<digest>
				Rebuild the internal client list
			</digest>
			<description>
				The word <m>purge</m> rebuilds the internal client list of the <o>pattrstorage</o> object, removing entries for client objects which have been deleted or moved. Typically, the <o>pattrstorage</o> object retains a reference to such objects, so that their settings (<m>priority</m>, <m>active</m>, <m>interp</m>, etc.) can be restored if the objects reappear.
			</description>
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" optional="1" type="list" />
			</arglist>
			<digest>
				Read preset data from disk
			</digest>
			<description>
				The word <m>read</m>, followed by an optional symbol that specifies a filename, reads an JSON or XML file representing preset data from disk into the <o>pattrstorage</o> object. If the argument is given, and represents a valid file path, the file will be read from that location--otherwise, a standard File Dialog will be presented for the user to manually choose the file to be read.
			</description>
		</method>
		<method name="readagain">
			<arglist>
				<arg name="filename" optional="1" type="list" />
			</arglist>
			<digest>
				Reload preset data from disk
			</digest>
			<description>
				The word <m>readagain</m> re-reads an JSON or XML file previously specified by the <m>read</m> or <m>write</m> messages. If no file has been previously specified, a standard File Dialog will be presented for the user to manually choose the file to be read.
			</description>
		</method>
		<method name="recall">
			<arglist>
				<arg name="client-name, preset-indices, and interpolation-value" optional="0" type="list" />
			</arglist>
			<digest>
				Recall preset data
			</digest>
			<description>
				The word <m>recall</m>, followed by 1 to 4 arguments, recalls data from a preset. If <m>recall</m> is followed by a number or a floating-point number, the data for every object whose value is stored in the specified preset (or in the interpolated preset represented by a floating-point number - see the <m>float</m> message) will be recalled. If <m>recall</m> is followed by 2 arguments--a symbol and a number--and the <m>symbol</m> argument matches the path name or alias of a client object, only the data for the specified object will be recalled. The number argument always specifies the index (or interpolated index) of the preset to recall.
				<br />
				<br />
				Followed by 3 or 4 arguments, the <m>recall</m> message recalls interpolated data from 2 presets at a specified weight between the two. If the word <m>recall</m> is followed by two numbers that specify the indices of two presets and a a floating point number between 0 and 1.0 that specifies an interpolation value, the data for every object whose value is stored in the specified presets will be recalled.
				<br />
				<br />
				If <m>recall</m> is followed by a symbol that specifies the path name or alias of a client object followed by two numbers that specify the indices of two presets and a floating point interpolation value, only the data for the specified object will be recalled.
				<br />
				<br />
				In these latter cases, the floating point argument specifies the weight of the interpolation, and should be between 0. and 1. A floating point argument of <m>0.</m> would simply recall the data for the preset matching the first index, and <m>1.</m> would recall the data for the preset matching the second index. See the <m>interp</m> message for more information about interpolation modes.
			</description>
		</method>
		<method name="recallmulti">
			<arglist>
				<arg name="weighted-pairs" optional="0" type="list" />
			</arglist>
			<digest>
				The word <m>recallmulti</m>, followed by at least 2 numeric arguments, permits weighted recall of multiple presets.
			</digest>
			<description>
				The word <m>recallmulti</m>, followed by at least 2 numeric arguments, permits weighted recall of multiple presets. Each argument determines the (normalized) weight of a particular preset in the final output. If the argument is an integer, the weight is 100%. If the argument is a floating point number, the integer part of the number determines the preset number, and the floating point part of the number determines the weight. For instance, <m>recallmulti 1.3 2.3 5.4</m> would weight preset 1 at 30%, preset 2 at 30% and preset 5 at 40%. Since weights are normalized, the total weight can be higher than 100%; for instance, <m>recallmulti 1.5 3.5 6.8</m> would calculate correct weights (27.77%, 27.77% and 44.44% respectively), and <m>recallmulti 1 2 3</m>, <m>recallmulti 1.5 2.5 3.5</m> and <m>recallmulti 1.99 2.99 3.99</m> all result in the same output (33.33% for each member).
			</description>
		</method>
		<method name="remove">
			<arglist>
				<arg name="index" optional="0" type="int" />
			</arglist>
			<digest>
				Delete a preset and renumber
			</digest>
			<description>
				The word <m>remove</m>, followed by a number, deletes the data for every object maintained by <o>pattrstorage</o> in a numbered preset. The number argument specifies the index of the preset to be removed. Any presets numbers higher than the specified index are automatically decremented.
			</description>
		</method>
		<method name="renumber">
			<arglist />
			<digest>
				Renumber presets consecutively
			</digest>
			<description>
				The word <m>renumber</m> renumbers stored presets into consecutive preset slots, beginning with slot 1.
			</description>
		</method>
		<method name="resolvealias">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Resolve a client alias
			</digest>
			<description>
				The word <m>resolvealias</m>, followed by a symbol that specifies the alias of a client object, returns that object's full path name (if any) from the <o>pattrstorage</o> object's outlet, preceded by the symbol <m>resolvealias</m>.
			</description>
		</method>
		<method name="setall">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Set a value for all presets
			</digest>
			<description>
				The word <m>setall</m>, followed by a symbol that specifies the path name or alias of a client object and a variable number of additional arguments corresponding to the value of the client object, sets the value of the specified client object <i>for all preset slots</i> to that value. No data is sent to the client object itself.
			</description>
		</method>
		<method name="setstoredvalue">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Directly set client values
			</digest>
			<description>
				The word <m>setstoredvalue</m>, followed by a symbol that specifies the path name or alias of a client object, a number which specifies a preset and a variable number of additional arguments corresponding to the data expected by the client object, sets the value of the specified client object within the specified preset slot to the specified data.
			</description>
		</method>
		<method name="slotname">
			<arglist>
				<arg name="index" optional="0" type="int" />
				<arg name="slotname" optional="1" type="symbol" />
			</arglist>
			<digest>
				Provide a name for a preset
			</digest>
			<description>
				The word <m>slotname</m>, followed by a number and an optional symbol, sets the name of the preset slot specified by the number. If the symbol argument is not present, the name of the slot is removed. Undefined slots can be given names for labeling purposes. If a <o>preset</o> object is linked to the <o>pattrstorage</o> object, it will display the slot name of the corresponding <o>pattrstorage</o> slot.
			</description>
		</method>
		<method name="storage_close">
			<arglist />
			<digest>
				Close the stored data window.
			</digest>
			<description>
				Closes the stored data window.
			</description>
		</method>
		<method name="storagewindow">
			<arglist>
				<arg name="name" optional="0" type="list" />
			</arglist>
			<digest>
				Open a pattrstorage data window
			</digest>
			<description>
				Opens the <o>pattrstorage</o> object's stored data window (the title bar reads storagewindow (name), where (name) is the patcher name of the pattrstorage object which created the window).
			</description>
		</method>
		<method name="store">
			<arglist>
				<arg name="client-and-index" optional="0" type="list" />
			</arglist>
			<digest>
				Store a preset
			</digest>
			<description>
				The word <m>store</m>, followed by 1 or 2 arguments, stores data in a numbered preset. If the word <m>store</m> is followed by a number, the data for every object maintained by <o>pattrstorage</o> will be stored. If <m>store</m> is followed by 2 arguments--a symbol and a number--and the symbol argument matches the path name or alias of a client object, only the data for the specified object will be stored. The number argument always specifies the index of the preset to be stored. If the preset index specified by the number argument is already in use, the existing data will be overwritten without a warning.
				<br />
				<br />
				A storage slot of '0' is allowed, but *IS NOT SAVED* in a file. It can be used as a temporary slot for interpolation activities or other non-permanent experiments.
			</description>
		</method>
		<method name="storeagain">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Store a preset in the last-used slot
			</digest>
			<description>
				The word <m>storeagain</m> simply executes a <m>store</m> operation, using the most recently-use preset slot. If there is no previously-used preset slot (if the <m>store</m> message has never been sent to the object), the message is ignored.
			</description>
		</method>
		<method name="storenext">
			<arglist>
				<arg name="client" optional="0" type="list" />
			</arglist>
			<digest>
				Store a present in an empty slot
			</digest>
			<description>
				The word <m>storenext</m> executes a <m>store</m> operation, using the next empty preset slot, counting up from preset 1. For instance, if preset slots 1, 2 and 4 have data stored in them, and the <o>pattrstorage</o> object receives the <m>storenext</m> message, the current state of the client objects would be stored to preset slot 3. A second <m>storenext</m> message would cause the data to be stored to preset slot 5.
			</description>
		</method>
		<method name="subscribe">
			<arglist>
				<arg name="target" optional="0" type="list" />
			</arglist>
			<digest>
				Add clients to the subscription list
			</digest>
			<description>
				The word <m>subscribe</m>, followed by one or more symbols, each corresponding to the path name or alias of an object, will add the specified object to the <o>pattrstorage</o> object's subscription list. See the <at>subscribemode</at> attribute for more information.
			</description>
		</method>
		<method name="unsubscribe">
			<arglist>
				<arg name="target" optional="0" type="list" />
			</arglist>
			<digest>
				Remove clients from the subscription list
			</digest>
			<description>
				The word <m>unsubscribe</m>, followed by one or more symbols, each corresponding to the path name or alias of an object, will remove the specified object from the <o>pattrstorage</o> object's subscription list. See the <at>subscribemode</at> attribute for more information.
			</description>
		</method>
		<method name="write">
			<arglist>
				<arg name="filename" optional="1" type="list" />
			</arglist>
			<digest>
				Write preset data to disk
			</digest>
			<description>
				The word <m>write</m>, followed by an optional symbol that specifies a filename, writes any preset data to a JSON file on disk. If the argument is given, and represents a valid file path, the file will be saved at that location - otherwise, a standard File Dialog will be presented for the user to manually choose a name and location for the file to be saved.
			</description>
		</method>
		<method name="writeagain">
			<arglist>
				<arg name="filename" optional="1" type="list" />
			</arglist>
			<digest>
				Rewrite preset data to disk
			</digest>
			<description>
				The word <m>writeagain</m> writes any preset data to a JSON file on disk previously specified by the <m>read</m> or <m>write</m> messages. If no file has been previously specified, a standard File Dialog will be presented for the user to manually choose a name and location for the file to be saved.
			</description>
		</method>
		<method name="writejson">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
			</arglist>
			<digest>
				Write presets as a JSON file
			</digest>
			<description>
				The word <m>writejson</m>, followed by an optional symbol that specifies a filename, writes any preset data to a file on disk, in JSON format. If the argument is given, and represents a valid file path, the file will be saved at that location--otherwise, a standard File Dialog will be presented for the user to manually choose a name and location for the file to be saved.
			</description>
		</method>
		<method name="writexml">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
			</arglist>
			<digest>
				Write presets as an XML file
			</digest>
			<description>
				The word <m>writexml</m>, followed by an optional symbol that specifies a filename, writes any preset data to a file on disk, in XML format. If the argument is given, and represents a valid file path, the file will be saved at that location--otherwise, a standard File Dialog will be presented for the user to manually choose a name and location for the file to be saved.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="activewritemode" get="1" set="1" type="int" size="1">
			<digest>
				Write mode of active property
			</digest>
			<description>
				Sets the write mode for the <at>active</at> property of client objects. The default is 0 (disabled). When enabled, the active state of client objects will be saved with the XML preset data file and restored when this file is re-read.
			</description>
		</attribute>
		<attribute name="autopattr_vis" get="1" set="1" type="int" size="1">
			<digest>
				Autopattr visibility
			</digest>
			<description>
				Sets the visibility of <o>autopattr</o> objects in the clientwindow and storagewindow displays. The default is 0 (disabled). Since <o>autopattr</o> objects are not used for forming path names, one can generally ignore them for the purposes of display. When performing <o>pattrstorage</o> object functions, such as setting the <m>active</m> state or <m>priority</m> for an entire set of objects being exposed by a single <o>autopattr</o> object, the user needs to know the name of the objects' actual container object. Enabling <m>autopattr_vis</m> may make this process somewhat clearer visually and conceptually.
			</description>
		</attribute>
		<attribute name="autorestore" get="1" set="1" type="int" size="1">
			<digest>
				Autorestore state
			</digest>
			<description>
				Enables or disables the <o>pattrstorage</o> object's autorestore state. The default is 1 (on). When enabled, the <o>pattrstorage</o> object will automatically try to locate and read an XML file representing preset data when the patcher loads. The <o>pattrstorage</o> object will attempt to load the last-saved file. If the <o>pattrstorage</o> object in question has never saved a file, the object will attempt to load a file with the name (name).xml, where (name) is the patcher name of the <o>pattrstorage</o> object (usually, its argument).
			</description>
		</attribute>
		<attribute name="autowatch" get="1" set="1" type="int" size="1">
			<digest>
				File-watch state
			</digest>
			<description>
				Sets the <o>pattrstorage</o> object's file watching behavior. The default is 0 (disabled). When file watching is enabled, the most recently read or written XML data file will be reloaded automatically if it is modified. This allows you to use an external editor for your XML data file. When you save the file, the <o>pattrstorage</o> object will notice. Note that when the file is re-read, any currently unsaved data will be lost.
			</description>
		</attribute>
		<attribute name="backupmode" get="1" set="1" type="int" size="1">
			<digest>
				Number of backup XML files
			</digest>
			<description>
				Sets the number of backup XML files to be maintained and rotated by the <o>pattrstorage</o> object when writing files. The default is 0 (disabled). The argument specifies the number of backups the <o>pattrstorage</o> object should make before the files start rotating (being automatically deleted to make room for new backups). The most recent backup is called pstoname.bak.xml. The next, pstoname_1.bak.xml, followed by pstoname_2.bak.xml, etc.
			</description>
		</attribute>
		<attribute name="changemode" get="1" set="1" type="int" size="1">
			<digest>
				Change mode behavior
			</digest>
			<description>
				Sets the <o>pattrstorage</o> object's data-filtration behavior. The default is 0 (disabled). When enabled, only changed values are sent from the <o>pattrstorage</o> object to client objects, and repeated data is filtered.
			</description>
		</attribute>
		<attribute name="client_rect" get="1" set="1" type="float" size="4">
			<digest>
				Client list window location and size
			</digest>
			<description>
				Sets a new size and position for the client list window. The window position is specified in global coordinates by 4 numbers (left, top, right, bottom).
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Windows" />
				<attribute name="default" get="1" set="1" type="float" size="4" value="50. 50. 400. 500." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Client Window Rectangle" />
				<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="rect" />
			</attributelist>
		</attribute>
		<attribute name="dirty" get="1" set="1" type="int" size="1">
			<digest>
				Patcher dirty flag
			</digest>
			<description>
				Enables or disables the patcher-dirty flag. The default is 0 (disabled). When enabled, the <o>pattrstorage</o> object will dirty the patch whenever its state changes.
			</description>
		</attribute>
		<attribute name="fileusagemode" get="1" set="1" type="int" size="1">
			<digest>
				File storage in collectives and standalones
			</digest>
			<description>
				Enables or disables the inclusion of JSON/XML storage files in collectives and standalones. The default is 0 (include storage file).
			</description>
		</attribute>
		<attribute name="flat" get="1" set="1" type="int" size="1">
			<digest>
				Client list display format
			</digest>
			<description>
				Enables or disables the <o>pattrstorage</o> object's client list display flag. The default is 0 (disabled). When enabled, the <o>pattrstorage</o> object's 2 windows will not display a hierarchical view of clients, instead display only data-containing objects (no patchers), and their full path name or alias.
			</description>
		</attribute>
		<attribute name="greedy" get="1" set="1" type="int" size="1">
			<digest>
				Child patcher access flag
			</digest>
			<description>
				Sets the <o>pattrstorage</o> object's client search behavior flag. The <m>greedy</m> attribute provides a way to limit the amount of data a single <o>pattrstorage</o> object will manage. The following values are possible:
				<br />
				<br />
				0 = disabled (the default). The <o>pattrstorage</o> object can see all <o>pattr</o> objects or objects bound to <o>autopattr</o> objects in any child patches of the <o>pattrstorage</o> object (or child patches of those child patches, tunneling down through the patcher hierarchy), until another <o>pattrstorage</o> object is found. Although the <o>pattrstorage</o> object found in a child patch will be a client of the parent <o>pattrstorage</o> object, no other objects at that level or below in the patcher hierarchy will be.
				<br />
				<br />
				1 = see everything. When the <m>greedy</m> attribute is set to 1, the <o>pattrstorage</o> object can see everything, all the way down to the bottom of the patcher hierarchy (including any <o>pattrstorage</o> objects it finds along the way).
				<br />
				<br />
				2 = clients only. When the <m>greedy</m> attribute is set to 2, the <o>pattrstorage</o> object can only see potential client objects in its patch. No other patches are searched.
			</description>
		</attribute>
		<attribute name="notifymode" get="1" set="1" type="int" size="1">
			<digest>
				Notification behavior
			</digest>
			<description>
				Sets the <o>pattrstorage</o> object's add/remove-notification behavior. The default is 0 (disabled). When enabled, the <o>pattrstorage</o> object will send a message from it's outlet every time an object is added or removed from its client list, in the form <m>[add/remove] [object pathname]</m>. Note that the <o>pattrstorage</o> object must occasionally purge and fully rebuild its client list in response to certain events, resulting in significant output when <m>notifymode</m> is enabled and objects are being added and removed regularly.
			</description>
		</attribute>
		<attribute name="outputmode" get="1" set="1" type="int" size="1">
			<digest>
				Auto-output behavior
			</digest>
			<description>
				Sets the <o>pattrstorage</o> object's auto-output behavior. The default is 0 (disabled). When enabled, the <o>pattrstorage</o> object will send a message from its outlet every time a value is sent to one of its client objects, in the form <m>[object pathname] [data ...]</m>. The following modes are available:
				<br />
				<br />
				0 = disabled
				<br />
				1 = output all values sent to client objects
				<br />
				2 = output only changed values sent to client objects (see <at>changemode</at>)				<br />
				3 = output all values sent to client objects not initiated by a message to the <o>pattrstorage</o> object
				<br />
				4 = output only changed values sent to client objects not initiated by a message to the <o>pattrstorage</o> object (see <at>changemode</at>)				<br />
				5 = output all values sent to client objects not initiated by a message to any <o>pattr</o>-system object (<o>pattr</o>, <o>pattrhub</o>, <o>pattrforward</o>, <o>pattrstorage</o>).
				<br />
				6 = output only changed values sent to client objects not initiated by a message to any <o>pattr</o>-system object (see <at>changemode</at>)
			</description>
		</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 type="vignette" module="core" name="live_parameters">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="5" />
				<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="savemode" get="1" set="1" type="int" size="1">
			<digest>
				Sets the <o>pattrstorage</o> object's save behavior.
			</digest>
			<description>
				Sets the <o>pattrstorage</o> object's save behavior. The default is 1 (prompt on object free). In this mode, if the <o>pattrstorage</o> object's preset data has changed (presets have been stored, deleted or modified since the last file <m>read</m> or <m>write</m> operation) at the time the object is freed, the object will prompt the user to write a preset file. In mode 2, <o>pattrstorage</o> will attempt to autosave a preset file (without user interaction), whenever the patcher is saved. In mode 0, pattrstorage will neither prompt nor autosave. In mode 3, <o>pattrstorage</o> will attempt to autosave a preset file (without user interaction), whenever the patcher is freed.
				<br />
				<br />
				The following values are possible:
				<br />
				<br />
				0 = Neither prompt nor autosave
				<br />
				1 = Prompt the user to save a preset file when the object is freed (default)
				<br />
				2 = Attempt to autosave whenever the patcher is saved, or if unsuccessful, prompt the user to save a preset file
				<br />
				3 = Attempt to autosave (without user interaction) when the patcher is freed. Failing that, prompt the user
			</description>
		</attribute>
		<attribute name="storage_rect" get="1" set="1" type="float" size="4">
			<digest>
				Stored data window size and location
			</digest>
			<description>
				Sets a new size and position for the stored data window. The window position is specified in global coordinates by 4 numbers (left, top, right, bottom).
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Windows" />
				<attribute name="default" get="1" set="1" type="float" size="4" value="600. 50. 400. 500." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Storage Window Rectangle" />
				<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="rect" />
			</attributelist>
		</attribute>
		<attribute name="subscribemode" get="1" set="1" type="int" size="1">
			<digest>
				Subscription mode
			</digest>
			<description>
				Sets the subscription mode. The default is 0 (disabled). When enabled, the <o>pattrstorage</o> object uses a user-specified subscription list to determine which objects are clients, rather than discovering and maintaining all objects within the patcher/patcher hierarchy (as determined by the <at>greedy</at> attribute. The <m>subscribe</m> and <m>unsubscribe</m> messages can be used to add and remove objects to and from this list, and the <m>getsubscriptionlist</m> message can be used to output a list of currently subscribed objects.
			</description>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="pattrstorage.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="autopattr" />
		<seealso name="pattrforward" />
		<seealso name="pattrhub" />
		<seealso name="pattrmarker" />
		<seealso module="max" name="pattrchapter02" type="tutorial">
			pattr Tutorial 2: Automatic Bindings and Storage
		</seealso>
	</seealsolist>
	<discussion>
		Through the <o>pattrstorage</o> object, you can get/set any <o>pattrstorage</o> or <o>autopattr</o> data (a la <o>pattrhub</o>, although you can talk to any object exposed to <o>pattr</o> or <o>autopattr</o>, not just those in the same patch). Data may be recalled as an interpolated value between 2 stored values.
	</discussion>
	<misc name="Output">
		<entry name="anything">
			<description>
				Multiple messages, corresponding to the various input messages above.
			</description>
		</entry>
	</misc>
</c74object>
