<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="_c74_vig.xsl" type="text/xsl"?>
<vignette name="Snapshots" package="Max" rankfactor="3"><h1>Snapshots</h1><p>
    	Snapshots allow you to save the state of your patcher, including the internal state of VST and Audio Units plug-ins and Max for Live (AMXD) devices. Snapshots use the <link module="core" name="parameter_enable" type="vignette">Parameter</link> system to determine what to save; you will need to set the <link anchor="parametermodeenable" module="core" name="parameter_enable" type="vignette">Parameter mode enable</link> for each UI object whose state you wish to save.
	</p><bluebox><h2>Displaying the Snapshots pane</h2><ul><li>To display the snapshots pane, click on the snapshots button located on the right patcher window toolbar.</li><p><img src="images/snapshots1.png"/></p></ul></bluebox><h2>Patcher Snapshots</h2><p>Patcher Snapshots contain the state of all parameters in a patcher hierarchy. They are saved and recalled at the top-level of a patcher hierarchy, but will save subpatcher parameters. If you would like to create an entity that has it's own Snapshots, you will need to make an amxd~ and host it in a patcher.</p><h2>View Patcher Snapshots</h2><li>To view the Snapshots for a patcher, open the snapshots pane and click the the P inside the diamond.</li><p><img src="images/snapshots2.png"/></p><h2>Snapshot Management</h2><p>At the bottom of the pane are a few icons that allow you to manage your snapshots. In order: </p><li>The restore button loads a selected snapshot.</li><p><img src="images/snapshots3.png"/></p><li>The take button writes the current state into a selected snapshot.</li><p><img src="images/snapshots4.png"/></p><li>The add button creates a new snapshot from the current state. Snapshots start at an index of 0.</li><p><img src="images/snapshots5.png"/></p><li>The rename button renames a snapshot (Note: You can also double-click on the name of a snapshot to rename it).</li><p><img src="images/snapshots6.png"/></p><li>The delete button deletes the current snapshot.</li><p><img src="images/snapshots7.png"/></p><p>
    	Each individual snapshot has some additional icons. The triangle icon allows you to recall and select a snapshot.
    	<p><img src="images/snapshots8.png"/></p>
    </p><p>
    	To select a snapshot without recalling it, click to the right of the snapshot name - the name of the snapshot will be highlighted, but the triangle icon is not lit. This technique is useful when deleting snapshots.
    	<p><img src="images/snapshots9.png"/></p>
    </p><p>
    	The triangle icon next to the snapshot name will turn orange when the current snapshot has changed but not been saved.
    	<p><img src="images/snapshots9a.png"/></p>
    </p><h2>Embedding Snapshots</h2><p>
    	The circle icon allows you to ‘embed’ the snapshot into the patcher. When you do this, your snapshot data is embedded within the patcher document itself - you don’t need to include any extra files.
    </p><p>
    	Snapshot files are always saved in the ~Documents/Max7/Snapshots folder, whether they are embedded or not.  For this reason, it is a good practice to name your patcher file prior to creating snapshots.
    </p><p>Snapshots placed anywhere in the Max search path will be locatable by Max.</p><bluebox><h2>Snapshots Contextual Menu</h2><li>
			Control-clicking (Macintosh) or right-clicking (Windows) on a snapshot displays a contextual menu of functions with the same functionality as the toolbar icons. In addition, the contextual menu lets you locate a snapshot file in the Finder using the Show in Finder option.
			<p><img src="images/snapshots10.png"/></p>
		</li></bluebox><h2>Effects Snapshots</h2><p>Effects snapshots store the parameter states of plug-ins or Max for Live devices hosted by the vst~ and amxd~ objects.</p><p>
		When you select a vst~ or amxd~ object in your patcher window, the snapshots pane will display any snapshots associated with they selected device.
	</p><p><img src="images/snapshots11.png"/></p><p>
		vst~ or amxd~ snapshots are not embedded - they are available as presets whenever the particular plug-in or Max for Live device is instantiated. This allows you to create and share presets for your favorite reverb plug-ins or Max for Live devices and share them with others.
	</p><p>
		Snapshot files are written to the ~Documents/Max7/Snapshots folder, and they can be read from anywhere in Max’s search path.
	</p><p>
		Embedded device snapshots are useful if you want patcher-file portability. For example, you can create a performance patch that relies on changing among five device presets, and have that data stored as a part of your patcher file.
	</p><p>
		The header/title bar for vst~ and amxd~ objects lets you create and recall new snapshots when the patcher window is locked. The camera icon creates snapshots, and the circular icon to the right will recall snapshots.
	</p><p><img src="images/snapshots12.png"/></p><p>You can still use patcher snapshots in a locked patcher using the snapshot pane.</p><p><img src="images/snapshots13.png"/></p><h2>Pattr Integration</h2><p>
		Snapshots can be easily integrated into your <link module="max" name="pattrchapter01" type="tutorial">pattr</link> workflow. Using a <o>pattrstorage</o> object along with <o>pattr</o> objects or an <o>autopattr</o> object, the internal state of your VST, AU or AMXD can be recalled.
		<br/>
		<br/>
		See the <openfilelink filename="pattr.maxhelp">pattr</openfilelink> and <openfilelink filename="autopattr.maxhelp">autopattr</openfilelink> help files for example usage (under the 'snapshots' tab).
	</p><h2>Messages</h2><p>All snapshot-enabled objects (amxd~, vst~ and thispatcher) understand the messages:
		<li>snapshot [userpath (optional)] [index (optional)] [name (optional)]</li>
		<li>restore [index (optional)]</li>
		<li>addsnapshot [userpath (optional)] [index (optional)] [name (optional)]</li>
		<li>deletesnapshot [index]</li>
		<li>setsnapshotname [index] [name]</li>
		<li>deletesnapshot [index]</li>
		<li>setembedsnapshot [index] [embedstate]</li>
		<li>movesnapshot [srcindex] [dstindex]</li>
		<li>exportsnapshot [srcindex] [userpath]</li>
		<li>importsnapshot [dstindex] [userpath]</li>
	</p><h2>Javascript Snapshot API</h2>
	For advanced users and those creating standalone patchers, Snapshots can be accessed via the Snapshots API. See the <link module="js" name="jssnapshot" type="vignette">Javascript Snapshot API</link> guide for more information.
</vignette>
