<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="_c74_vig.xsl" type="text/xsl"?>
<vignette name="Scripting" package="Max">
  <metadatalist>
    <metadata name="author">Cycling '74</metadata>
    <metadata name="tag">scripting</metadata>
    <metadata name="tag">javascript</metadata>
    <metadata name="tag">control</metadata>
    <metadata name="tag">patching</metadata>
  </metadatalist>
  <h1>Scripting Max Patches</h1>
  <p>
    Manually creating objects with a mouse and a keyboard in a patch is the main way that people work in Max, but it’s not the only way. Maybe you want to make a new object appear, move an object across the screen, make a new connection between objects, or change the audio driver settings on the fly. Through scripting, you can make these kinds of changes to a patch procedurally. For changing things about how Max, MSP, or Jitter work, you can send messages to Max. For changing things about the patcher or making new objects, use the thispatcher object or Javascript. Scripting opens up a whole extra dimension to Max, giving you greater control over the environment.
  </p>
    <cr/>
    <h2><o>Thispatcher</o> Example Patch</h2>
    <ul>
    <li><openfilelink filename="buttonflower.maxpat">buttonflower.maxpat</openfilelink> </li>
    </ul>

    <h2>Javascript Example Patches</h2>
    <ul>
    <li><openfilelink filename="globalvar-example.maxpat">globalvar-example.maxpat</openfilelink> </li>
    <li><openfilelink filename="maxobjlistener-example.maxpat">maxobjlistener-example.maxpat</openfilelink></li>
    <li><openfilelink filename="paraminfo-example.maxpat">paraminfo-example.maxpat</openfilelink></li>
    <li><openfilelink filename="paramlistener-example.maxpat">paramlistener-example.maxpat</openfilelink></li>
    <li><openfilelink filename="patchdescribe-example.maxpat">patchdescribe-example.maxpat</openfilelink> </li>
    <li><openfilelink filename="scriptnewdefault-example.maxpat">scriptnewdefault-example.maxpat</openfilelink> </li>
    <li><openfilelink filename="scriptoscript-example.maxpat">scriptoscript-example.maxpat</openfilelink> </li>
  </ul>
    <cr/>
  <seealsolist>
    <seealso name="messages_to_jitter" module="core" type="vignette" />
    <seealso name="messages_to_max" module="core" type="vignette" />
    <seealso name="messages_to_dsp" module="core" type="vignette" />
    <seealso name="javascriptinmax" module="js" type="vignette" />
    <seealso name="javascriptchapter01" module="max" type="tutorial" />
    <seealso name="thispatcher"/>
  </seealsolist>
</vignette>
