<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>
<c74object category="M4L" module="m4l" name="live.object">
  <digest> Perform operations on Live objects </digest>
  <description><o>live.object</o>
    is used to perform operations on Live objects that have been
    selected using the 
    <o>live.path</o>
     object. These operations include retrieving information on the current
    state of the Live API and setting values to control Live. 
    <br/>
    <br/>
	<i>Note: The Live API runs in the main thread in Live, and that all messages to and from the API are automatically deferred.</i>
  </description>
  <!--METADATA-->
  <metadatalist>
    <metadata name="author"> Cycling '74, Ableton </metadata>
    <metadata name="tag"> Live </metadata>
  </metadatalist>
  <inletlist/>
  <outletlist/>
  <!--INLETS-->
  <apiinletlist>
    <inlet id="0" name="Left inlet">
      <description>
         Gets all command messages described below. </description>
    </inlet>
    <inlet id="1" name="Right inlet">
      <description>       
        Gets object id message 
        <m>
           id 
          <i>nn</i>
        </m>
         to select the object to operate upon. 
        <br/>
        <m>id 0</m>
         means no object, i.e. all messages to the left inlet are ignored, which
        is also the initial state. 
      </description>
    </inlet>
  </apiinletlist>
  <!--OUTLETS-->
  <apioutletlist>
    <outlet id="0" name="Left outlet">
      <description>       
        Sends responses to 
        <m>get</m>
         , 
        <m>call</m>
         , 
        <m>bang</m>
         , 
        <m>getid</m>
         , 
        <m>getinfo</m>
         , 
        <m>gettype</m>
         and 
        <m>getpath</m>
         . 
      </description>
      <description>
         </description>
    </outlet>
  </apioutletlist>
  <!--ARGUMENTS-->
  <objarglist> 
  </objarglist>
  <!--MESSAGES-->
  <methodlist>
    <method name="get">
      <arglist>
        <arg name="property" optional="0" type="symbol"/>
      </arglist>
      <digest>
        Output the value of a property of the current object 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>property</i></m>
         the name of a single-value property of the current object 
        <br/>
        <br/>
         Operation: 
        <br/>
         Sends value of given property of the current object. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m><i>property</i><i>value</i></m></td><td><m>name base solo 3</m></td></tr></table>
     
      </description>
    </method>
    <method name="get">
      <arglist>
        <arg name="list-property" optional="0" type="symbol"/>
      </arglist>
      <digest>
        Send the list of values of given property of the current object
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>list-property</i></m>
         the name of a list property of the current object 
        <br/>
        <br/>
         Operation: 
        <br/>
         Sends the list of values of given property of the current object. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m><i>list-property</i><i>list of values</i></m></td><td><m>input_routings Ext. In Max Resampling 1-Audio A-Return Master No Input</m></td></tr></table>
     
      </description>
    </method>
    <method name="get">
      <arglist>
        <arg name="child" optional="0" type="symbol"/>
      </arglist>
      <digest>
        Send the id of the child of the current object 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>child</i></m>
         the name of a child of the current object 
        <br/>
        <br/>
         Operation: 
        <br/>
         Sends the id of the child of the current object. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m><i>child</i>
                 id 
                <i>nn</i>
              </m></td><td><m>master_track id 10</m></td></tr></table>
     
      </description>
    </method>
    <method name="get">
      <arglist>
        <arg name="list-child" optional="0" type="symbol"/>
      </arglist>
      <digest>
        Send the ids of the elements of the list-child of the current object 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>list-child</i></m>
         the name of a list-child of the current object 
        <br/>
        <br/>
         Operation: 
        <br/>
         Sends the ids of the elements of the list-child of the current object. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m><i>list-child</i>
                 id 
                <i>nn</i>
                 ... id 
                <i>mm</i>
              </m></td><td><m>clip_slots id 4 id 5</m></td></tr></table>
     
      </description>
    </method>
    <method name="set">
      <arglist>
        <arg name="property" optional="0" type="symbol"/>
        <arg name="value" optional="0" type="various types"/>
      </arglist>
      <digest>
        Set the value of given property of the current object 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>property</i></m>
         the name of a single-value property of the current object 
        <br/>
        <m><i>value</i></m>
         the new value for the property 
        <br/>
        <br/>
         Operation: 
        <br/>
        Set the value of given property of the current object. 
        <br/>
        <br/>
         Remark: 
        <br/>
         Not all properties can be set. The types of the properties are given in
        the Live Object Model. 
        <br/>
        <br/>
         - no output - 
     
      </description>
    </method>
    <method name="set">
      <arglist>
        <arg name="list-property" optional="0" type="symbol"/>
        <arg name="value-list" optional="0" type="various types"/>
      </arglist>
      <digest>
        Set the given list property to the value list 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>list-property</i></m>
         the name of a list property of the current object 
        <br/>
        <m><i>value-list</i></m>
         the new values for the property 
        <br/>
        <br/>
         Operation: 
        <br/>
        Set the given list property to the value list. 
        <br/>
        <br/>
         Remark: 
        <br/>
         Not all properties can be set. The types of the properties are given in
        the Live Object Model. 
        <br/>
        <br/>
         - no output - 
     
      </description>
    </method>
    <method name="set">
      <arglist>
        <arg name="child" optional="0" type="symbol"/>
        <arg name="id nn" optional="0" type="id"/>
      </arglist>
      <digest>
        Set the child name to point to the given child 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>child</i></m>
         the name of a child of the current object 
        <br/>
        <m>
           id 
          <i>nn</i>
        </m>
         the new child object for this name 
        <br/>
        <br/>
         Operation: 
        <br/>
        Set the child name to point to the given child. 
        <br/>
        <br/>
         Remark: 
        <br/>
         Not all children can be set. 
        <br/>
        <br/>
         - no output - 
     
      </description>
    </method>
    <method name="set">
      <arglist>
        <arg name="list-child" optional="0" type="symbol"/>
        <arg name="id nn ... id mm" optional="0" type="id-list"/>
      </arglist>
      <digest>
          Set the list child to contain the given ids
      </digest>
      <description>       
        Arguments: 
        <br/>
        <m><i>list-child</i></m>
         the name of a list child of the current object 
        <br/>
        <m>
           id 
          <i>nn</i>
           ... id 
          <i>mm</i>
        </m>
         the new list of objects for the given name 
        <br/>
        <br/>
         Operation: 
        <br/>
        Set the list child to contain the given ids. 
        <br/>
        <br/>
         Remark: 
        <br/>
         Not all children can be set. 
        <br/>
        <br/>
         - no output - 
     
      </description>
    </method>
    <method name="call">
      <arglist>
        <arg name="function" optional="0" type="symbol"/>
        <arg name="parameter-list" optional="1" type="list of different types"/>
      </arglist>
      <digest>
        Call the given function of the current object (optional parameter list) 
      </digest>
      <description>       
        Arguments: 
        <br/>
        <i>function</i>
         the name of the function 
        <br/>
        <m><i>parameter-list</i></m>
         an optional list of parameters 
        <br/>
        <br/>
         Operation: 
        <br/>
         Calls the given function of the current object, optionally with a list
        of parameters. 
        <br/>
        <br/>
         Remark: 
        <br/>
         The types of the parameters are given in the Live Object Model. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><i>function</i><i>value</i></td><td>get_beats_loop_length 004.00.00.000</td></tr></table>
     
      </description>
    </method>
    <method name="bang, getid">
      <digest>
        Sends the id of the current Live object to the outlet 
      </digest>
      <description>       
        Operation: 
        <br/>
         Sends the id of the current Live object to the outlet. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m>
                 id 
                <i>nn</i>
              </m></td><td><m>id 5</m></td></tr></table>
     
      </description>
    </method>
    <method name="getinfo">
      <digest>
        Send a description of the current object 
      </digest>
      <description>       
        Operation: 
        <br/>
         Sends a description of the current object. 
        <br/>
        <br/>
         Output to left outlet (most lines may occur multiple times, last line
        is 
        <m>info done</m>
         ): 
        <br/>
        <m><br/>
           info id 
          <i>nn</i>
          <br/>
           info type 
          <i>object-type</i>
          <br/>
           info description 
          <i>description</i>
          <br/>
           info children 
          <i>list-child</i>
          <i>object-type</i>
          <br/>
           info child 
          <i>child</i>
          <i>object-type</i>
          <br/>
           info property 
          <i>property</i>
          <i>property-type</i>
          <br/>
           info function 
          <i>function</i>
          <br/>
           info done 
          <br/>
        </m>
        <br/>
         Example output: 
        <br/>
        <m><br/>
           info id 3 
          <br/>
           info type Scene 
          <br/>
           info description This class represents a series of ClipSlots in Lives
          session view matrix 
          <br/>
           info children clip_slots ClipSlot 
          <br/>
           info child canonical_parent Song 
          <br/>
           info property is_triggered bool 
          <br/>
           info property name symbol 
          <br/>
           info property tempo float 
          <br/>
           info function fire 
          <br/>
           info function fire_as_selected 
          <br/>
           info function set_fire_button_state 
          <br/>
           info done 
        </m>
     
      </description>
    </method>
    <method name="gettype">
      <digest>
        Send the type (class) 
      </digest>
      <description>       
        Operation: 
        <br/>
         Sends the type (a.k.a. class) of the current object. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m>
                 type 
                <i>object-type</i>
              </m></td><td><m>type Song</m></td></tr></table>
     
      </description>
    </method>
    <method name="getpath">
      <digest>
        Send the canonical path of current object 
      </digest>
      <description>       
        Operation: 
        <br/>
         Sends the canonical path of current object. 
        <br/>
        <br/>
        <table><tr><th>Outlet</th><th>Output</th><th>Example</th></tr><tr><td>left</td><td><m>
                 path 
                <i>path</i>
              </m></td><td><m>path live_set return_tracks 0</m></td></tr></table>
     
      </description>
    </method>
    <method name="id nn">
      <digest>
        Set the current object 
      </digest>
      <description>       
        Operation: 
        <br/>
         Sets the current object. The message has the same effect if sent to
        both the right or the left inlet. For clarity it is suggested to always
        use the right inlet to supply the object id. 
        <br/>
        <br/>
         - no output - 
     
      </description>
    </method>
  </methodlist>
  <attributelist/>
  <!--ATTRIBUTES-->
  <misc name="Inspector">
    <entry name="Persistence">
      <description>       
        The 
        <o>live.object</o>
         object has a special entry in its inspector labelled "Use Persistent
        Mapping". This setting, when enabled, causes the 
        <m>id</m>
         associated with the object to persist when the Live document is saved
        and restored, and when the Max Device is moved between the Live
        application and the Max editor, or within the Live Set. Beginning in
        Live 8.2.2, Live API ids remain persistent between launches of Live,
        which in conjunction with the 
        <m>Persistence</m>
         feature of 
        <o>live.object</o>
         , 
        <o>live.observer</o>
         and 
        <o>live.remote~</o>
         , makes it possible to create simpler devices which retain their
        association with elements in the Live user interface. 
      </description>
    </entry>
  </misc>
  <!--EXAMPLE-->
  <examplelist>
    <example img='live.object.png' />
  </examplelist>
  <!--SEEALSO-->
  <seealsolist>
    <seealso name='live_api_overview' module='core' type='vignette' display='Live API Overview'/>
    <seealso name='live_object_model' module='core' type='vignette' display='Live Object Model'/>
    <seealso name="live.path"/>
    <seealso name="live.observer"/>
    <seealso name="live.remote~"/>
    <seealso display="Using the Live API" module="core" name="live_api" type="vignette"/>
    <seealso display="The LiveAPI JavaScript Object (jsliveapi)" module="js" name="jsliveapi" type="vignette"/>
  </seealsolist>
</c74object>
