<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="foutir">
  <refmeta>
    <refentrytitle>foutir</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>foutir</refname>
    <refpurpose>
      Outputs i-rate signals from an arbitrary number of channels to a specified file.
      <indexterm id="IndexFoutir"><primary>foutir</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      <emphasis>foutir</emphasis> output <emphasis>N</emphasis> i-rate signals to a specified file of <emphasis>N</emphasis> channels.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>foutir</command> ihandle, iformat, iflag, iout1 [, iout2, iout3,....,ioutN]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ihandle</emphasis> -- a number which specifies this file.
    </para>

    <para>
      <emphasis>iformat</emphasis> -- a flag to choose output file format:
      <itemizedlist>
        <listitem>
          <para>0 - floating point in text format</para>
        </listitem>

        <listitem>
          <para>1 - 32-bit floating point in binary format</para>
        </listitem>
      </itemizedlist>
    </para>

    <para>
      <emphasis>iflag</emphasis> -- choose the mode of writing to the ASCII file (valid only in ASCII mode; in binary mode <emphasis>iflag</emphasis> has no meaning, but it must be present anyway). <emphasis>iflag</emphasis> can be a value chosen among the following:
      <itemizedlist>
        <listitem>
          <para>0 - line of text without instrument prefix</para>
        </listitem>

        <listitem>
          <para>1 - line of text with instrument prefix (see below)</para>
        </listitem>

        <listitem>
          <para>2 - reset the time of instrument prefixes to zero (to be used only in some particular cases. See below)</para>
        </listitem>
      </itemizedlist>
    </para>

    <para>
      <emphasis>iout,..., ioutN</emphasis> -- values to be written to the file
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <link linkend="fouti"><citetitle>fouti</citetitle></link> and <emphasis>foutir</emphasis> write i-rate values to a file. The main use of these opcodes is to generate a score file during a realtime session. For this purpose, the user should set <emphasis>iformat</emphasis> to 0 (text file output) and <emphasis>iflag</emphasis> to 1, which enable the output of a prefix consisting of the strings <emphasis>inum</emphasis>, <emphasis>actiontime</emphasis>, and <emphasis>duration</emphasis>, before the values of <emphasis>iout1...ioutN</emphasis> arguments. The arguments in the prefix refer to instrument number, action time and duration of current note.
    </para>

    <para>
      The difference between <link linkend="fouti"><citetitle>fouti</citetitle></link> and <emphasis>foutir</emphasis> is that, in the case of <emphasis>fouti</emphasis>, when <emphasis>iflag</emphasis> is set to 1, the duration of the first opcode is undefined (so it is replaced by a dot). Whereas, <emphasis>foutir</emphasis> is defined at the end of note, so the corresponding text line is written only at the end of the current note (in order to recognize its duration). The corresponding file is linked by the <emphasis>ihandle</emphasis> value generated by the <link linkend="fiopen"><citetitle>fiopen</citetitle></link> opcode. So <emphasis>fouti</emphasis> and <emphasis>foutir</emphasis> can be used to generate a Csound score while playing  a realtime session.
    </para>

    <para>
      Notice that <link linkend="fout"><citetitle>fout</citetitle></link> and <link linkend="foutk"><citetitle>foutk</citetitle></link> can use either a string containing a file pathname, or a handle-number generated by <link linkend="fiopen"><citetitle>fiopen</citetitle></link>. Whereas, with <link linkend="fouti"><citetitle>fouti</citetitle></link> and <emphasis>foutir</emphasis>, the target file can be only specified by means of a handle-number.
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="fiopen"><citetitle>fiopen</citetitle></link>,
      <link linkend="fout"><citetitle>fout</citetitle></link>,
      <link linkend="fouti"><citetitle>fouti</citetitle></link>,
      <link linkend="foutk"><citetitle>foutk</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namegabriel;</member>
        <member>Italy</member>
        <member>1999</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.56</para>
  </refsect1>
</refentry>
