Debian Codegraph @

opcodes/lorenz.xml

raw symbols SCIP
1
2 <refentry id="lorenz">
3 <indexterm id="IndexLorenz"><primary>lorenz</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Models and Emulations</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>lorenz</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>lorenz</refname>
11 <refpurpose>
12 Implements the Lorenz system of equations.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Implements the Lorenz system of equations. The Lorenz system is a chaotic-dynamic system which was originally used to simulate the motion of a particle in convection currents and simplified weather systems. Small differences in initial conditions rapidly lead to diverging values. This is sometimes expressed as the butterfly effect. If a butterfly flaps its wings in Australia, it will have an effect on the weather in Alaska. This system is one of the milestones in the development of chaos theory. It is useful as a chaotic audio source or as a low frequency modulation source.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>ax, ay, az <command>lorenz</command> ksv, krv, kbv, kh, ix, iy, iz, iskip [, iskipinit]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>ix</emphasis>, <emphasis>iy</emphasis>, <emphasis>iz</emphasis> -- the initial coordinates of the particle.
32 </para>
33
34 <para>
35 <emphasis>iskip</emphasis> -- used to skip generated values. If <emphasis>iskip</emphasis> is set to 5, only every fifth value generated is output. This is useful in generating higher pitched tones.
36 </para>
37 <para>
38 <emphasis>iskipinit</emphasis> (optional, default=0) -- if non zero
39 skip the initialisation of the filter. (New in Csound version
40 4.23f13 and 5.0)
41 </para>
42 </refsect1>
43
44 <refsect1>
45 <title>Performance</title>
46 <para>
47 <emphasis>ksv</emphasis> -- the Prandtl number or sigma
48 </para>
49
50 <para>
51 <emphasis>krv</emphasis> -- the Rayleigh number
52 </para>
53
54 <para>
55 <emphasis>kbv</emphasis> -- the ratio of the length and width of the box in which the convection currents are generated
56 </para>
57
58 <para>
59 <emphasis>kh</emphasis> -- the step size used in approximating the differential equation. This can be used to control the pitch of the systems. Values of .1-.001 are typical.
60 </para>
61
62 <para>
63 The equations are approximated as follows:
64 <literallayout>
65 x = x + h*(s*(y - x))
66 y = y + h*(-x*z + r*x - y)
67 z = z + h*(x*y - b*z)
68 </literallayout>
69 </para>
70
71 <para>
72 The historical values of these parameters are:
73 <literallayout>
74 ks = 10
75 kr = 28
76 kb = 8/3
77 </literallayout>
78 </para>
79 <note>
80 <para>This algorithm uses internal non linear feedback loops which causes audio result to depend on the orchestra
81 sampling rate. For example, if you develop a project with <emphasis>sr</emphasis>=48000Hz and if you want to produce
82 an audio CD from it, you should record a file with <emphasis>sr</emphasis>=48000Hz and then downsample the file to 44100Hz
83 using the <link linkend="src_conv"><citetitle>src_conv</citetitle></link> utility.</para>
84 </note>
85 </refsect1>
86
87 <refsect1>
88 <title>Examples</title>
89 <para>
90 Here is an example of the lorenz opcode. It uses the file <ulink url="examples/lorenz.csd"><citetitle>lorenz.csd</citetitle></ulink>.
91
92 <example>
93 <title>Example of the lorenz opcode.</title>
94 <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>
95 <xi:include href="examples-xml/lorenz.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
96 </example>
97 </para>
98 </refsect1>
99
100 <refsect1>
101 <title>See Also</title>
102 <para>
103 <link linkend="SiggenModels"><citetitle>Models and Emulations</citetitle></link>
104 </para>
105 </refsect1>
106
107 <refsect1>
108 <title>Credits</title>
109 <para>
110 <simplelist>
111 <member>Author: &namehans;</member>
112 <member>February 1999</member>
113 </simplelist>
114 </para>
115
116 <para>New in Csound version 3.53</para>
117 <para>Note added by &namepinot;, August 2009</para>
118 </refsect1>
119 </refentry>