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 77 78 79 80 81 82 83 84 85 86 87 88 89
|
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf380
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fnil\fcharset77 Monaco;
}
{\colortbl;\red255\green255\blue255;\red191\green0\blue0;\red0\green0\blue191;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f0\b\fs36 \cf0 RosslerL Rossler chaotic generator\
\f1\b0\fs24 \
\f0\b # x, y, z = RosslerL.ar(freq, a, b, c, h, xi, yi, zi, mul, add)\
\f1\b0 \
\f0\b freq
\f1\b0 - iteration frequency in Hertz\
\f0\b a, b, c
\f1\b0 - equation variables\
\f0\b h
\f1\b0 - integration time step\
\f0\b xi
\f1\b0 - initial value of x\
\f0\b yi
\f1\b0 - initial value of y\
\f0\b zi
\f1\b0 - initial value of z\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f2\fs18 \cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\fs24 \cf0 A strange attractor discovered by Otto Rossler based on work in chemical kinetics.
\f2\fs18 \
\f1\fs24 The system is composed of three ordinary differential equations:\
\
x' = - y - z\
y' = x + ay\
z' = b + z(x - c)
\f2\fs18 \
\
\f1\fs24 The time step amount
\f0\b h
\f1\b0 determines the rate at which the ODE is evaluated. Higher values will increase the\
rate, but cause more instability. A safe choice is the default amount of 0.05.\
\
The following examples treat RosslerL as a single-output UGen (i.e. using x only):\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f2\fs18 \cf0 \
\cf2 // vary frequency - these parameters are for "one-pulse" orbit\cf0 \
\{ \cf3 RosslerL\cf0 .ar(\cf3 MouseX\cf0 .kr(20, \cf3 SampleRate\cf0 .ir), 0.36, 0.35, 4.5) * 0.3 \}.play(s);\
\
\cf2 // randomly modulate params\cf0 \
(\
\{ \cf3 RosslerL\cf0 .ar(\
\cf3 SampleRate\cf0 .ir, \
0.2, \cf2 // First variable tends to lead to NaN if modulated in this example\cf0 \
\cf3 LFNoise0\cf0 .kr(1, 0.01, 0.2),\
\cf3 LFNoise0\cf0 .kr(1, 0.2, 0.7)\
) * 0.2 \}.play(s);\
)\
\
\cf2 // as a frequency control\cf0 \
\{ \cf3 SinOsc\cf0 .ar(\cf3 Lag\cf0 .ar(\cf3 RosslerL\cf0 .ar(\cf3 MouseX\cf0 .kr(1, 200)))*800+900)*0.4 \}.play(s);\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\fs24 \cf0 \
\
An example utilising the three different outputs as pitch, PWM and pan values (respectively):\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f2\fs18 \cf0 (\
\{\
# x,y,z = \cf3 RosslerL\cf0 .ar(\cf3 MouseX\cf0 .kr(1, 200));\
\cf3 Pan2\cf0 .ar(\cf3 Pulse\cf0 .ar(x.range(100,1000), y.range(0,1), 0.3), z)\
\}.play(s)\
)\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
\f1\fs24 \cf0 \
}
|