summaryrefslogtreecommitdiff
path: root/opcodes/ftsr.xml
blob: 51e05295ae39c7467a882ac5c8b5018ed731337a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<refentry id="ftsr">
<indexterm id="IndexFtsr"><primary>ftsr</primary></indexterm>
  <refentryinfo><title>Table Control:Table Queries</title></refentryinfo>
  <refmeta>
    <refentrytitle>ftsr</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>ftsr</refname>
    <refpurpose>
      Returns the sampling-rate of a stored function table.
          </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the sampling-rate of a stored function table.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>ftsr</command>(x) (init-rate args only)</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      Returns the sampling-rate of a <link linkend="GEN01"><citetitle>GEN01</citetitle></link> generated table. The sampling-rate is determined from the header of the original file. If the original file has no header or the table was not created by these GEN01, <emphasis>ftsr</emphasis> returns 0. New in Csound version 3.49.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the ftsr opcode. It uses the file <ulink url="examples/ftsr.csd"><citetitle>ftsr.csd</citetitle></ulink>.
      <example>
        <title>Example of the ftsr opcode.</title>
        <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>
          <xi:include href="examples-xml/ftsr.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
its output should a line like these:
      <screen>
sampling-rate of table number 1 = 44100
sampling-rate of table number 2 = 22050
sampling-rate of table number 3 = 44100
sampling-rate of table number 4 = 44100
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="ftchnls"><citetitle>ftchnls</citetitle></link>,
      <link linkend="ftlen"><citetitle>ftlen</citetitle></link>,
      <link linkend="ftlptim"><citetitle>ftlptim</citetitle></link>,
      <link linkend="nsamp"><citetitle>nsamp</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namegabriel;</member>
        <member>Italy</member>
        <member>October 1998</member>
      </simplelist>
    </para>
  </refsect1>
</refentry>