rsc3/doc-schelp/Help-3.12.2/Classes/CombN.html

81 lines
No EOL
7.2 KiB
HTML

<!doctype html><html lang='en'><head><title>CombN | SuperCollider 3.9.3 Help</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>
var helpRoot = './..';
var scdoc_title = 'CombN';
var scdoc_sc_version = '3.9.3';
</script>
<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>
</head>
<body onload='fixTOC();prettyPrint()'>
<div id='toc'>
<div id='toctitle'>CombN:</div>
<span class='toc_search'>Filter: <input id='toc_search'></span><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> <a href='#*kr'>kr</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><div class='contents'>
<div id='menubar'></div>
<div class='header'>
<div id='label'>
<span id='folder'>Classes</span>
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Delays'>Delays</a></span>
</div><h1>CombN<span id='superclasses'> : <a href="../Classes/PureUGen.html">PureUGen</a> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>Comb delay line with no interpolation.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Delays.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Delays.sc'>Delays.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/AllpassC.html">AllpassC</a>, <a href="../Classes/AllpassL.html">AllpassL</a>, <a href="../Classes/AllpassN.html">AllpassN</a>, <a href="../Classes/CombC.html">CombC</a>, <span id='hiddensubclasses' style='display:none;'><a href="../Classes/CombL.html">CombL</a></span><a class='subclass_toggle' href='#' onclick='javascript:showAllSubclasses(this); return false'>&hellip;&nbsp;see&nbsp;all</a></div>
<div id='related'>See also: <a href="./../Classes/CombC.html">CombC</a>, <a href="./../Classes/CombL.html">CombL</a>, <a href="./../Classes/BufCombN.html">BufCombN</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Comb delay line with no interpolation. See also <a href="./../Classes/CombL.html">CombL</a>which uses linear interpolation, and <a href="./../Classes/CombC.html">CombC</a> which uses cubic interpolation. Cubic and linear interpolation are more computationally expensive, but more accurate.
<p>This UGen will create aliasing artifacts if you modulate the delay time, which is also quantized to the nearest sample period. If these are undesirable properties, use CombL or CombC. But if your delay time is fixed and sub-sample accuracy is not needed, this is the most CPU-efficient choice with no loss in quality.
<p>The feedback coefficient is given by the equation <code class='code prettyprint lang-sc'>fb == 0.001 ** (delay / decay.abs) * decay.sign</code> where 0.001 is -60 dBFS.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>CombN.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in: 0</span>, <span class='argstr'>maxdelaytime: 0.2</span>, <span class='argstr'>delaytime: 0.2</span>, <span class='argstr'>decaytime: 1</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>CombN.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>in: 0</span>, <span class='argstr'>maxdelaytime: 0.2</span>, <span class='argstr'>delaytime: 0.2</span>, <span class='argstr'>decaytime: 1</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>in<td class='argumentdesc'>
<p>The input signal.<tr><td class='argumentname'>maxdelaytime<td class='argumentdesc'>
<p>The maximum delay time in seconds. Used to initialize the delay buffer size.<tr><td class='argumentname'>delaytime<td class='argumentdesc'>
<p>Delay time in seconds.<tr><td class='argumentname'>decaytime<td class='argumentdesc'>
<p>Time for the echoes to decay by 60 decibels. If this time is negative, then the feedback coefficient will be negative, thus emphasizing only odd harmonics at an octave lower.
<p>Large decay times are sensitive to DC bias, so use a <a href="./../Classes/LeakDC.html">LeakDC</a> if this is an issue.
<p>Infinite decay times are permitted. A decay time of <code class='code prettyprint lang-sc'>inf</code> leads to a feedback coefficient of 1, and a decay time of <code class='code prettyprint lang-sc'>-inf</code> leads to a feedback coefficient of -1.<tr><td class='argumentname'>mul<td class='argumentdesc'>
<p>Output will be multiplied by this value.<tr><td class='argumentname'>add<td class='argumentdesc'>
<p>This value will be added to the output.</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'>// These examples compare the variants, so that you can hear the difference in interpolation
// Comb used as a resonator. The resonant fundamental is equal to
// reciprocal of the delay time.
{ CombN.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play;
{ CombL.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play;
{ CombC.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play;
// with negative feedback:
{ CombN.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), -0.2) }.play;
{ CombL.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), -0.2) }.play;
{ CombC.ar(WhiteNoise.ar(0.01), 0.01, XLine.kr(0.0001, 0.01, 20), -0.2) }.play;
// used as an echo.
{ CombN.ar(Decay.ar(Dust.ar(1,0.5), 0.2, WhiteNoise.ar), 0.2, 0.2, 3) }.play;</pre>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CombN.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CombN.schelp</a><br>link::Classes/CombN::<br></div></div></body></html>