81 lines
No EOL
6.2 KiB
HTML
81 lines
No EOL
6.2 KiB
HTML
<html><head><title>FBSineN</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>FBSineN</h1>
|
|
<div id='summary'>Feedback sine with chaotic phase indexing</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/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='subclasses'>Subclasses: <a href="../Classes/FBSineC.html">FBSineC</a>, <a href="../Classes/FBSineL.html">FBSineL</a></div>
|
|
<div id='related'>See also: <a href="./../Classes/FBSineL.html">FBSineL</a>, <a href="./../Classes/FBSineC.html">FBSineC</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>
|
|
<li class='toc2'><a href='#Undocumented%20class%20methods'>Undocumented class methods</a></li>
|
|
<ul class='toc'><li class='toc3'><a href='#*equation'>equation</a> </li>
|
|
</ul></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 non-interpolating sound generator based on the difference equations:<pre> x(n+1) = sin(im * y(n) + fb * x(n))
|
|
y(n+1) = (a * y(n) + c) % 2pi</pre>
|
|
<p>This uses a linear congruential function to drive the phase indexing of a sine wave. For <code class='code prettyprint lang-sc'>im = 1</code>, <code class='code prettyprint lang-sc'>fb = 0</code>, and <code class='code prettyprint lang-sc'>a = 1</code> a normal sinewave results.
|
|
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
|
|
var im = 1, fb = 0.1, a = 1.1, c = 0.5, xi = 0.1, yi = 0.1, size = 64;
|
|
plot(size.collect { xi = sin((im * yi) + (fb * xi)); yi = (a * yi + c) % 2pi; xi });
|
|
)</pre>
|
|
<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'>im: 1</span>, <span class='argstr'>fb: 0.1</span>, <span class='argstr'>a: 1.1</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>xi: 0.1</span>, <span class='argstr'>yi: 0.1</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
|
<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'>im<td class='argumentdesc'>
|
|
<p>Index multiplier amount<tr><td class='argumentname'>fb<td class='argumentdesc'>
|
|
<p>Feedback amount<tr><td class='argumentname'>a<td class='argumentdesc'>
|
|
<p>Phase multiplier amount<tr><td class='argumentname'>c<td class='argumentdesc'>
|
|
<p>Phase increment amount<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<tr><td class='argumentname'>mul<td class='argumentdesc'><tr><td class='argumentname'>add<td class='argumentdesc'></table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
|
|
<div id='inheritedclassmets'></div><h3><a class='anchor' name='Undocumented%20class%20methods'>Undocumented class methods</a></h3>
|
|
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*equation' href='./../Overviews/Methods.html#equation'>equation</a> </h3>
|
|
<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
|
|
{ FBSineN.ar(SampleRate.ir/4) * 0.2 }.play(s);</pre>
|
|
<pre class='code prettyprint lang-sc'>// increase feedback
|
|
{ FBSineN.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);</pre>
|
|
<pre class='code prettyprint lang-sc'>// increase phase multiplier
|
|
{ FBSineN.ar(SampleRate.ir, 1, 0, XLine.kr(1, 2, 10), 0.1) * 0.2 }.play(s);</pre>
|
|
<pre class='code prettyprint lang-sc'>// modulate frequency and index multiplier
|
|
{ FBSineN.ar(LFNoise2.kr(1, 1e4, 1e4), LFNoise2.kr(1,16,17), 1, 1.005, 0.7) * 0.2 }.play(s);</pre>
|
|
<pre class='code prettyprint lang-sc'>// randomly modulate params
|
|
(
|
|
{ FBSineN.ar(
|
|
LFNoise2.kr(1, 1e4, 1e4),
|
|
LFNoise2.kr(1, 32, 33),
|
|
LFNoise2.kr(1, 0.5),
|
|
LFNoise2.kr(1, 0.05, 1.05),
|
|
LFNoise2.kr(1, 0.3, 0.3)
|
|
) * 0.2 }.play(s);
|
|
)</pre>
|
|
|
|
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FBSineN.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FBSineN.schelp</a><br>link::Classes/FBSineN::<br>sc version: 3.8.0</div></div></body></html> |