88 lines
6.4 KiB
HTML
88 lines
6.4 KiB
HTML
|
<html><head><title>LatoocarfianL</title>
|
||
|
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
|
||
|
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
|
||
|
<link rel='stylesheet' href='./../custom.css' type='text/css' />
|
||
|
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
|
||
|
<script src='./../scdoc.js' type='text/javascript'></script>
|
||
|
<script src='./../docmap.js' type='text/javascript'></script>
|
||
|
<script src='./../prettify.js' type='text/javascript'></script>
|
||
|
<script src='./../lang-sc.js' type='text/javascript'></script>
|
||
|
<script type='text/javascript'>var helpRoot='./..';</script>
|
||
|
</head>
|
||
|
<ul id='menubar'></ul>
|
||
|
<body onload='fixTOC();prettyPrint()'>
|
||
|
<div class='contents'>
|
||
|
<div class='header'>
|
||
|
<div id='label'>SuperCollider CLASSES</div>
|
||
|
<div id='categories'><a href='./../Browse.html#UGens>Generators>Chaotic'>UGens>Generators>Chaotic</a></div>
|
||
|
<h1>LatoocarfianL</h1>
|
||
|
<div id='summary'>Latoocarfian chaotic generator</div>
|
||
|
</div>
|
||
|
<div class='subheader'>
|
||
|
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/LatoocarfianN.html">LatoocarfianN</a> : <a href="../Classes/ChaosGen.html">ChaosGen</a> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></div>
|
||
|
<div id='related'>See also: <a href="./../Classes/LatoocarfianC.html">LatoocarfianC</a>, <a href="./../Classes/LatoocarfianN.html">LatoocarfianN</a></div>
|
||
|
</div>
|
||
|
<div id='toc'>
|
||
|
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||
|
<ul class='toc'></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
|
||
|
<ul class='toc'><li class='toc3'><a href='#*ar'>ar</a> </li>
|
||
|
<li class='toc2'><a href='#Inherited%20class%20methods'>Inherited class methods</a></li>
|
||
|
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||
|
<ul class='toc'><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
|
||
|
</ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
||
|
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||
|
|
||
|
<p>A linear-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26. The function is:<pre> x(n+1) = sin(b * y(n)) + c * sin(b * x(n))
|
||
|
y(n+1) = sin(a * x(n)) + d * sin(a * y(n))</pre>
|
||
|
<p>According to Pickover, parameters <code class='code prettyprint lang-sc'>a</code> and <code class='code prettyprint lang-sc'>b</code> should be in the range from -3 to +3, and parameters <code class='code prettyprint lang-sc'>c</code> and <code class='code prettyprint lang-sc'>d</code> should be in the range from 0.5 to 1.5. The function can, depending on the parameters given, give continuous chaotic output, converge to a single value (silence) or oscillate in a cycle (tone).
|
||
|
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
|
||
|
var a = 1, b = 3, c = 0.5, d = 0.5, xi = 0.5, yi = 0.5, size = 64;
|
||
|
plot(size.collect { var x = xi;
|
||
|
xi = sin(b * yi) + (c * sin(b * xi));
|
||
|
yi = sin(a * x) + (d * sin(a * yi));
|
||
|
xi
|
||
|
});
|
||
|
)</pre>
|
||
|
<div class='note'><span class='notelabel'>NOTE:</span> This UGen is experimental and not optimized currently, so is rather hoggish of CPU.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||
|
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*ar' href='./../Overviews/Methods.html#ar'>ar</a> (<span class='argstr'>freq: 22050</span>, <span class='argstr'>a: 1</span>, <span class='argstr'>b: 3</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>d: 0.5</span>, <span class='argstr'>xi: 0.5</span>, <span class='argstr'>yi: 0.5</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||
|
<div class='supmethod'>From superclass: <a href='./../Classes/LatoocarfianN.html'>LatoocarfianN</a></div>
|
||
|
<div class='method'><h4>Arguments:</h4>
|
||
|
<table class='arguments'>
|
||
|
<tr><td class='argumentname'>freq<td class='argumentdesc'>
|
||
|
<p>Iteration frequency in Hertz<tr><td class='argumentname'>a<td class='argumentdesc'>
|
||
|
<p>Equation variable<tr><td class='argumentname'>b<td class='argumentdesc'>
|
||
|
<p>Equation variable<tr><td class='argumentname'>c<td class='argumentdesc'>
|
||
|
<p>Equation variable<tr><td class='argumentname'>d<td class='argumentdesc'>
|
||
|
<p>Equation variable<tr><td class='argumentname'>xi<td class='argumentdesc'>
|
||
|
<p>Initial value of x<tr><td class='argumentname'>yi<td class='argumentdesc'>
|
||
|
<p>Initial value of y</table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
|
||
|
<div id='inheritedclassmets'></div><h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
||
|
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
|
||
|
<div id='inheritedinstmets'></div><h2><a class='anchor' name='examples'>Examples</a></h2>
|
||
|
<pre class='code prettyprint lang-sc'>// default initial params
|
||
|
{ LatoocarfianL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);</pre>
|
||
|
<pre class='code prettyprint lang-sc'>// randomly modulate all params
|
||
|
(
|
||
|
{ LatoocarfianL.ar(
|
||
|
SampleRate.ir/4,
|
||
|
LFNoise2.kr(2,1.5,1.5),
|
||
|
LFNoise2.kr(2,1.5,1.5),
|
||
|
LFNoise2.kr(2,0.5,1.5),
|
||
|
LFNoise2.kr(2,0.5,1.5)
|
||
|
) * 0.2 }.play(s);
|
||
|
)</pre>
|
||
|
<pre class='code prettyprint lang-sc'>(
|
||
|
{ LatoocarfianL.ar(
|
||
|
SampleRate.ir/4,
|
||
|
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||
|
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2),
|
||
|
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||
|
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2),
|
||
|
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||
|
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2),
|
||
|
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||
|
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2)
|
||
|
) * 0.2 !2}.play;
|
||
|
)</pre>
|
||
|
|
||
|
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LatoocarfianL.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LatoocarfianL.schelp</a><br>link::Classes/LatoocarfianL::<br>sc version: 3.8.0</div></div></body></html>
|