Debian Codegraph @

opcodes/fin.xml

raw symbols SCIP
1
2 <refentry id="fin">
3 <indexterm id="IndexFin"><primary>fin</primary></indexterm>
4 <refentryinfo><title>Signal I/O:File I/O</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>fin</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>fin</refname>
11 <refpurpose>
12 Read signals from a file at a-rate.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Read signals from a file at a-rate.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>fin</command> ifilename, iskipframes, iformat, ain1 [, ain2] [, ain3] [,...]</synopsis>
26 <synopsis><command>fin</command> ifilename, iskipframes, iformat, arr[]</synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Initialization</title>
31 <para>
32 <emphasis>ifilename</emphasis> -- input file name (can be a string or a handle number generated by <link linkend="fiopen"><citetitle>fiopen</citetitle></link>).
33 </para>
34
35 <para>
36 <emphasis>iskipframes</emphasis> -- number of frames to skip at the start (every frame contains a sample of each channel)
37 </para>
38
39 <para>
40 <emphasis>iformat</emphasis> -- a number specifying the input file format for headerless files.
41 <itemizedlist>
42 <listitem>
43 <para>-2 - 32 bit floating points without header</para>
44 </listitem>
45
46 <listitem>
47 <para>-1 - 16 bit integers without header</para>
48 </listitem>
49 <listitem>
50 <para>0 - take values from the header</para>
51 </listitem>
52 </itemizedlist>
53 </para>
54 </refsect1>
55
56 <refsect1>
57 <title>Performance</title>
58 <para>
59 <emphasis>fin</emphasis> (file input) is the complement of <link linkend="fout"><citetitle>fout</citetitle></link>: it reads a multichannel file to generate audio rate signals. The user must be sure that the number of channels of the input file is the same as the number of <emphasis>ainX</emphasis> arguments.
60 </para>
61 <note>
62 <para>Please note that since this opcode generates its output using input parameters (on the right side of the opcode), these variables must be initialized before use, otherwise a 'used before defined' error will occur. You can use the <link linkend="init"><citetitle>init</citetitle></link> opcode for this.</para>
63 </note>
64 </refsect1>
65
66 <refsect1>
67 <title>Examples</title>
68 <para>
69 Here is an example of the fin opcode. It uses the file <ulink url="examples/fin.csd"><citetitle>fin.csd</citetitle></ulink> and <ulink url="examples/fox.wav"><citetitle>fox.wav</citetitle></ulink>.
70 <example>
71 <title>Example of the fin opcode.</title>
72 <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>
73 <xi:include href="examples-xml/fin.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
74 </example>
75 </para>
76 </refsect1>
77
78 <refsect1>
79 <title>See also</title>
80 <para><link linkend="SigioFileIO"><citetitle>File Input and Output</citetitle></link></para>
81 </refsect1>
82
83 <refsect1>
84 <title>Credits</title>
85 <para>
86 <simplelist>
87 <member>Author: &namegabriel;</member>
88 <member>Italy</member>
89 <member>1999</member>
90 <member>Author: &namejohn;</member>
91 <member>NUIM, 2013</member>
92 </simplelist>
93 </para>
94
95 <para>New in Csound version 3.56</para>
96 <para>Array version new in 6.01</para>
97 <para>Meaning of format parameter changed in 6.15</para>
98 </refsect1>
99 </refentry>