Debian Codegraph @

opcodes/filenchnls.xml

raw symbols SCIP
1
2 <refentry id="filenchnls">
3 <indexterm id="IndexFilechnls"><primary>filenchnls</primary></indexterm>
4 <refentryinfo><title>Signal I/O:Soundfile Queries</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>filenchnls</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>filenchnls</refname>
13 <refpurpose>
14 Returns the number of channels in a sound file.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Returns the number of channels in a sound file.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ir <command>filenchnls</command> ifilcod [, iallowraw]</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Initialization</title>
32 <para>
33 <emphasis>ifilcod</emphasis> -- sound file to be queried
34 </para>
35 <para>
36 <emphasis>iallowraw</emphasis> -- (Optional) Allow raw sound files (default=1)
37 </para>
38 </refsect1>
39
40 <refsect1>
41 <title>Performance</title>
42 <para>
43 <emphasis>filenchnls</emphasis> returns the number of channels in the sound file <emphasis>ifilcod</emphasis>. <emphasis>filechnls</emphasis> can return the number of channels of convolve and PVOC files if the <emphasis>iallowraw</emphasis> flag is not zero (it is non-zero by default).
44 </para>
45 </refsect1>
46
47 <refsect1>
48 <title>Examples</title>
49 <para>
50 Here is an example of the filenchnls opcode. It uses the file <ulink url="examples/filenchnls.csd"><citetitle>filenchnls.csd</citetitle>, </ulink><ulink url="examples/fox.wav"><citetitle>fox.wav</citetitle></ulink>, and <ulink url="examples/drumsSlp.wav"><citetitle>drumsSlp.wav</citetitle></ulink>.
51 <example>
52 <title>Example of the filenchnls opcode.</title>
53
54
55
56 <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>
57 <xi:include href="examples-xml/filenchnls.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
58 </example>
59
60 The audio file <quote>fox.wav</quote> is monoaural (1 channel), while <quote>drumsSlp.wav</quote> is stereo (2 channels) So <emphasis>filenchnls</emphasis>'s output should include lines like this:
61 <screen>
62 number of channels = 1
63 number of channels = 2
64 </screen>
65 </para>
66 </refsect1>
67
68 <refsect1>
69 <title>See also</title>
70 <para><link linkend="SigioQueries"><citetitle>Sound File Queries</citetitle></link></para>
71 </refsect1>
72
73 <refsect1>
74 <title>Credits</title>
75 <para>
76 <simplelist>
77 <member>Author: &namematt;</member>
78 <member>July 1999</member>
79 </simplelist>
80 </para>
81
82 <para>New in Csound version 3.57</para>
83 </refsect1>
84 </refentry>