Debian Codegraph @

opcodes/filelen.xml

raw symbols SCIP
1
2 <refentry id="filelen">
3 <indexterm id="IndexFilelen"><primary>filelen</primary></indexterm>
4 <refentryinfo><title>Signal I/O:Soundfile Queries</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>filelen</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>filelen</refname>
13 <refpurpose>
14 Returns the length of a sound file.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Returns the length of a sound file.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ir <command>filelen</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> -- Allow raw sound files (default=1)
37 </para>
38 </refsect1>
39
40 <refsect1>
41 <title>Performance</title>
42 <para>
43 <emphasis>filelen</emphasis> returns the length of the sound file <emphasis>ifilcod</emphasis> in seconds. <emphasis>filelen</emphasis> can return the length of convolve and PVOC files if the "allow raw sound file" 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 filelen opcode. It uses the file <ulink url="examples/filelen.csd"><citetitle>filelen.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
52 <example>
53 <title>Example of the filelen opcode.</title>
54 <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>
55 <xi:include href="examples-xml/filelen.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
56 </example>
57
58 The mono audio file <quote>Mathews.wav</quote> is about 2.8 seconds long, and the stereo file <quote>drumsSlp.wav</quote> is 4.0 seconds. So <emphasis>filelen</emphasis>'s output should include a line for the mono and the stereo file like this:
59 <screen>
60 lenght of sample = 15.598 seconds
61 lenght of sample = 4.000 seconds
62 </screen>
63 </para>
64 </refsect1>
65
66 <refsect1>
67 <title>See also</title>
68 <para><link linkend="SigioQueries"><citetitle>Sound File Queries</citetitle></link></para>
69 </refsect1>
70
71 <refsect1>
72 <title>Credits</title>
73 <para>
74 <simplelist>
75 <member>Author: &namematt;</member>
76 <member>July 1999</member>
77 </simplelist>
78 </para>
79
80 <para>New in Csound version 3.57</para>
81 </refsect1>
82 </refentry>