<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>
<c74object category="M4L" module="m4l" name="live.remote~">
  <digest> Realtime control of device parameters </digest>
  <description>
   The
  <o>live.remote~</o>
   object allows to remotely control Lives DeviceParameter objects in realtime.
  </description>
  <discussion>
  The DeviceParameter object is selected using
  <o>live.path</o>
   and its id is put into the right inlet of
  <o>live.remote~</o>
   . An example path of a DeviceParameter is
  <m>live_set master_track mixer_device volume</m>
   .
  <br/>
  <br/>
   Integer or float values are send into left inlet of
  <o>live.remote~</o>
   , as messages or as an audio signal. The values are applied sample-precise
  (if sent by the audio thread of Max) with a constant latency of a single
  audio buffer.
  <br/>
  <br/>
   A device parameter is disabled in Live while it is controlled by a
  <o>live.remote~</o>
   , just as if it controlled by a Macro parameter (but without the green
  dot). This means that the automation of the parameter is disabled and the
  value in the Live set is not changed, no undo steps are created. The
  envelopes are active, though. To stop controlling a device parameter and to
  reenable it, send
  <m>id 0</m>
   to the right inlet of
  <o>live.remote~</o>
   .
  </discussion>
  <!--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">
      <digest>
    value (signal/float)
    </digest>
      <description>
    Gets the value of the device parameter object selected by the right
    inlet. For valid ranges look at the min and max properties of the
    DeviceParameter. The value curve is linear to the parameter's GUI
    control in Live.
    </description>
    </inlet>
    <inlet id="1" name="Right inlet">
      <digest>
        <m>
       id
      <i>nn</i>
    </m>
      </digest>
      <description>
    Gets object id message
    <m>
       id
      <i>nn</i>
    </m>
     to select the DeviceParameter object to control.
    <br/>
    <m>id 0</m>
     means no object, i.e. the remote stops controlling the DeviceParameter.
    This is also the initial state.
    </description>
    </inlet>
  </apiinletlist>
  <!--OUTLETS-->
  <!--ARGUMENTS-->
  <objarglist> </objarglist>
  <!--MESSAGES-->
  <methodlist>
    <method name="float">
      <arglist>
        <arg name="value" optional="0" type="float"/>
      </arglist>
      <digest>
    Send a value to the selected Live Device Parameter
    </digest>
      <description>
    A floating point number value received in the left inlet will be
    applied to the selected Live DeviceParameter, if any. Obviously not in
    realtime.

    </description>
    </method>
    <method name="int">
      <arglist>
        <arg name="value" optional="0" type="int"/>
      </arglist>
      <digest>
    Send a value to the selected Live Device Parameter
    </digest>
      <description>
    An integer number value received in the left inlet will be applied to
    the selected Live DeviceParameter, if any. Not in realtime, though.

    </description>
    </method>

		<method name="list">
			<arglist>
        <arg name='target-value' optional='0' type='float'/>
        <arg name='delta-time' optional='0' units='ms' type='number'/>
			</arglist>
			<digest>
				Start a ramp
			</digest>
			<description>
				Start a ramp with a list of two floats, similar to the <o>line~</o> object. Sending in “1 500” means that the value 1. will be reached in 500 ms, starting at the current value. New ramps will always override the current ramp, so if you want to cut short a ramp, send another value.
			</description>
		</method>

    <method name="signal">
      <digest>
    Send signal values to the selected Live Device Parameter
    </digest>
      <description>
    Signal input values received in the left inlet will be applied to the
    selected Live DeviceParameter, if any, in realtime.

    </description>
    </method>
    <method name="id nn">
      <digest>
    Set the current object
    </digest>
      <description>
    In right inlet: Sets the current object. The message has
    no effect if the id is no a DeviceParameter.

    </description>
    </method>
  </methodlist>
  <!--ATTRIBUTES-->
  <attributelist>
		<attribute name="smoothing" get="1" set="1" type="float" size="1">
			<digest>
				Smoothing (ms)
			</digest>
			<description>
				Set the ramp time that is used for each incoming event. This also performs an automatic downsampling of any signal you send in. For example, a smoothing value of 1 ms will downsample the signal to 1 ms and send ramp events which output a linear approximation of the initial signal. This attribute defaults to 1 ms.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Smoothing (ms)" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
	</attributelist>
  <!--MISC-->
  <misc name="Inspector">
    <entry name="Persistence">
      <description>
    The
    <o>live.remote~</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.remote~.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.object"/>
    <seealso name="live.observer"/>
    <seealso name="live.path"/>
    <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>
