| 1 | |
| 2 | <refentry id="fouti"> |
| 3 | <indexterm id="IndexFouti"><primary>fouti</primary></indexterm> |
| 4 | <refentryinfo><title>Signal I/O:File I/O</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>fouti</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>fouti</refname> |
| 13 | <refpurpose> |
| 14 | Outputs i-rate signals of an arbitrary number of channels to a specified file. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | <emphasis>fouti</emphasis> output <emphasis>N</emphasis> i-rate signals to a specified file of <emphasis>N</emphasis> channels. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis><command>fouti</command> ihandle, iformat, iflag, iout1 [, iout2, iout3,....,ioutN]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>ihandle</emphasis> -- a number which specifies this file. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>iformat</emphasis> -- a flag to choose output file format: |
| 38 | <itemizedlist> |
| 39 | <listitem> |
| 40 | <para>0 - floating point in text format</para> |
| 41 | </listitem> |
| 42 | |
| 43 | <listitem> |
| 44 | <para>1 - 32-bit floating point in binary format</para> |
| 45 | </listitem> |
| 46 | </itemizedlist> |
| 47 | </para> |
| 48 | |
| 49 | <para> |
| 50 | <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: |
| 51 | <itemizedlist> |
| 52 | <listitem> |
| 53 | <para>0 - line of text without instrument prefix</para> |
| 54 | </listitem> |
| 55 | |
| 56 | <listitem> |
| 57 | <para>1 - line of text with instrument prefix (see below)</para> |
| 58 | </listitem> |
| 59 | |
| 60 | <listitem> |
| 61 | <para>2 - reset the time of instrument prefixes to zero (to be used only in some particular cases. See below)</para> |
| 62 | </listitem> |
| 63 | </itemizedlist> |
| 64 | </para> |
| 65 | |
| 66 | <para> |
| 67 | <emphasis>iout,..., ioutN</emphasis> -- values to be written to the file |
| 68 | </para> |
| 69 | </refsect1> |
| 70 | |
| 71 | <refsect1> |
| 72 | <title>Performance</title> |
| 73 | <para> |
| 74 | <emphasis>fouti</emphasis> and <link linkend="foutir"><citetitle>foutir</citetitle></link> 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. |
| 75 | </para> |
| 76 | |
| 77 | <para> |
| 78 | 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 <emphasis>fouti</emphasis> and <link linkend="foutir"><citetitle>foutir</citetitle></link>, the target file can be only specified by means of a handle-number. |
| 79 | </para> |
| 80 | </refsect1> |
| 81 | |
| 82 | <refsect1> |
| 83 | <title>Examples</title> |
| 84 | <para> |
| 85 | Here is an example of the fouti opcode. It uses the file <ulink url="examples/fouti.csd"><citetitle>fouti.csd</citetitle></ulink>. |
| 86 | <example> |
| 87 | <title>Example of the fouti opcode.</title> |
| 88 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 89 | <xi:include href="examples-xml/fouti.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 90 | </example> |
| 91 | </para> |
| 92 | </refsect1> |
| 93 | |
| 94 | <refsect1> |
| 95 | <title>See also</title> |
| 96 | <para><link linkend="SigioFileIO"><citetitle>File Input and Output</citetitle></link></para> |
| 97 | </refsect1> |
| 98 | |
| 99 | <refsect1> |
| 100 | <title>Credits</title> |
| 101 | <para> |
| 102 | <simplelist> |
| 103 | <member>Author: &namegabriel;</member> |
| 104 | <member>Italy</member> |
| 105 | <member>1999</member> |
| 106 | </simplelist> |
| 107 | </para> |
| 108 | |
| 109 | <para>New in Csound version 3.56</para> |
| 110 | </refsect1> |
| 111 | </refentry> |