Debian Codegraph @

opcodes/cpsxpch.xml

raw symbols SCIP
1
2 <refentry id="cpsxpch">
3 <indexterm id="IndexCpsxpch"><primary>cpsxpch</primary></indexterm>
4 <refentryinfo><title>Pitch Converters:Tuning Opcodes</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>cpsxpch</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>cpsxpch</refname>
13
14 <refpurpose>
15 Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of any interval.
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Description</title>
21 <para>
22 Converts a pitch-class value into cycles-per-second (Hz) for equal divisions of any interval. There is a restriction of no more than 100 equal divisions.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis>icps <command>cpsxpch</command> ipch, iequal, irepeat, ibase</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 <emphasis>ipch</emphasis> -- Input number of the form 8ve.pc, indicating an 'octave' and which note in the octave.
35 </para>
36
37 <para>
38 <emphasis>iequal</emphasis> -- if positive, the number of equal intervals into which the 'octave' is divided. Must be less than or equal to 100. If negative, is the number of a table of frequency multipliers.
39 </para>
40
41 <para>
42 <emphasis>irepeat</emphasis> -- Number indicating the interval which is the 'octave.' The integer 2 corresponds to octave divisions, 3 to a twelfth, 4 is two octaves, and so on. This need not be an integer, but must be positive.
43 </para>
44
45 <para>
46 <emphasis>ibase</emphasis> -- The frequency which corresponds to pitch 0.0
47 </para>
48
49 <note>
50 <title>Note</title>
51 <para>
52 <orderedlist>
53 <listitem>
54 <para>The following are essentially the same
55 <programlisting>
56 ia <emphasis role="op">=</emphasis> <emphasis role="opc">cpspch</emphasis>(8.02)
57 ib <emphasis role="opc">cps2pch</emphasis> 8.02, 12
58 ic <emphasis role="opc">cpsxpch</emphasis> 8.02, 12, 2, 1.02197503906</programlisting>
59 </para>
60 </listitem>
61
62 <listitem>
63 <para>
64 These are opcodes not functions
65 </para>
66 </listitem>
67
68 <listitem>
69 <para>
70 Negative values of <emphasis>ipch</emphasis> are allowed, but not negative <emphasis>irepeat</emphasis>, <emphasis>iequal</emphasis> or <emphasis>ibase</emphasis>.
71 </para>
72 </listitem>
73 </orderedlist>
74 </para>
75 </note>
76 </refsect1>
77
78 <refsect1>
79 <title>Examples</title>
80 <para>
81 Here is an example of the cpsxpch opcode. It uses the file <ulink url="examples/cpsxpch.csd"><citetitle>cpsxpch.csd</citetitle></ulink>.
82
83 <example>
84 <title>Example of the cpsxpch opcode.</title>
85
86
87
88 <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>
89 <xi:include href="examples-xml/cpsxpch.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
90 </example>
91
92 Its output should include lines like this:
93 <screen>instr 1: icps = 293.666</screen>
94 </para>
95
96 <para>
97 Here is an example of the cpsxpch opcode using a 10.5 ET scale. It uses the file <ulink url="examples/cpsxpch_105et.csd"><citetitle>cpsxpch_105et.csd</citetitle></ulink>.
98
99 <example>
100 <title>Example of the cpsxpch opcode using a 10.5 ET scale.</title>
101
102 <xi:include href="examples-xml/cpsxpch_105et.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
103 </example>
104
105 Its output should include lines like this:
106 <screen>instr 1: icps = 4776.824</screen>
107 </para>
108
109 <para>
110 Here is an example of the cpsxpch opcode using a Pierce scale centered on middle A. It uses the file <ulink url="examples/cpsxpch_pierce.csd"><citetitle>cpsxpch_pierce.csd</citetitle></ulink>.
111
112 <example>
113 <title>Example of the cpsxpch opcode using a Pierce scale centered on middle A.</title>
114
115 <xi:include href="examples-xml/cpsxpch_pierce.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
116 </example>
117
118 Its output should include lines like this:
119 <screen>instr 1: icps = 2827.762</screen>
120 </para>
121 </refsect1>
122
123 <refsect1>
124 <title>See also</title>
125 <para><link linkend="PitchTuning"><citetitle>Pitch Converters: Tuning Opcodes</citetitle></link></para>
126 </refsect1>
127
128 <refsect1>
129 <title>Credits</title>
130 <para>
131 <simplelist>
132 <member>Author: &namejohn;</member>
133 <member>University of Bath/Codemist Ltd.</member>
134 <member>Bath, UK</member>
135 <member>1997</member>
136 </simplelist>
137 </para>
138
139 <para>New in Csound version 3.492</para>
140 </refsect1>
141 </refentry>