Debian Codegraph @

opcodes/crossfm.xml

raw symbols SCIP
1
2 <refentry id="crossfm">
3 <indexterm id="Indexcrossfm"><primary>crossfm</primary></indexterm>
4 <refentryinfo><title>Signal Generators:FM Synthesis</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>crossfm</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>crossfm</refname>
11 <refpurpose>
12 Two mutually frequency and/or phase modulated oscillators.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Two oscillators, mutually frequency and/or phase modulated by each other.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>a1, a2 <command>crossfm</command> xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]</synopsis>
26 <synopsis>a1, a2 <command>crossfmi</command> xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]</synopsis>
27 <synopsis>a1, a2 <command>crosspm</command> xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]</synopsis>
28 <synopsis>a1, a2 <command>crosspmi</command> xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]</synopsis>
29 <synopsis>a1, a2 <command>crossfmpm</command> xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]</synopsis>
30 <synopsis>a1, a2 <command>crossfmpmi</command> xfrq1, xfrq2, xndx1, xndx2, kcps, ifn1, ifn2 [, iphs1] [, iphs2]</synopsis>
31 </refsect1>
32
33 <refsect1>
34 <title>Initialization</title>
35 <para>
36 <emphasis>ifn1</emphasis> -- function table number for oscillator #1.
37 Requires a wrap-around guard point.
38 </para>
39 <para>
40 <emphasis>ifn2</emphasis> -- function table number for oscillator #2.
41 Requires a wrap-around guard point.
42 </para>
43 <para>
44 <emphasis>iphs1</emphasis> (optional, default=0) -- initial phase of waveform
45 in table <emphasis>ifn1</emphasis>, expressed as a fraction of a cycle (0 to 1).
46 A negative value will cause phase initialization to be skipped.
47 </para>
48 <para>
49 <emphasis>iphs2</emphasis> (optional, default=0) -- initial phase of waveform
50 in table <emphasis>ifn2</emphasis>, expressed as a fraction of a cycle (0 to 1).
51 A negative value will cause phase initialization to be skipped.
52 </para>
53 </refsect1>
54
55 <refsect1>
56 <title>Performance</title>
57 <para>
58 <emphasis>xfrq1</emphasis> -- a factor that, when multipled by the
59 <emphasis>kcps</emphasis> parameter, gives the frequency of oscillator #1.
60 </para>
61 <para>
62 <emphasis>xfrq2</emphasis> -- a factor that, when multipled by the
63 <emphasis>kcps</emphasis> parameter, gives the frequency of oscillator #2.
64 </para>
65 <para>
66 <emphasis>xndx1</emphasis> -- the index of the modulation of oscillator #2
67 by oscillator #1.
68 </para>
69 <para>
70 <emphasis>xndx2</emphasis> -- the index of the modulation of oscillator #1
71 by oscillator #2.
72 </para>
73 <para>
74 <emphasis>kcps</emphasis> -- a common denominator, in cycles per second,
75 for both oscillators frequencies.
76 </para>
77 <para>
78 <emphasis>crossfm</emphasis> implements a crossed frequency modulation
79 algorithm. The audio-rate output of oscillator #1 is used to modulate the
80 frequency input of oscillator #2 while the audio-rate output of oscillator #2
81 is used to modulate the frequency input of oscillator #1. This double feedback
82 structure produces a rich set of sounds with some chaotic behaviour.
83 <emphasis>crossfmi</emphasis> behaves like <emphasis>crossfm</emphasis>
84 except that linear interpolation is used for table lookup.
85 </para>
86 <para>
87 <emphasis>crosspm</emphasis> and <emphasis>crosspmi</emphasis> implement
88 cross phase modulation between two oscillators.
89 </para>
90 <para>
91 <emphasis>crossfmpm</emphasis> and <emphasis>crossfmpmi</emphasis>
92 implement cross frequency/phase modulation between two oscillators.
93 Oscillator #1 is frequency-modulated by oscillator #2 while oscillator #2
94 is phase-modulated by oscillator #1.
95 </para>
96 <warning>
97 <title>Warning</title>
98 <para>
99 Those opcodes may produce very rich spectra, especially with high
100 modulation indexes, and in some cases foldover aliases may occur if the
101 sampling rate is not high enough. Moreover the audio output may vary in
102 function of the sampling rate, due to the non-linearity of the algorithm.
103 In Csound, two other opcodes have this characteristic:
104 <emphasis>planet</emphasis> and <emphasis>chuap</emphasis>.
105 </para>
106 </warning>
107 </refsect1>
108
109 <refsect1>
110 <title>Examples</title>
111 <para>
112 Here is an example of the crossfm opcode. It uses the file
113 <ulink url="examples/crossfm.csd"><citetitle>crossfm.csd</citetitle></ulink>.
114 <example>
115 <title>Example of the crossfm opcode.</title>
116 <xi:include href="examples-xml/crossfm.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
117 </example>
118 </para>
119 </refsect1>
120
121 <refsect1>
122 <title>See Also</title>
123 <para>
124 <link linkend="SiggenFmsynth"><citetitle>FM Synthesis</citetitle></link>
125 </para>
126 <para> More information about frequency modulation on Wikipedia: <ulink url="http://en.wikipedia.org/wiki/Frequency_modulation_synthesis"><citetitle>http://en.wikipedia.org/wiki/Frequency_modulation_synthesis</citetitle></ulink></para>
127 <para> More information on these opcodes: <ulink url="http://www.csoundjournal.com/issue12/crossfm.html"><citetitle>http://www.csoundjournal.com/issue12/crossfm.html</citetitle></ulink>.</para>
128 </refsect1>
129
130 <refsect1>
131 <title>Credits</title>
132 <para>
133 <simplelist>
134 <member>Author: &namepinot;</member>
135 <member>2005-2009</member>
136 </simplelist>
137 <para>New in version 5.12</para>
138 </para>
139 </refsect1>
140 </refentry>