<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="midion2">
  <refmeta>
    <refentrytitle>midion2</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>midion2</refname>

    <refpurpose>
      Sends noteon and noteoff messages to the MIDI OUT port.
      <indexterm id="IndexMidion2"><primary>midion2</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Sends noteon and noteoff messages to the MIDI OUT port when triggered by a value different than zero.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>midion2</command> kchn, knum, kvel, ktrig</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kchn</emphasis> -- MIDI channel (1-16)
    </para>

    <para>
      <emphasis>knum</emphasis> -- MIDI note number (0-127)
    </para>

    <para>
      <emphasis>kvel</emphasis> -- note velocity (0-127)
    </para>

    <para>
      <emphasis>ktrig</emphasis> -- trigger input signal (normally 0)
    </para>

    <para>
      Similar to <emphasis>midion</emphasis>, this opcode sends noteon and noteoff messages to the MIDI out port, but only when <emphasis>ktrig</emphasis> is non-zero. This opcode is can work together with the output of the <link linkend="trigger"><citetitle>trigger</citetitle></link> opcode.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namegabriel;</member>
        <member>Italy</member>
        <member>1998</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.492</para>
    <para>Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges.</para>
  </refsect1>
</refentry>
