<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="chapter.rml">
  <title>Rivendell Macro Langauge</title>
  <sect1 xml:id="sect.rml.overview">
    <title>Overview</title>
    <para>
      Rivendell Macro Language (or RML for short) is a set of commands
      implemented within Rivendell that can be used to program the system
      to take various actions.  A wide variety of commands exist, ranging
      from control of outboard gear (such as switchers and GPIO devices)
      to control of various aspects of log playout in RDAirPlay, to
      Rivendell user management.
    </para>
  </sect1>
<sect1 xml:id="sect.rml.protocol">
  <title>Protocol</title>
  <para>
    The Normal form of a command takes the following syntax:
  </para>
  <para>
    <replaceable>cmd</replaceable> [<replaceable>arg</replaceable>] [<replaceable>...</replaceable>]!
  </para>
  <variablelist>
    <varlistentry>
      <term>
	<replaceable>cmd</replaceable>
      </term>
      <listitem>
	<para>
	  A command mneumonic consisting of  two alpha-numeric characters
	  indicating the action to be performed.
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>
	<replaceable>arg</replaceable>
      </term>
      <listitem>
	<para>
	  Zero or more arguments, delimited by spaces or, if the last
	  argument, by ! (see below)
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>
	!
      </term>
      <listitem>
	<para>
	  The ASCII character  33, indicating the end of the command sequence.
	</para>
      </listitem>
    </varlistentry>
  </variablelist>
</sect1>

<sect1 xml:id="sect.rml.command_delivery">
  <title>Command Delivery</title>
  <para>
    To be executed by a Rivendell system, an appropriate command should be
    delivered to UDP ports 5858 or 5859 on said system, using the SOCK_DGRAM
    connectionless protocol.  Commands delivered to port 5858 may receive a
    reply back to the originating IP address at UDP socket 5860 to indicated
    command success/failure, while commands delivered to 5859 will be
    processed, but no reply made.
  </para>
</sect1>

<sect1 xml:id="sect.rml.command_reply">
  <title>Command Reply</title>
  <para>
    If delivered to UDP port 5858, each command may receive a reply, 
    formulated as follows:
  </para>
  <para>
    <replaceable>rpy</replaceable> <computeroutput>+</computeroutput>|<computeroutput>-</computeroutput>
  </para>
  <variablelist>
    <varlistentry>
      <term>
	<replaceable>rpy</replaceable>
      </term>
      <listitem>
	<para>
	  The full command string (including arguments) originally received
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>
	<computeroutput>+</computeroutput>
      </term>
      <listitem>
	<para>
	  ACK response, indicates success of the command.
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>
	<computeroutput>-</computeroutput>
      </term>
      <listitem>
	<para>
	  NAK response, indicates failure of the command.
	</para>
      </listitem>
    </varlistentry>
  </variablelist>
</sect1>

<sect1 xml:id="sect.rml.specifying_color">
  <title>Specifying Color</title>
  <para>
    In places where a color can be specified as a macro argument, the
    following predefined values are valid:
  </para>
  <simplelist>
    <member><userinput>white</userinput></member>
    <member><userinput>red</userinput></member>
    <member><userinput>green</userinput></member>
    <member><userinput>blue</userinput></member>
    <member><userinput>cyan</userinput></member>
    <member><userinput>magenta</userinput></member>
    <member><userinput>yellow</userinput></member>
    <member><userinput>gray</userinput></member>
    <member><userinput>lightGray</userinput></member>
    <member><userinput>black</userinput></member>
    <member><userinput>darkRed</userinput></member>
    <member><userinput>darkGreen</userinput></member>
    <member><userinput>darkBlue</userinput></member>
    <member><userinput>darkCyan</userinput></member>
    <member><userinput>darkMagenta</userinput></member>
    <member><userinput>darkYellow</userinput></member>
    <member><userinput>darkGray</userinput></member>
  </simplelist>
</sect1>

<sect1 xml:id="sect.rml.binary_data">
  <title>Binary Data</title>
  <para>
    Certain commands (e.g. <command>SO</command> and <command>UO</command>)
    have the ability to transmit arbitrary binary data in addition to textual
    characters.  Such arbitrary binary data can be specified by means of
    escape codes as follows:
  </para>
  <para>
    <userinput>%</userinput><replaceable>hexcode</replaceable>
  </para>
  <para>
    <variablelist>
      <varlistentry>
	<term>
	  <replaceable>hexcode</replaceable>
	</term>
	<listitem>
	  Two digit numeric value of the byte to send in hexidecimal.
	</listitem>
      </varlistentry>
    </variablelist>
  </para>
  <para>
    For example, the sequence 'TEST' followed by a carriage return/newline
    could be specified as:
  </para>
  <para>
    <userinput>TEST%0D%0A</userinput>
  </para>
</sect1>

<sect1 xml:id="sect.rml.jack_port_names">
  <title>JACK Port Names</title>
  <para>
    Some commands (e.g. the Connect Jack Ports [JC] RML) require JACK port
    name arguments. Such port names have the following form:
  </para>
  <para>
    <replaceable>jack-client-name</replaceable>:<replaceable>jack-endpoint-name</replaceable>
  </para>
  <para>
    For example, to connect the first Rivendell audio output to the first
    available system playback ports, the following RML could be used:
  </para>
  <literallayout>
    <userinput>JC system:playback_1 rivendell_0:playout_0L!</userinput>
    <userinput>JC system:playback_2 rivendell_0:playout_0R!</userinput>
  </literallayout>
  <para>
    In this example, <userinput>system</userinput> and
    <userinput>rivendell_0</userinput> are
    <replaceable>jack-client-name</replaceable>s, while
    <userinput>playback_1</userinput>, <userinput>playback_2</userinput>,
    <userinput>playout_0L</userinput> and <userinput>playout_0R</userinput>
    are <replaceable>jack-endpoint-name</replaceable>s.
  </para>
  <note>
    Note that <emphasis>two</emphasis> RML commands are required
    for this specific example. This is because JACK has no notion of
    stereo pairs, hence the &quot;left&quot; and &quot;right&quot; Rivendell
    playout ports have to be independently connected to the specific system
    playback ports.
  </note>
</sect1>

<sect1 xml:id="sect.rml.log_machines">
  <title>Log Machines</title>
  <para>
    Some commands (e.g., <command>MD</command>, <command>PL</command>,
    and <command>PS</command>) require a <replaceable>log
    machine</replaceable> argument. See
    <xref linkend="sect.rdairplay.log_machines">Log Machines</xref> in
    <xref linkend="chapter.rdairplay">RDAirPlay</xref> for a detailed
    description of Log Machines.
  </para>
  <para>
    The <replaceable>log machine</replaceable> argument in the context
    of Rivendell macros must be an integer falling within one of the
    following values:
    <variablelist>
      <varlistentry>
	<term><userinput>0</userinput></term>
	<listitem>
	  <para>
	    <emphasis>All</emphasis> non-virtual log machines --i.e. the
	    <computeroutput>Main Log</computeroutput>,
	    <computeroutput>Aux 1 Log</computeroutput> and
	    <computeroutput>Aux 2 Log</computeroutput> log machines.
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>1</userinput></term>
	<listitem>
	  <para>
	    <computeroutput>Main Log</computeroutput>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>2</userinput></term>
	<listitem>
	  <para>
	    <computeroutput>Aux 1 Log</computeroutput>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>3</userinput></term>
	<listitem>
	  <para>
	    <computeroutput>Aux 2 Log</computeroutput>
	  </para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>
	  <userinput>101</userinput> through <userinput>120</userinput>
	</term>
	<listitem>
	  <para>
	    <computeroutput>Virtual Log 101</computeroutput> through
	    <computeroutput>Virtual Log 120</computeroutput>
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </para>
  <para>
    For example, the macro <userinput>PL 1 0!</userinput> starts
    playing at the first line (<replaceable>0</replaceable>) of the
    <replaceable>Main Log</replaceable> (log machine
    <replaceable>1</replaceable>).
  </para>
</sect1>

<sect1 xml:id="sect.rml.commands">
  <title>Commands</title>
  <sect2 xml:id="sect.rml.air_gate__ag_">
    <title>Air Gate [AG]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>AG</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Process an RML only if the On-Air flag is ON.
    </para>
    <para>
      <userinput>AG</userinput>
      <replaceable>rml</replaceable>!
    </para>
    <para>
      Execute RML <replaceable>rml</replaceable> only if the On-Air flag on
      the local machine is ON.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.append_log__al_">
    <title>Append Log [AL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem>
	    <command>rdairplay</command><manvolnum>1</manvolnum>,
	    <command>rdairplayd</command><manvolnum>8</manvolnum>
	  </listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>AL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Append a log to a cuurently loaded log.
    </para>
    <para>
      <userinput>AL
      <replaceable>mach</replaceable>
      <replaceable>logname</replaceable>!</userinput>
    </para>
    <para>
      Append the log named <replaceable>logname</replaceable> to the log
      currently loaded in log machine <replaceable>mach</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.binary_serial_out__bo_">
    <title>Binary Serial Out [BO]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>BO</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Output a string of binary codes.
    </para>
    <para>
      <userinput>BO
      <replaceable>portnum</replaceable>
      <replaceable>hexcode</replaceable>
      <replaceable>..</replaceable>!</userinput>
    </para>
    <para>
      Output a string of binary codes represented by
      <replaceable>hexcode</replaceable> <replaceable>..</replaceable> on
      serial port <replaceable>portnum</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.clear_serial_trap__sc_">
    <title>Clear Serial Trap [SC]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SC</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Clear a serial trap.
    </para>
    <para>
      <userinput>SC
      <replaceable>portnum</replaceable>
      <replaceable>cart</replaceable>
      <replaceable>string</replaceable>!</userinput>
    </para>
    <para>
      <userinput>SC
      <replaceable>portnum</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      <userinput>SC
      <replaceable>portnum</replaceable>!</userinput>
    </para>
    <para>
      Clear a serial trap.  The three argument form will clear all traps on
      <replaceable>port</replaceable> that reference
      <replaceable>cart</replaceable> and <replaceable>string</replaceable>.
      The two argument form will clear all traps on
      <replaceable>port</replaceable> that reference
      <replaceable>cart</replaceable>, while the one argument form will
      clear all traps on <replaceable>port</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.command_send__cc_">
    <title>Command Send [CC]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>CC</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Send RML to a remote host.
    </para>
    <para>
      <userinput>CC
      <replaceable>dest</replaceable>[<userinput>:</userinput><replaceable>udpport</replaceable>]
      <replaceable>rml</replaceable>!</userinput>
    </para>
    <para>
      Execute the RML command <replaceable>rml</replaceable> on host
      <replaceable>dest</replaceable>, where <replaceable>dest</replaceable>
      may be either a Rivendell host name or an IP address. A UDP port value
      may be optionally specified as <replaceable>udpport</replaceable>
      (default value 5859).
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.connect_jack_ports__jc_">
    <title>Connect Jack Ports [JC]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>JC</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Connect a JACK input port to an output port.
    </para>
    <para>
      <userinput>JC
      <replaceable>output</replaceable>
      <replaceable>input</replaceable>!</userinput>
    </para>
    <para>
      Attempt to connect JACK input port <replaceable>input</replaceable>
      to <replaceable>output</replaceable>. See 
      <xref linkend="sect.rml.jack_port_names" /> for an example.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.console_label__cl_">
    <title>Console Label [CL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>CL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the label on a control surface.
    </para>
    <para>
      <userinput>CL
      <replaceable>matrix</replaceable>
      <replaceable>surface</replaceable>
      <replaceable>chan</replaceable>
      <replaceable>label</replaceable>!</userinput>
    </para>
    <para>
      On matrix <replaceable>matrix</replaceable>, set the input
      <replaceable>chan</replaceable> module label of control surface
      <replaceable>surface</replaceable> to <replaceable>label</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.copy_cut__cp_">
    <title>Copy Cut [CP]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcatchd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>CP</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Copy cut audio and metadata.
    </para>
    <para>
      <userinput>CP
      <replaceable>srccart</replaceable>
      <replaceable>srccut</replaceable>
      <replaceable>dstcart</replaceable>
      <replaceable>dstcut</replaceable>!</userinput>
    </para>
    <para>
      Copy the audio and metadata from cut number
      <replaceable>srccut</replaceable> in cart
      <replaceable>srccart</replaceable> to cut number
      <replaceable>dstcut</replaceable> in cart
      <replaceable>dstcart</replaceable>.  The destination cart/cut must
      already exist.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.cut_event__ce_">
    <title>Cut Event [CE]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcatchd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>CE</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Place a cut event at the current location of an active RDCatch recording.
    </para>
    <para>
      <userinput>CE
      <replaceable>decknum</replaceable>
      <replaceable>eventnum</replaceable>!</userinput>
    </para>
    <para>
      Place a cut event with event number 
      <replaceable>eventnum</replaceable> at the current position of the
      active recording in RDCatch Deck 
      <replaceable>decknum</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.disconnect_jack_ports__jd_">
    <title>Disconnect Jack Ports [JD]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>JD</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Disconnect a JACK input port from an output port.
    </para>
    <para>
      <userinput>JD
      <replaceable>output</replaceable>
      <replaceable>input</replaceable>!</userinput>
    </para>
    <para>
      Attempt to disconnect JACK input port <replaceable>input</replaceable>
      from <replaceable>output</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.disconnect_all_jack_ports__jz_">
    <title>Disconnect All Jack Ports [JZ]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>JZ</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Disconnect all JACK audio port connections.
    </para>
    <para>
      <userinput>JZ!</userinput>
    </para>
    <para>
      Attempt to disconnect all JACK port connections.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.duck_panel_button__pd_">
    <title>Duck Panel Button [PD]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PD</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the duck level of a SoundPanel button in RDAirPlay.
    </para>
    <para>
      <userinput>PD
      <replaceable>panel</replaceable>
      <replaceable>col</replaceable>
      <replaceable>row</replaceable>
      <replaceable>level</replaceable>
      <replaceable>fade</replaceable>
      [<replaceable>mport</replaceable>]!</userinput>
    </para>
    <para>
      Set the duck level of button at <replaceable>column</replaceable>,
      <replaceable>row</replaceable> of panel
      <replaceable>panel</replaceable>.
      Panel: <userinput>S1</userinput>...<userinput>S50</userinput> or
      <userinput>U1</userinput>...<userinput>U50</userinput>;
      <userinput>C</userinput> for <replaceable>panel</replaceable> means
      currently selected panel.
      If <replaceable>col</replaceable> and/or <replaceable>row</replaceable>
      is <userinput>0</userinput>: duck all buttons in
      <replaceable>col</replaceable> or <replaceable>row</replaceable>. 
      If playing, the audio fades to <replaceable>level</replaceable>
      (in dbFS) in <replaceable>fade</replaceable> msecs. 
      If specified, only stop carts playing on panel port
      <replaceable>mport</replaceable>. The duck level will be set to 0 after
      the playback is finished, or the button is stopped or reset.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.execute_breakaway__dx_">
    <title>Execute Breakaway [DX]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcartslots</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>DX</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Execute a breakaway.
    </para>
    <para>
      <userinput>DX
      <replaceable>slot</replaceable><replaceable>len</replaceable>!</userinput>
    </para>
    <para>
      Execute a breakaway of length <replaceable>len</replaceable> (in mS)
      using the autofill carts configured for the service currently loaded
      in the <replaceable>slot</replaceable> slot.  The slot must be in
      Breakaway mode.  If a breakaway is currently executing, it will 
      immediately be aborted and a new one started.  Passing a '0' for
      <replaceable>len</replaceable> will cause any currently executing
      breakaway to be aborted immediately and input audio restored.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.execute_cart__ex_">
    <title>Execute Cart [EX]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcatchd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>EX</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Execute a macro cart.
    </para>
    <para>
      <userinput>EX
      <replaceable>cartnum</replaceable>!</userinput>
    </para>
    <para>
      Execute macro cart <replaceable>cartnum</replaceable> on the local host.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.fire_salvo__fs_">
    <title>Fire Salvo [FS]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>FS</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Execute a switcher salvo.
    </para>
    <para>
      <userinput>FS
      <replaceable>matrix</replaceable>
      <replaceable>salvo</replaceable>!</userinput>
    </para>
    <para>
      Fire salvo number <replaceable>salvo</replaceable> on matrix
      <replaceable>matrix</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.gpi_enable__ge_">
    <title>GPI Enable [GE]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>GE</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Enable/disable a GPI line.
    </para>
    <para>
      <userinput>GE
      <replaceable>matrix</replaceable>
      <replaceable>type</replaceable>
      <replaceable>gpinum-spec</replaceable>
      <replaceable>state</replaceable>!</userinput>
    </para>
    <para>
      Enable or disable the GPI line(s) of type <replaceable>type</replaceable>
      indicated by <replaceable>gpinum</replaceable> on matrix
      <replaceable>matrix</replaceable>.  Possible types are:
    </para>
    <para>
      <variablelist>
	<varlistentry>
	  <term><userinput>I</userinput></term>
	  <listitem>Input</listitem>
	</varlistentry>
	<varlistentry>
	  <term><userinput>O</userinput></term>
	  <listitem>Output</listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      The <replaceable>gpinum-spec</replaceable> can be an integer value
      to indicate a single GPI line or a range specification to indicate
      multiple lines. A range specification has the following format:
    </para>
    <para>
      [<replaceable>first-value</replaceable>]:[<replaceable>last-value</replaceable>]
    </para>
    <para>
      All values in a range specification are inclusive. Some examples:
    </para>
    <para>
      <table xml:id="sect.rml.gpi_enable__ge_.range_examples" frame="all" pgwide="0">
	<title>Range Specification Examples</title>	
	<tgroup cols="2" align="left" colsep="1" rowsep="1">
	  <colspec colname="Specification" colwidth="1.0*"/>
	  <colspec colname="Meaning" colwidth="10.0*"/>
	  <tbody>
	    <row>
	      <entry align="center">
		1:10
	      </entry>
	      <entry>
		Lines 1 through 10, inclusive
	      </entry>
	    </row>
	    <row>
	      <entry align="center">
		5:10
	      </entry>
	      <entry>
		Lines 5 through 10, inclusive
	      </entry>
	    </row>
	    <row>
	      <entry align="center">
		7:7
	      </entry>
	      <entry>
		Line 7
	      </entry>
	    </row>
	    <row>
	      <entry align="center">
		:10
	      </entry>
	      <entry>
		Lines 1 through 10, inclusive
	      </entry>
	    </row>
	    <row>
	      <entry align="center">
		1:
	      </entry>
	      <entry>
		Lines 1 onward, inclusive
	      </entry>
	    </row>
	    <row>
	      <entry align="center">
		:
	      </entry>
	      <entry>
		All lines in the specified matrix
	      </entry>
	    </row>
	  </tbody>
	</tgroup>
      </table>
    </para>
    <note>
      <title>Note for Python programmers</title>
      Python programmers in the audience may be noticing similarities between
      range specifications and
      <link xlink:href="https://stackoverflow.com/questions/509211/understanding-slicing">Python slices</link>.
      The concepts are similar, but there are differences! Specifically:
      <itemizedlist>
	<listitem>
	  All values in range specifications are <emphasis>inclusive</emphasis>,
      whereas the <replaceable>stop</replaceable> parameter in a slice is
      <code>last_value+1</code>.
	</listitem>
	<listitem>
	  There is no <replaceable>step</replaceable> parameter.
	</listitem>
	<listitem>
	  All parameter values must be positive integers --i.e. zero- and
	  negative-valued parameters are not supported.
	</listitem>
      </itemizedlist>
    </note>
  </sect2>

  <sect2 xml:id="sect.rml.gpi_enable__ge___old_format__deprecated_">
    <title>GPI Enable [GE] (old format, deprecated)</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>GE</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Enable/disable a GPI line.
    </para>
    <para>
      <userinput>GE
      <replaceable>matrix</replaceable>
      <replaceable>gpinum-spec</replaceable>
      <replaceable>state</replaceable>!</userinput>
    </para>
    <para>
      Enable or disable the GPI line(s) indicated by
      <replaceable>gpinum-spec</replaceable> on matrix
      <replaceable>matrix</replaceable>.
    </para>
    <para>
      The <replaceable>gpinum-spec</replaceable> can be an integer value
      to indicate a single GPI line or a range specification to indicate
      multiple lines. See
      <xref linkend="sect.rml.gpi_enable__ge_.range_examples" /> above
      for examples of range specifications.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.gpi_set__gi_">
    <title>GPI Set [GI]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>GI</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set action in response to a GPIO event.
    </para>
    <para>
      <userinput>GI
      <replaceable>matrix</replaceable>
      <replaceable>type</replaceable>
      <replaceable>gpinum</replaceable>
      <replaceable>state</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      Execute the macro cart <replaceable>cart</replaceable> upon transition
      of the GPIO of type <replaceable>type</replaceable> and line
      <replaceable>gpinum</replaceable> on matrix
      <replaceable>matrix</replaceable> to <replaceable>state</replaceable>.
      Possible types are: 
    </para>
    <para>
      <variablelist>
	<varlistentry>
	  <term><userinput>I</userinput></term>
	  <listitem>Input</listitem>
	</varlistentry>
	<varlistentry>
	  <term><userinput>O</userinput></term>
	  <listitem>Output</listitem>
	</varlistentry>
      </variablelist>
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.gpi_set__gi___old_format__deprecated_">
    <title>GPI Set [GI] (old format, deprecated)</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>GI</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set action in response to a GPIO event.
    </para>
    <para>
      <userinput>GI
      <replaceable>matrix</replaceable>
      <replaceable>gpinum</replaceable>
      <replaceable>state</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      Execute the macro cart <replaceable>cart</replaceable> upon transition
      of the GPIO of line <replaceable>gpinum</replaceable> on matrix
      <replaceable>matrix</replaceable> to <replaceable>state</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.gpo_set__go_">
    <title>GPO Set [GO]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>GO</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the state of a GPIO line.
    </para>
    <para>
      <userinput>GO
      <replaceable>matrix</replaceable>
      <replaceable>type</replaceable>
      <replaceable>gponum</replaceable>
      <replaceable>state</replaceable>
      <replaceable>length</replaceable>!</userinput>
    </para>
    <para>
      Command GPIO line <replaceable>gponum</replaceable> of type 
      <replaceable>type</replaceable> on matrix
      <replaceable>matrix</replaceable>> to <replaceable>state</replaceable>
      for <replaceable>length</replaceable>> mS.  A length of
      <userinput>0</userinput> indicates to hold the state indefinitely.
      Possible types are: 
    </para>
    <para>
      <variablelist>
	<varlistentry>
	  <term><userinput>I</userinput></term>
	  <listitem>Input</listitem>
	</varlistentry>
	<varlistentry>
	  <term><userinput>O</userinput></term>
	  <listitem>Output</listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Possible states are:
    </para>
    <para>
      <variablelist>
	<varlistentry>
	  <term><userinput>0</userinput></term>
	  <listitem>OFF</listitem>
	</varlistentry>
	<varlistentry>
	  <term><userinput>1</userinput></term>
	  <listitem>ON</listitem>
	</varlistentry>
	<varlistentry>
	  <term><userinput>-1</userinput></term>
	  <listitem>Passthrough hardware input (valid only for Input type)</listitem>
	</varlistentry>
      </variablelist>
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.gpo_set__go___old_format__deprecated_">
    <title>GPO Set [GO] (old format, deprecated)</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>GO</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the state of a GPIO line.
    </para>
    <para>
      <userinput>GO
      <replaceable>matrix</replaceable>
      <replaceable>gponum</replaceable>
      <replaceable>state</replaceable>
      <replaceable>length</replaceable>!</userinput>
    </para>
    <para>
      Command GPIO line <replaceable>gponum</replaceable> on matrix
      <replaceable>matrix</replaceable>> to <replaceable>state</replaceable>
      for <replaceable>length</replaceable>> mS.  A length of
      <userinput>0</userinput> indicates to hold the state indefinitely.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.insert_cart__px_">
    <title>Insert Cart [PX]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PX</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Insert a cart in a log.
    </para>
    <para>
      <userinput>PX
      <replaceable>mach</replaceable>
      <replaceable>cart</replaceable>
      [<replaceable>offset</replaceable>]
      [PLAY|SEGUE|STOP]!</userinput>
    </para>
    <para>
      Insert cart <replaceable>cart</replaceable> after the currently playing
      or next event plus <replaceable>offset</replaceable> (default '0')
      lines on log machine <replaceable>mach</replaceable>. The
      transition may also be optionally specified.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.insert_serial_trap__si_">
    <title>Insert Serial Trap [SI]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SI</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Insert a serial trap to detect a character sequence.
    </para>
    <para>
      <userinput>SI
      <replaceable>portnum</replaceable>
      <replaceable>cart</replaceable>
      <replaceable>string</replaceable>!</userinput>
    </para>
    <para>
      Insert a serial trap to execute the macro cart
      <replaceable>cart</replaceable> upon receipt of
      <replaceable>string</replaceable> on serial port
      <replaceable>port</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.label_panel__pc_">
    <title>Label Panel [PC]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PC</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the label of a SoundPanel button in RDAirPlay.
    </para>
    <para>
      <userinput>PC
      <replaceable>panel</replaceable>
      <replaceable>col</replaceable>
      <replaceable>row</replaceable>
      <replaceable>label</replaceable>
      <replaceable>color</replaceable>!</userinput>
    </para>
    <para>
      Set the button at <replaceable>col</replaceable>,
      <replaceable>row</replaceable> of panel <replaceable>panel</replaceable>
      to have a text label of <replaceable>label</replaceable> and a
      background color of <replaceable>color</replaceable>.
      Panel: <userinput>S1</userinput>...<userinput>S50</userinput> or
      <userinput>U1</userinput>...<userinput>U50</userinput>;
      <userinput>C</userinput> for <replaceable>panel</replaceable> means
      currently selected panel.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.load_log__ll_">
    <title>Load Log [LL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>LL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Load a log into RDAirPlay.
    </para>
    <para>
      <userinput>LL
      <replaceable>mach</replaceable>
      [<replaceable>logname</replaceable>]
      [<replaceable>startline</replaceable>]!</userinput>
    </para>
    <para>
      Load the log <replaceable>logname</replaceable> in log machine
      <replaceable>mach</replaceable>.  After loading, start the log at line
      <replaceable>startline</replaceable> if it is >=0.  If
      <replaceable>startline</replaceable> is -2, the log will be started at
      the first event if that event does not have a 'stop' transition. 
      Default <replaceable>startline</replaceable>=-1. If no 
      <replaceable>log</replaceable> is specified, the machine's current log
      is unloaded.
    </para>
  </sect2>

  <sect2 xml:id="sect.load_panel__pe_">
    <title>Load Panel [PE]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PE</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Load a cart into a SoundPanel button in RDAirPlay.
    </para>
    <para>
      <userinput>PE
      <replaceable>panel</replaceable>
      <replaceable>col</replaceable>
      <replaceable>row</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      Load cart <replaceable>cart</replaceable> into the button at
      <replaceable>col</replaceable>,<replaceable>row</replaceable> of panel
      <replaceable>panel</replaceable>.
      Panel: <userinput>S1</userinput>...<userinput>S50</userinput> or
      <userinput>U1</userinput>...<userinput>U50</userinput>;
      <userinput>C</userinput> for <replaceable>panel</replaceable> means
      currently selected panel.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.load_slot__dl_">
    <title>Load Slot [DL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcartslots</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>DL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Load an RDCartSlots slot.
    </para>
    <para>
      This command has two syntaxes, depending upon the mode of the slot.
    </para>
    <para>
      Cart Deck Mode syntax:
    </para>
    <para>
      <userinput>DL
      <replaceable>slot</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      Load the cart <replaceable>cart</replaceable> into the
      <replaceable>slot</replaceable> slot.  Passing a '0' for
      <replaceable>cart</replaceable> will cause the slot to be unloaded. 
      This command will be ignored if the slot is currently playing.
    </para>
    <para>
      Breakaway Mode syntax:
    </para>
    <para>
      <userinput>DL
      <replaceable>slot</replaceable>
      <replaceable>svcname</replaceable>!</userinput>
    </para>
    <para>
      Set the <replaceable>slot</replaceable> slot to use service
      <replaceable>svcname</replaceable>.  Omitting the
      <replaceable>svcname</replaceable> argument will cause the slot to be
      unloaded. This command will be ignored if the slot is currently
      executing a breakaway.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.login__lo_">
    <title>Login [LO]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>LO</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Change the active Rivendell user context.
    </para>
    <para>
      <userinput>LO
      <replaceable>user</replaceable>
      <replaceable>password</replaceable>!</userinput>
    </para>
    <para>
      Set the current Rivendell user to <replaceable>user</replaceable>.
      If no arguments are supplied, log out the station --i.e. revert to the
      default user. 
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.macro_timer__mt_">
    <title>Macro Timer [MT]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>MT</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Timer for running macro carts.
    </para>
    <para>
      <userinput>MT
      <replaceable>timernum</replaceable>
      <replaceable>timeout</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      Set the macro timer <replaceable>timernum</replaceable> to execute macro
      cart <replaceable>cart</replaceable> in
      <replaceable>timeout</replaceable> milliseconds.  Setting
      <replaceable>timeout</replaceable> to <userinput>0</userinput> disables
      the timer.  Sixteen macro timers (numbered 1-16) are available on each
      Rivendell host.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.make_next__mn_">
    <title>Make Next [MN]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>MN</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Load changes to a currently loaded log in RDAirPlay.
    </para>
    <para>
      <userinput>RL
      <replaceable>mach</replaceable>
      <replaceable>line</replaceable>!</userinput>
    </para>
    <para>
      Set the next event for log machine <replaceable>mach</replaceable> to
      line <replaceable>line</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.message_box__mb_">
    <title>Message Box [MB]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>MB</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Display a popup message box on a host display.
    </para>
    <para>
      <userinput>MB
      <replaceable>display</replaceable>
      <replaceable>severity</replaceable>
      <replaceable>msg</replaceable>!</userinput>
    </para>
    <para>
      Display the text <replaceable>msg</replaceable> in a popup window on X
      display <replaceable>display</replaceable>, with an icon to indicate
      <replaceable>severity</replaceable>.  Valid values of
      <replaceable>severity</replaceable> are:
    </para>
    <variablelist>
      <varlistentry>
	<term><userinput>1</userinput></term>
	<listitem>Information</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>2</userinput></term>
	<listitem>Warning</listitem>
      </varlistentry>
      <varlistentry>
	<term><userinput>3</userinput></term>
	<listitem>Critical</listitem>
      </varlistentry>
    </variablelist>
    <para>
      When using the 'Message Box' ['<userinput>MB</userinput>'] RML,
      it may be necessary to configure the X server to allow local
      connections from other processes.  One way to
      do this is to execute the following command as the local Rivendell user:
    </para>
    <para>
      <userinput>xhost +local:</userinput>
    </para>
    <para>	
      For more information, see the
      <command>xhost</command><manvolnum>1</manvolnum> man page.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.no_operation__nn_">
    <title>No Operation [NN]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem>none</listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>NN</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Do nothing.
    </para>
    <para>
      <userinput>NN!</userinput>
    </para>
    <para>
      This RML does precisely nothing.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.pause_panel__pu_">
    <title>Pause Panel [PU]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PU</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Pause a SoundPanel button in RDAirPlay.
    </para>
    <para>
      <userinput>PU
      <replaceable>panel</replaceable>
      <replaceable>col</replaceable>
      <replaceable>row</replaceable>
      [<replaceable>mport</replaceable>]!</userinput>
    </para>
    <para>
      Pause the button at <replaceable>col</replaceable>,
      <replaceable>row</replaceable> of panel <replaceable>panel</replaceable>.
      Panel: <userinput>S1</userinput>...<userinput>S50</userinput> or
      <userinput>U1</userinput>...<userinput>U50</userinput>;
      <userinput>C</userinput> for <replaceable>panel</replaceable> means
      currently selected panel.
      If <replaceable>col</replaceable> and/or <replaceable>row</replaceable>
      is <userinput>0</userinput>: pause all playing buttons in
      <replaceable>col</replaceable> or <replaceable>row</replaceable>. 
      If specified, start the playout on panel port
      <replaceable>mport</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.play_panel__pp_">
    <title>Play Panel [PP]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PP</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Load a cart into a SoundPanel button in RDAirPlay.
    </para>
    <para>
      <userinput>PP
      <replaceable>panel</replaceable>
      <replaceable>col</replaceable>
      <replaceable>row</replaceable>
      [<replaceable>mport</replaceable>]
      [0|1]!</userinput>
    </para>
    <para>
      Play the button at <replaceable>col</replaceable>,
      <replaceable>row</replaceable> of panel <replaceable>panel</replaceable>.
      Panel: <userinput>S1</userinput>...<userinput>S50</userinput> or
      <userinput>U1</userinput>...<userinput>U50</userinput>;
      <userinput>C</userinput> for <replaceable>panel</replaceable> means
      currently selected panel.
      If <replaceable>col</replaceable> and/or <replaceable>row</replaceable>
      is <userinput>0</userinput>: Start the first loaded button that is not
      active.  If specified, start the playout on panel port
      <replaceable>mport</replaceable>. The started panel will stay active when
      finished, if the 5th argument is <userinput>1</userinput>. 
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.play_slot__dp_">
    <title>Play Slot [DP]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcartslots</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>DP</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Play an RDCartSlots slot.
    </para>
    <para>
      <userinput>DP
      <replaceable>slot</replaceable>!</userinput>
    </para>
    <para>
      Play the cart currently loaded in the <replaceable>slot</replaceable>
      slot.  The slot must be in Cart Deck mode.  This command will be
      ignored if the slot is unloaded or already playing.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.refresh_log__rl_">
    <title>Refresh Log [RL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>RL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Load changes to a currently loaded log in RDAirPlay.
    </para>
    <para>
      <userinput>RL
      <replaceable>mach</replaceable>!</userinput>
    </para>
    <para>
      Refresh the log currently loaded in log machine
      <replaceable>mach</replaceable>. 
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.run_shell_command__rn_">
    <title>Run Shell Command [RN]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>RN</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Run a shell command.
    </para>
    <para>
      <userinput>RN
      <replaceable>cmd</replaceable>!</userinput>
    </para>
    <para>
      Run the shell command <replaceable>cmd</replaceable>.
    </para>
    <note>
      <para>
      The command is actually executed as:
      </para>
      <para>
	<code>
	  /bin/sh -c <replaceable>cmd</replaceable>
	</code>
      </para>
      <para>
	using the user and group specified by the
	&quot;RnRmlOwner=&quot; and &quot;RnRmlGroup=&quot; directives in
	the &quot;[Identity]&quot; section of
	<command>rd.conf</command><manvolnum>5</manvolnum>.
      </para>
    </note>
  </sect2>

  <sect2 xml:id="sect.rml.select_widget__pw_">
    <title>Select Widget [PW]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PW</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Select right-hand widget in RDAirPlay.
    </para>
    <para>
      <userinput>PW
      <replaceable>mach</replaceable>!</userinput>
    </para>
    <para>
      Select right-hand widget to log-machine <replaceable>mach</replaceable>
      or <userinput>0</userinput> for sound panel or
      <userinput>4</userinput> for voice tracker.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.serial_out__so_">
    <title>Serial Out [SO]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SO</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Output a string on a serial port.
    </para>
    <para>
      <userinput>SO
      <replaceable>portnum</replaceable>
      <replaceable>data</replaceable>!</userinput>
    </para>
    <para>
      Output <replaceable>data</replaceable> on serial port
      <replaceable>portnum</replaceable>.  <replaceable>data</replaceable> can
      consist of arbitrary binary data as well as textual characters (see
      <xref linkend="sect.rml.binary_data" /> above).
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.serial_reload__sy_">
    <title>Serial Reload [SY]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SY</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Reload the configuration for a serial port.
    </para>
    <para>
      <userinput>SY
      <replaceable>portnum</replaceable>!</userinput>
    </para>
    <para>
      Reload the configuration for serial port
      <replaceable>portnum</replaceable>.  Normally, this should only be
      issued by RDAdmin following a configuration change.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.set_color_label__lc_">
    <title>Set Color Label [LC]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>LC</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Display a color message in the label widget on RDAirPlay.
    </para>
    <para>
      <userinput>LC
      <replaceable>color</replaceable>
      <replaceable>string</replaceable>!</userinput>
    </para>
    <para>
      Display <replaceable>string</replaceable> in color 
      <replaceable>color</replaceable> in the message widget. For the list
      of available colors, see <xref linkend="sect.rml.specifying_color" />. 
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.set_default_now___next_cart__sn_">
    <title>Set Default Now &amp; Next Cart [SN]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SN</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the default Now &amp; Next cart.
    </para>
    <para>
      <userinput>SN
      now</userinput>|<userinput>next
      <replaceable>mach</replaceable>
      <replaceable>cart</replaceable>!</userinput>
    </para>
    <para>
      Set the default Now &amp; Next cart for log
      <replaceable>mach</replaceable> to <replaceable>cart</replaceable>.  
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.set_display__sd_">
    <title>Set Display [SD]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SD</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set a console display.
    </para>
    <para>
      <userinput>SD
      <replaceable>matrix</replaceable>
      <replaceable>display</replaceable>
      <replaceable>line</replaceable>
      <replaceable>col</replaceable>
      <replaceable>attr</replaceable>
      <replaceable>label</replaceable>!</userinput>
    </para>
    <para>
      On matrix <replaceable>matrix</replaceable>, set the console display
      <replaceable>display</replaceable> to <replaceable>label</replaceable>,
      starting at position <replaceable>line</replaceable>,
      <replaceable>col</replaceable> and using message attributes
      <replaceable>attr</replaceable>.
    </para>
    <para>
      The message attributes value is constructed as follows:
    </para>
    <variablelist>
      <varlistentry>
	<term>Bit 7</term>
	<listitem>Display mode</listitem>
      </varlistentry>
      <varlistentry>
	<term>Bits 6,5</term>
	<listitem>Video attribute</listitem>
      </varlistentry>
      <varlistentry>
	<term>Bit 2,1,0</term>
	<listitem>Message Text Color</listitem>
      </varlistentry>
    </variablelist>
    <para>
      Display Mode:
    </para>
    <variablelist>
      <varlistentry>
	<term>0</term>
	<listitem>Overwrite text</listitem>
      </varlistentry>
      <varlistentry>
	<term>1</term>
	<listitem>Insert text</listitem>
      </varlistentry>
    </variablelist>
    <para>
      Video Attribute:
    </para>
    <variablelist>
      <varlistentry>
	<term>00</term>
	<listitem>Normal</listitem>
      </varlistentry>
      <varlistentry>
	<term>01</term>
	<listitem>Flash</listitem>
      </varlistentry>
      <varlistentry>
	<term>02</term>
	<listitem>Reverse</listitem>
      </varlistentry>
    </variablelist>
    <para>
      Text Color:
    </para>
    <variablelist>
      <varlistentry>
	<term>000</term>
	<listitem>White</listitem>
      </varlistentry>
      <varlistentry>
	<term>001</term>
	<listitem>Red</listitem>
      </varlistentry>
      <varlistentry>
	<term>010</term>
	<listitem>Yellow</listitem>
      </varlistentry>
      <varlistentry>
	<term>011</term>
	<listitem>Green</listitem>
      </varlistentry>
      <varlistentry>
	<term>100</term>
	<listitem>Cyan</listitem>
      </varlistentry>
      <varlistentry>
	<term>101</term>
	<listitem>Magenta</listitem>
      </varlistentry>
    </variablelist>
  </sect2>

  <sect2 xml:id="sect.rml.set_duck_level__md_">
    <title>Set Duck Level [MD]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>MD</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set duck level for an RDAirPlay log machine.
    </para>
    <para>
      <userinput>MD
      <replaceable>mach</replaceable>
      <replaceable>level</replaceable>
      <replaceable>fade</replaceable>
      [<replaceable>mport</replaceable>]!</userinput>
    </para>
    <para>
      Set the duck level of <replaceable>mach</replaceable>, or 
      <userinput>0</userinput> for all log machines. If playing, the audio
      fades to <replaceable>level</replaceable> (in dbFS) in
      <replaceable>fade</replaceable> msecs. If specified, only affect carts
      playing on machine port <replaceable>mport</replaceable>.
      Loading or clearing a log will set the duck level back to 0.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.set_label__lb_">
    <title>Set Label [LB]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>LB</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Display a message in the label widget on RDAirPlay.
    </para>
    <para>
      <userinput>LB
      <replaceable>string</replaceable>!</userinput>
    </para>
    <para>
      Display <replaceable>string</replaceable> in the message widget. 
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.set_mode__pm_">
    <title>Set Mode [PM]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PM</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the mode of an RDAirPlay log machine.
    </para>
    <para>
      <userinput>PM
      <replaceable>mode</replaceable>
      [<replaceable>mach</replaceable>]!</userinput>
    </para>
    <para>
      Set log machine <replaceable>mach</replaceable> to mode
      <replaceable>mode</replaceable>.  If mode is not given or the Mode
      Control Style is set to 'Unified', then all log machines are set to
      <replaceable>mode</replaceable>.  Valid values for
      <replaceable>mode</replaceable> are:
      <variablelist>
	<varlistentry>
	  <term>1</term>
	  <listitem>LiveAssist</listitem>
	</varlistentry>
	<varlistentry>
	  <term>2</term>
	  <listitem>Auto</listitem>
	</varlistentry>
	<varlistentry>
	  <term>3</term>
	  <listitem>Manual</listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      See <xref linkend="sect.rml.log_machines" /> for the possible values
      of <replaceable>mach</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.sleep__sp_">
    <title>Sleep [SP]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SP</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Pause for specified time.
    </para>
    <para>
      <userinput>SP
      <replaceable>msecs</replaceable>!</userinput>
    </para>
    <para>
      Wait for <replaceable>msecs</replaceable> milliseconds.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.start__pl_">
    <title>Start [PL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Start a log at a specified line.
    </para>
    <para>
      <userinput>PL
      <replaceable>mach</replaceable>
      <replaceable>line</replaceable>!</userinput>
    </para>
    <para>
      Start log machine <replaceable>mach</replaceable> at line
      <replaceable>line</replaceable> if stopped, otherwise do nothing.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.start_button__pb_">
    <title>Start Button [PB]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PB</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Push an RDAirPlay Start button (numbered starting from 1 at the top
      and counting downwards).
    </para>
    <para>
      <userinput>PB
      <replaceable>button</replaceable>!</userinput>
    </para>
    <para>
      Push button <replaceable>button</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.start_next__pn_">
    <title>Start Next [PN]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PN</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Start the next event in a log.
    </para>
    <para>
      <userinput>PN
      <replaceable>mach</replaceable>
      [<replaceable>mport</replaceable>]
      [<replaceable>skip</replaceable>]!</userinput>
    </para>
    <para>
      Start log machine <replaceable>mach</replaceable> if stopped, or start
      next event if already running.  If specified, start the playout on
      machine port <replaceable>mport</replaceable>.  If
      <replaceable>skip</replaceable> is supplied, equal to '1' and the log
      machine is in Manual or Live Assist mode, then any intervening
      meta-events in log between the current 'next' event and the next cart
      will be skipped over.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.start_record_deck__rs_">
    <title>Start Record Deck [RS]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcatchd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>RS</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Start an RDCatch Recording
    </para>
    <para>
      <userinput>RS
      <replaceable>decknum</replaceable>
      <replaceable>cartnum</replaceable>
      <replaceable>cutnum</replaceable>
      <replaceable>maxlen</replaceable>!</userinput>
    </para>
    <para>
      Start recording to cut <replaceable>cutnum</replaceable> of cart
      <replaceable>cartnum</replaceable>, using RDCatch record deck
      <replaceable>decknum</replaceable> for a maximum time of
      <replaceable>maxlen</replaceable> mS.  The record parameters used
      (format, sample rate, channels, etc) will be those configured for the
      selected deck in RDAdmin->ManageHosts->RDCatch.  The selected cart and
      cut must already exist.  Any audio previously residing in the selected 
      cart and cut will be overwritten.
    </para>
  </sect2>

  <sect2 xml:id="sect.stop__rs_">
    <title>Stop [PS]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PS</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Stop a log in RDAirPlay.
    </para>
    <para>
      <userinput>PS
      <replaceable>mach</replaceable>|<userinput>0</userinput>
      [<replaceable>fade</replaceable>]
      [<replaceable>mport</replaceable>]!</userinput>
    </para>
    <para>
      Stop log machine <replaceable>mach</replaceable>, or
      <userinput>0</userinput> for all log machines. If specified, only stop
      carts playing on machine port <replaceable>mport</replaceable>. If
      specified, fade out <replaceable>fade</replaceable> msecs.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.stop_panel__pt_">
    <title>Stop Panel [PT]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdairplay</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>PT</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Stop a SoundPanel button in RDAirPlay.
    </para>
    <para>
      <userinput>PT
      <replaceable>panel</replaceable>
      <replaceable>col</replaceable>
      <replaceable>row</replaceable>
      [<replaceable>mport</replaceable>]
      [0|1]
      <replaceable>fade</replaceable>!</userinput>
    </para>
    <para>
      Stop the button at <replaceable>col</replaceable>,
      <replaceable>row</replaceable> of panel <replaceable>panel</replaceable>.
      Panel: <userinput>S1</userinput>...<userinput>S50</userinput> or
      <userinput>U1</userinput>...<userinput>U50</userinput>;
      <userinput>C</userinput> for <replaceable>panel</replaceable> means
      currently selected panel.
      If <replaceable>col</replaceable> and/or <replaceable>row</replaceable>
      is <userinput>0</userinput>: stop all playing buttons in
      <replaceable>col</replaceable> or <replaceable>row</replaceable>. 
      If specified, start the playout on panel port
      <replaceable>mport</replaceable>. The stopped panel will stay active when
      finished, if the 5th argument is <userinput>1</userinput>. 
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.stop_record_deck__rr_">
    <title>Stop Record Deck [RR]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcatchd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>RR</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Stop an RDCatch Recording
    </para>
    <para>
      <userinput>RR
      <replaceable>decknum</replaceable>!</userinput>
    </para>
    <para>
      Stop any active recording on RDCatch deck <replaceable>decknum</replaceable>.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.stop_slot__ds_">
    <title>Stop Slot [DS]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>rdcartslots</command><manvolnum>1</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>DS</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Stop an RDCartSlots slot.
    </para>
    <para>
      <userinput>DS
      <replaceable>slot</replaceable>!</userinput>
    </para>
    <para>
      Stop the cart currently loaded in the <replaceable>slot</replaceable>
      slot.  The slot must be in Cart Deck mode.  This command will be
      ignored if the slot is unloaded or already playing.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_add__sa_">
    <title>Switch Add [SA]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SA</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Add an input to an output.
    </para>
    <para>
      <userinput>SA
      <replaceable>matrix</replaceable>
      <replaceable>input</replaceable>
      <replaceable>output</replaceable>!</userinput>
    </para>
    <para>
      Command switch matrix number <replaceable>matrix</replaceable> to add
      input number <replaceable>input</replaceable> to output number
      <replaceable>output</replaceable>.  Unlike <command>SWITCH TAKE</command>,
      this command leaves any other previously assigned inputs unchanged.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_add_with_gain__sg_">
    <title>Switch Add With Gain [SG]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SG</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Add an input to an output while specifyng the crosspoint gain.
    </para>
    <para>
      <userinput>SG
      <replaceable>matrix</replaceable>
      <replaceable>input</replaceable>
      <replaceable>output</replaceable>
      <replaceable>gain</replaceable>!</userinput>
    </para>
    <para>
      Command switch matrix number <replaceable>matrix</replaceable> to add
      input number <replaceable>input</replaceable> to output number
      <replaceable>output</replaceable> at gain <replaceable>gain</replaceable>.
      The gain is specified in 1/10 of a dB, with 0 = unity gain. 
      Unlike <command>SWITCH TAKE</command>, this command leaves any other
      previously assigned inputs unchanged.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_crosspoint_gain__sx_">
    <title>Switch Crosspoint Gain [SX]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SX</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set crosspoint gain.
    </para>
    <para>
      <userinput>SX
      <replaceable>matrix</replaceable>
      <replaceable>input</replaceable>
      <replaceable>output</replaceable>
      <replaceable>level</replaceable>!</userinput>
    </para>
    <para>
      Command switch matrix number <replaceable>matrix</replaceable> to adjust
      the gain of the crosspoint connecting input
      <replaceable>input</replaceable> to output
      <replaceable>output</replaceable> to <replaceable>level</replaceable> dB.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_level__sl_">
    <title>Switch Level [SL]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SL</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set input gain.
    </para>
    <para>
      <userinput>SL
      <replaceable>matrix</replaceable>
      <replaceable>input</replaceable>
      <replaceable>level</replaceable>!</userinput>
    </para>
    <para>
      Command switch matrix number <replaceable>matrix</replaceable> to adjust
      the gain of input number <replaceable>input</replaceable> to
      <replaceable>level</replaceable> dB.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_reload__sz_">
    <title>Switch Reload [SZ]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SZ</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Reload the configuration for a switch matrix.
    </para>
    <para>
      <userinput>SZ
      <replaceable>matrix</replaceable>!</userinput>
    </para>
    <para>
      Reload the configuration for switch matrix
      <replaceable>matrix</replaceable>.  Normally, this should only be
      issued by RDAdmin following a configuration change.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_remove__sr_">
    <title>Switch Remove [SR]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>SR</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Remove an input from an output.
    </para>
    <para>
      <userinput>SR
      <replaceable>matrix</replaceable>
      <replaceable>input</replaceable>
      <replaceable>output</replaceable>!</userinput>
    </para>
    <para>
      Command switch matrix number <replaceable>matrix</replaceable> to remove
      input number <replaceable>input</replaceable> from output number
      <replaceable>output</replaceable>.  Unlike <command>SWITCH TAKE</command>,
      this command leaves any other previously assigned inputs unchanged.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.switch_take__st_">
    <title>Switch Take [ST]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>ST</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Exclusively route an input to an output.
    </para>
    <para>
      <userinput>ST
      <replaceable>matrix</replaceable>
      <replaceable>input</replaceable>
      <replaceable>output</replaceable>!</userinput>
    </para>
    <para>
      Command switch matrix number <replaceable>matrix</replaceable> to take
      input number <replaceable>input</replaceable> to output number
      <replaceable>output</replaceable>.  "Take" in this context implies
      removing any previously assigned inputs from the referenced output.
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.toggle_on_air_flag__ta_">
    <title>Toggle On Air Flag [TA]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>TA</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Set the state of the On Air flag.
    </para>
    <para>
      <userinput>TA 0</userinput>|<userinput>1!</userinput>
    </para>
    <para>
      Set the On-Air flag to ON [<userinput>1</userinput>] or OFF
      [<userinput>0</userinput>].
    </para>
  </sect2>

  <sect2 xml:id="sect.rml.udp_out__uo_">
    <title>UDP Out [UO]</title>
    <para>
      <variablelist>
	<varlistentry>
	  <term>Module</term>
	  <listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
	</varlistentry>
	<varlistentry>
	  <term>Mnemonic</term>
	  <listitem><userinput>UO</userinput></listitem>
	</varlistentry>
      </variablelist>
    </para>
    <para>
      Send data to a UDP port.
    </para>
    <para>
      <userinput>UO
      <replaceable>ipaddr</replaceable>
      <replaceable>udpport</replaceable>
      <replaceable>data</replaceable>!</userinput>
    </para>
    <para>
      Send <replaceable>data</replaceable> in a UDP packet to port
      <replaceable>udpport</replaceable> at <replaceable>ipaddr</replaceable>.
      <replaceable>data</replaceable> can consist of arbitrary binary data as
      well as textual characters (see <xref linkend="sect.rml.binary_data" />
      for details).
    </para>
  </sect2>
</sect1>
</chapter>
