Debian Codegraph @

opcodes/cent.xml

raw symbols SCIP
1
2 <refentry id="cent">
3 <indexterm id="IndexCent"><primary>cent</primary></indexterm>
4 <refentryinfo><title>Pitch Converters:Functions</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>cent</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>cent</refname>
13 <refpurpose>
14 Calculates a factor to raise/lower a frequency by a given amount of cents.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Calculates a factor to raise/lower a frequency by a given amount of cents.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis><command>cent</command>(x) </synopsis>
28
29 <para>
30 This function works at a-rate, i-rate, and k-rate.
31 </para>
32 </refsect1>
33
34 <refsect1>
35 <title>Initialization</title>
36 <para>
37 <emphasis>x</emphasis> -- a value expressed in cents.
38 </para>
39 </refsect1>
40
41 <refsect1>
42 <title>Performance</title>
43 <para>
44 The value returned by the <emphasis>cent</emphasis> function is a factor. You can multiply a frequency by this factor to raise/lower it by the given amount of cents.
45 </para>
46 </refsect1>
47
48 <refsect1>
49 <title>Examples</title>
50 <para>
51 Here is an example of the cent opcode. It uses the file <ulink url="examples/cent.csd"><citetitle>cent.csd</citetitle></ulink>.
52
53 <example>
54 <title>Example of the cent opcode.</title>
55
56
57
58 <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>
59 <xi:include href="examples-xml/cent.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
60 </example>
61
62 Its output should include lines like:
63 <screen>
64 instr 1: iroot = 440.000
65
66 instr 2: iroot = 440.000
67 instr 2: ifactor = 1.189
68 instr 2: inew = 523.251
69
70 instr 2: iroot = 440.000
71 instr 2: ifactor = 2.000
72 instr 2: inew = 880.000</screen>
73 </para>
74 </refsect1>
75
76 <refsect1>
77 <title>See also</title>
78 <para><link linkend="PitchFuncs"><citetitle>Pitch Converters: Functions</citetitle></link></para>
79 </refsect1>
80
81 <refsect1>
82 <para>New in version 4.16</para>
83 </refsect1>
84 </refentry>