docs (scm, schelp, scrbl & html)

This commit is contained in:
nik gaffney 2022-08-24 15:53:18 +02:00
parent 98c97ee570
commit 37ac970ea6
4058 changed files with 402121 additions and 37 deletions

View file

@ -1,20 +0,0 @@
# rsc3 for Racket
This is a port of the [rsc3](http://rd.slavepianos.org/?t=rsc3) super collider client to Racket, organized as a Racket package. Used the Thu Jun 27 2013 version.
rsc3 is Written by [Rohan Drape](http://rd.slavepianos.org/), © 2008-2013
Licensed under GPL (2 or 3? FIXME)
## Install
Install with `raco pkg install rsc3`, assuming racket/bin is in PATH.
## Using
`(require rsc3)`
This also exports `send`, which is from the sosc collection. (TODO - need to fix sosc exports)

20
README.org Normal file
View file

@ -0,0 +1,20 @@
* rsc3 for Racket
This is a port of the [[http://rd.slavepianos.org/?t=rsc3][rsc3]] [[https://supercollider.github.io/][SuperCollider]] client to Racket. rsc3 is written by [[http://rd.slavepianos.org/][Rohan Drape]] and ported to Racket by [[https://khafateh.com/][Mustafa Khafateh]] based on the Thu Jun 27 2013 version. The current version of rd--rsc3 is available at [[https://gitlab.com/rd--/rsc3][gitlab]]
** Install
If you have raco installed you can Install rsc3 with =raco pkg install rsc3=
** Using
Require the module, open SuperCollider or sclang and write some synthetic audio…
#+BEGIN_SRC racket :lang racket
(require rsc3)
#+END_SRC
The names of ugens have been adapted to scheme style (e.g. =FSinOsc= to =f-sin-osc= ) but are usually obvious. Specifics can be checked in =rsc3/main.rkt= and there are some useful examples in the =rsc3/examples/= folder (some may need tweaking to work with Racket)
* Documentation
The scheme files in file:doc/help/ correspond closely to the SuperCollider help files included in the standard distribution and can easily be used alongside them (the schelp source files can be found at [[https://github.com/supercollider/supercollider/tree/develop/HelpSource][github]]). Examples from the help files, tutorials and other sources are included in the [[file:doc/][doc folder]].

View file

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<title>Broken link</title>
<link rel='stylesheet' href='./scdoc.css' type='text/css' />
<link rel='stylesheet' href='./custom.css' type='text/css' />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<noscript>
<p>Sorry, that link was broken..
</noscript>
<script type="text/javascript">
function didLoad() {
document.getElementById("link").innerHTML = window.location.hash.slice(1);
}
</script>
</head>
<body onload="didLoad()">
<div class='contents'>
<div class='header'>
<h1>Broken link!</h1>
</div>
<p>
<span class="soft">Could not find:</span>
<div id="link"></div>
</p>
</div>
</body>
</html>

View file

@ -0,0 +1,52 @@
<!doctype html>
<html lang="en">
<head>
<title>Document Browser | SuperCollider Help</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<link rel='stylesheet' href='./scdoc.css' type='text/css' />
<link rel='stylesheet' href='./custom.css' type='text/css' />
<link rel='stylesheet' href='./browse.css' type='text/css' />
<script src="lib/jquery.min.js"></script>
<script>
var scdoc_title = "Document Browser";
var scdoc_sc_version = "";
</script>
<script src="docmap.js" type="text/javascript"></script>
<script src="scdoc.js" type="text/javascript"></script>
<script src="browse.js"></script>
</head>
<body>
<noscript>
<!--<meta http-equiv="refresh" content="3; URL=Overviews/Categories.html">
<p>JavaScript is not available, redirecting to <a href="Overviews/Categories.html">static category overview</a>...-->
<p>The document browser needs JavaScript.
</noscript>
<div id="menubar"></div>
<div class='contents'>
<div class='header'>
<h1>Document Browser</h1>
<div id='summary'>Browse categories</div>
</div>
<div id="search_checks">
Filter:
<select id="menu_filter">
<option SELECTED value="all">All documents</option>
<option value="classes">Classes only</option>
<option value="reference">Reference only</option>
<option value="guides">Guides only</option>
<option value="tutorials">Tutorials only</option>
<option value="overviews">Overviews only</option>
<option value="other">Other only</option>
</select>
<input type="checkbox" id="check_extensions" checked="true">Include extensions</input>
</div>
<div id="total_count"></div>
<table class="browser" id="browser"></table>
</div>
</body>
</html>

View file

@ -0,0 +1,94 @@
<!doctype html><html lang='en'><head><title>AllpassN | 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 = 'AllpassN';
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'>AllpassN:</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>AllpassN<span id='superclasses'> : <a href="../Classes/CombN.html">CombN</a> : <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'>Schroeder allpass 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='related'>See also: <a href="./../Classes/AllpassC.html">AllpassC</a>, <a href="./../Classes/AllpassL.html">AllpassL</a>, <a href="./../Classes/BufAllpassN.html">BufAllpassN</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>A Schroeder allpass filter is given by the difference equations<pre class='code prettyprint lang-sc'>s(t) = x(t) + k * s(t - D)
y(t) = -k * s(t) + s(t - D)</pre>
<p>where <code class='code prettyprint lang-sc'>x(t)</code> is the input signal, <code class='code prettyprint lang-sc'>y(t)</code> is the output signal, <code class='code prettyprint lang-sc'>D</code> is the delay time, and <code class='code prettyprint lang-sc'>k</code> is the allpass coefficient.
<p>In this UGen, <code class='code prettyprint lang-sc'>k</code> is computed as <code class='code prettyprint lang-sc'>k == 0.001 ** (delay / decay.abs) * decay.sign</code> (0.001 is -60 dBFS).
<p>This UGen quantizes the delay time to the nearest sample period, and will produce aliasing artifacts if the delay time is modulated. If these are undesirable properties, the more CPU-expensive alternatives are <a href="./../Classes/AllpassL.html">AllpassL</a> which uses linear interpolation, and <a href="./../Classes/AllpassC.html">AllpassC</a> which uses cubic interpolation.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>AllpassN.</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>
<div class='supmethod'>From superclass: <a href='./../Classes/CombN.html'>CombN</a></div>
<h3 class='method-code'><span class='method-prefix'>AllpassN.</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='supmethod'>From superclass: <a href='./../Classes/CombN.html'>CombN</a></div>
<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.<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'>// Since the allpass delay has no audible effect as a resonator on
// steady state sound ...
{ AllpassN.ar(WhiteNoise.ar(0.1), 0.01, XLine.kr(0.0001, 0.01, 20), 0.2) }.play;
// ...these examples add the input to the effected sound and compare variants so that you can hear
// the effect of the phase comb:
(
{
z = WhiteNoise.ar(0.2);
z + AllpassN.ar(z, 0.01, XLine.kr(0.0001, 0.01, 20), 0.2)
}.play)
(
{
z = WhiteNoise.ar(0.2);
z + AllpassL.ar(z, 0.01, XLine.kr(0.0001, 0.01, 20), 0.2)
}.play)
(
{
z = WhiteNoise.ar(0.2);
z + AllpassC.ar(z, 0.01, XLine.kr(0.0001, 0.01, 20), 0.2)
}.play)
// used as an echo - doesn't really sound different than Comb,
// but it outputs the input signal immediately (inverted) and the echoes
// are lower in amplitude.
{ AllpassN.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/AllpassN.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/AllpassN.schelp</a><br>link::Classes/AllpassN::<br></div></div></body></html>

View file

@ -0,0 +1,54 @@
<html><head><title>AnalyseEvents2</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#UGens>Analysis'>UGens>Analysis</a></div>
<h1>AnalyseEvents2</h1>
<div id='summary'>event analyser (BBCut)</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/BBCut2UGens/AnalyseEvents2.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/BBCut2UGens/AnalyseEvents2.sc</a></div><div id='superclasses'>Inherits from: <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/AutoTrack.html">AutoTrack</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>
<pre class='code prettyprint lang-sc'>//This file is part of MLfftwUGens. Copyright (C) 2006 Nicholas M.Collins distributed under the terms of the GNU General Public License full notice in file MachineListening.license
//This file is part of The BBCut Library. Copyright (C) 2001 Nick M.Collins distributed under the terms of the GNU General Public License full notice in file BBCutLibrary.help</pre>
<p>On-the-fly event analyser, based on onset detection/on-the-fly analysis described in my academic papers. Best for percussive events. Recommended that you go via the <a href="./../Classes/Segmentation.html">Segmentation</a> (for one-pass) and <a href="./../Classes/AnalyseEventsDatabase.html">AnalyseEventsDatabase</a> (for on-the-fly) classes in standard usage, don't use this directly.<div class='note'><span class='notelabel'>NOTE:</span> you will need bbcut2 for further classes and capabilities. This UGen is included in sc3-plugins for cross-platform building.</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'>in</span>, <span class='argstr'>bufnum: 0</span>, <span class='argstr'>threshold: 0.34</span>, <span class='argstr'>triggerid: 101</span>, <span class='argstr'>circular: 0</span>, <span class='argstr'>pitch: 0</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>in<td class='argumentdesc'>
<p>Audio input to track<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>A buffer within which results of the analysis are place<tr><td class='argumentname'>threshold<td class='argumentdesc'>
<p>A parameter acting as the onset detector threshold, default of 0.34 was determined as the best performing over a database of percussive onset, but you might want to change this to change the sensitivity (though you always increase the risk of false positives or false negatives)<tr><td class='argumentname'>triggerid<td class='argumentdesc'>
<p>A trigger ID number used for communication from the UGen to the Lang to mark that a new event was received. Only passed for on-the-fly analysis.<tr><td class='argumentname'>circular<td class='argumentdesc'>
<p>A flag to note on-the-fly analysis assuming a circular buffer. If you only need a one-pass analysis on a file, you won't use this.<tr><td class='argumentname'>pitch<td class='argumentdesc'>
<p>Can take a .kr pitch detection UGen as input. Will take the median fundamental frequency over a note event from values recorded from this pitch input.</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>
<p>No examples are given, to discourage solo use.<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/BBCut2UGens/HelpSource/Classes/AnalyseEvents2.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/BBCut2UGens/HelpSource/Classes/AnalyseEvents2.schelp</a><br>link::Classes/AnalyseEvents2::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,88 @@
<!doctype html><html lang='en'><head><title>AppClock | 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 = 'AppClock';
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'>AppClock:</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='#*sched'>sched</a> </li>
<li class='toc3'><a href='#*clear'>clear</a> </li>
<li class='toc3'><a href='#*play'>play</a> </li>
<li class='toc3'><a href='#*tick'>tick</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></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#Scheduling'>Scheduling</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Scheduling>Clocks'>Clocks</a></span>
</div><h1>AppClock<span id='superclasses'> : <a href="../Classes/Clock.html">Clock</a> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>Clock running on main application thread</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Clock.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Clock.sc'>Clock.sc</a></div><div id='related'>See also: <a href="./../Classes/SystemClock.html">SystemClock</a>, <a href="./../Classes/TempoClock.html">TempoClock</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>SystemClock is more accurate, but cannot call GUI primitives.
<p>You will need to use the <a href="./../Classes/SystemClock.html">SystemClock</a> to get accurate/musical scheduling.
<p>See <a href="./../Classes/Clock.html">Clock</a> for general explanation of how clocks operate.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>AppClock.</span><a class='method-name' name='*sched' href='./../Overviews/Methods.html#sched'>sched</a>(<span class='argstr'>delta</span>, <span class='argstr'>item</span>)</h3>
<div class='method'>
<p>The float you return specifies the delta to resched the function for. Returning nil will stop the task from being rescheduled.<pre class='code prettyprint lang-sc'>(
AppClock.sched(0.0,{ arg time;
["AppClock has been playing for ",time].postln;
rrand(0.1,0.9);
});
)</pre>
<p><pre class='code prettyprint lang-sc'>(
AppClock.sched(2.0,{
"2.0 seconds later".postln;
nil;
});
)</pre>
</div><h3 class='method-code'><span class='method-prefix'>AppClock.</span><a class='method-name' name='*clear' href='./../Overviews/Methods.html#clear'>clear</a></h3>
<div class='method'>
<p>Clear the AppClock's scheduler to stop it.<pre class='code prettyprint lang-sc'>AppClock.clear;</pre>
</div><h3 class='method-code'><span class='method-prefix'>AppClock.</span><a class='method-name' name='*play' href='./../Overviews/Methods.html#play'>play</a>(<span class='argstr'>task</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Clock.html'>Clock</a></div>
<div class='method'>
<p>The <a href="./../Classes/Routine.html">Routine</a> (or <a href="./../Classes/Task.html">Task</a>) yields a float value indicating the delta (secs) for the AppClock to wait until resuming the Routine.<pre class='code prettyprint lang-sc'>(
var w, r;
w = Window.new("trem", Rect(512, 256, 360, 130));
w.front;
r = Routine({ arg appClockTime;
["AppClock has been playing for secs:",appClockTime].postln;
60.do({ arg i;
0.05.yield;
w.bounds = w.bounds.moveBy(10.rand2, 10.rand2);
w.alpha = cos(i*0.1pi)*0.5+0.5;
});
1.yield;
w.close;
});
AppClock.play(r);
)</pre>
</div><h3 class='method-code'><span class='method-prefix'>AppClock.</span><a class='method-name' name='*tick' href='./../Overviews/Methods.html#tick'>tick</a></h3>
<div class='method'>
<p>AppClock.tick is called periodically by the SuperCollider language interpreter. This updates the <a href="./../Classes/Scheduler.html">Scheduler</a> and causes any scheduled tasks to be executed. You should never call this method yourself.</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><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/AppClock.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/AppClock.schelp</a><br>link::Classes/AppClock::<br></div></div></body></html>

View file

@ -0,0 +1,45 @@
<!doctype html><html lang='en'><head><title>ArgNameLabel | 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 = 'ArgNameLabel';
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'>ArgNameLabel:</div>
<span class='toc_search'>Filter: <input id='toc_search'></span><ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
<li class='toc1'><a href='#classmethods'>Class methods</a></li>
<ul class='toc'><li class='toc3'><a href='#*new'>new</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></ul></div><div class='contents'>
<div id='menubar'></div>
<div class='header'>
<div id='label'>
<span id='folder'>Classes (extension)</span>
| <span id='categories'><a href='./../Browse.html#Libraries'>Libraries</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Libraries>crucial'>crucial</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Libraries>crucial>GUI'>GUI</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Libraries>crucial>GUI>utils'>utils</a></span>
</div><h1>ArgNameLabel<span id='superclasses'> : <a href="../Classes/CXAbstractLabel.html">CXAbstractLabel</a> : <a href="../Classes/SCViewHolder.html">SCViewHolder</a> : <a href="../Classes/Object.html">Object</a></span>
<div class='extension-indicator-ctr' title='This help file originates from a third-party quark or plugin for SuperCollider.'><img class='extension-indicator-icon' alt='Extension' src='./../images/plugin.png'><span class='extension-indicator-text'>Extension</span></div></h1>
<div id='summary'>simple stylized Label for displaying an argument name</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Gui/CXLabel.sc' title='/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Gui/CXLabel.sc'>CXLabel.sc</a></div></div>
<h2><a class='anchor' name='description'>Description</a></h2>
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>ArgNameLabel.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>name</span>, <span class='argstr'>layout</span>, <span class='argstr'>minWidth: 130</span>)</h3>
<div class='method'><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>name<td class='argumentdesc'><tr><td class='argumentname'>layout<td class='argumentdesc'><tr><td class='argumentname'>minWidth<td class='argumentdesc'></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><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/HelpSource/Classes/ArgNameLabel.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/HelpSource/Classes/ArgNameLabel.schelp</a><br>link::Classes/ArgNameLabel::<br></div></div></body></html>

View file

@ -0,0 +1,758 @@
<!doctype html><html lang='en'><head><title>Array | SuperCollider 3.10.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'Array';
var scdoc_sc_version = '3.10.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>Array:</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='#*new'>new</a> </li>
<li class='toc3'><a href='#*newClear'>newClear</a> </li>
<li class='toc3'><a href='#*with'>with</a> </li>
<li class='toc3'><a href='#*fill'>fill</a> </li>
<li class='toc3'><a href='#*fill2D'>fill2D</a> </li>
<li class='toc3'><a href='#*fillND'>fillND</a> </li>
<li class='toc3'><a href='#*newFrom'>newFrom</a> </li>
<li class='toc3'><a href='#*geom'>geom</a> </li>
<li class='toc3'><a href='#*series'>series</a> </li>
<li class='toc3'><a href='#*iota'>iota</a> </li>
<li class='toc3'><a href='#*interpolation'>interpolation</a> </li>
<li class='toc3'><a href='#*rand'>rand</a> </li>
<li class='toc3'><a href='#*rand2'>rand2</a> </li>
<li class='toc3'><a href='#*linrand'>linrand</a> </li>
<li class='toc3'><a href='#*exprand'>exprand</a> </li>
<li class='toc3'><a href='#*fib'>fib</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='#*fillNoteNames'>fillNoteNames</a> </li>
<li class='toc3'><a href='#*makeScale'>makeScale</a> </li>
<li class='toc3'><a href='#*makeScaleCps'>makeScaleCps</a> </li>
<li class='toc3'><a href='#*makeScaleMidi'>makeScaleMidi</a> </li>
<li class='toc3'><a href='#*makeScaleName'>makeScaleName</a> </li>
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-at'>at</a> </li>
<li class='toc3'><a href='#-put'>put</a> </li>
<li class='toc3'><a href='#-insert'>insert</a> </li>
<li class='toc3'><a href='#-clipAt'>clipAt</a> </li>
<li class='toc3'><a href='#-wrapAt'>wrapAt</a> </li>
<li class='toc3'><a href='#-foldAt'>foldAt</a> </li>
<li class='toc3'><a href='#-clipPut'>clipPut</a> </li>
<li class='toc3'><a href='#-wrapPut'>wrapPut</a> </li>
<li class='toc3'><a href='#-foldPut'>foldPut</a> </li>
<li class='toc3'><a href='#-swap'>swap</a> </li>
<li class='toc3'><a href='#-replace'>replace</a> </li>
<li class='toc3'><a href='#-++'>++</a> </li>
<li class='toc3'><a href='#-add'>add</a> </li>
<li class='toc3'><a href='#-addAll'>addAll</a> </li>
<li class='toc3'><a href='#-addFirst'>addFirst</a> </li>
<li class='toc3'><a href='#-removeAt'>removeAt</a> </li>
<li class='toc3'><a href='#-collect'>collect</a> </li>
<li class='toc3'><a href='#-do'>do</a> </li>
<li class='toc3'><a href='#-reverseDo'>reverseDo</a> </li>
<li class='toc3'><a href='#-deepCollect'>deepCollect</a> </li>
<li class='toc3'><a href='#-reshape'>reshape</a> </li>
<li class='toc3'><a href='#-windex'>windex</a> </li>
<li class='toc3'><a href='#-size'>size</a> </li>
<li class='toc3'><a href='#-normalize'>normalize</a> </li>
<li class='toc3'><a href='#-normalizeSum'>normalizeSum</a> </li>
<li class='toc3'><a href='#-plot'>plot</a> </li>
<li class='toc3'><a href='#-reverse'>reverse</a> </li>
<li class='toc3'><a href='#-scramble'>scramble</a> </li>
<li class='toc3'><a href='#-mirror'>mirror</a> </li>
<li class='toc3'><a href='#-mirror1'>mirror1</a> </li>
<li class='toc3'><a href='#-mirror2'>mirror2</a> </li>
<li class='toc3'><a href='#-stutter'>stutter</a> </li>
<li class='toc3'><a href='#-rotate'>rotate</a> </li>
<li class='toc3'><a href='#-pyramid'>pyramid</a> </li>
<li class='toc3'><a href='#-pyramidg'>pyramidg</a> </li>
<li class='toc3'><a href='#-sputter'>sputter</a> </li>
<li class='toc3'><a href='#-lace'>lace</a> </li>
<li class='toc3'><a href='#-permute'>permute</a> </li>
<li class='toc3'><a href='#-allTuples'>allTuples</a> </li>
<li class='toc3'><a href='#-wrapExtend'>wrapExtend</a> </li>
<li class='toc3'><a href='#-foldExtend'>foldExtend</a> </li>
<li class='toc3'><a href='#-clipExtend'>clipExtend</a> </li>
<li class='toc3'><a href='#-slide'>slide</a> </li>
<li class='toc3'><a href='#-shift'>shift</a> </li>
<li class='toc3'><a href='#-containsSeqColl'>containsSeqColl</a> </li>
<li class='toc3'><a href='#-powerset'>powerset</a> </li>
<li class='toc3'><a href='#-envirPairs'>envirPairs</a> </li>
<li class='toc3'><a href='#-flop'>flop</a> </li>
<li class='toc3'><a href='#-multiChannelExpand'>multiChannelExpand</a> </li>
<li class='toc3'><a href='#-source'>source</a> </li>
<li class='toc3'><a href='#-fork'>fork</a> </li>
<li class='toc3'><a href='#-dpoll'>dpoll</a> </li>
<li class='toc3'><a href='#-atIdentityHash'>atIdentityHash</a> </li>
<li class='toc3'><a href='#-atIdentityHashInPairs'>atIdentityHashInPairs</a> </li>
<li class='toc3'><a href='#-asString'>asString</a> </li>
<li class='toc3'><a href='#-asCompileString'>asCompileString</a> </li>
<li class='toc3'><a href='#-isValidUGenInput'>isValidUGenInput</a> </li>
<li class='toc3'><a href='#-asRawOSC'>asRawOSC</a> </li>
<li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-allSplineIntControls'>allSplineIntControls</a> </li>
<li class='toc3'><a href='#-asActionFunc'>asActionFunc</a> </li>
<li class='toc3'><a href='#-asAudioRateInput'>asAudioRateInput</a> </li>
<li class='toc3'><a href='#-asControlInput'>asControlInput</a> </li>
<li class='toc3'><a href='#-asNote'>asNote</a> </li>
<li class='toc3'><a href='#-asSpec'>asSpec</a> </li>
<li class='toc3'><a href='#-asUGenInput'>asUGenInput</a> </li>
<li class='toc3'><a href='#-atB'>atB</a> </li>
<li class='toc3'><a href='#-atH'>atH</a> </li>
<li class='toc3'><a href='#-atL'>atL</a> </li>
<li class='toc3'><a href='#-atQ'>atQ</a> </li>
<li class='toc3'><a href='#-atS'>atS</a> </li>
<li class='toc3'><a href='#-atSin'>atSin</a> </li>
<li class='toc3'><a href='#-bSplineInt'>bSplineInt</a> </li>
<li class='toc3'><a href='#-bSplineInt2'>bSplineInt2</a> </li>
<li class='toc3'><a href='#-bSplineIntControls'>bSplineIntControls</a> </li>
<li class='toc3'><a href='#-bSplineIntDeltaControls'>bSplineIntDeltaControls</a> </li>
<li class='toc3'><a href='#-buildForProxy'>buildForProxy</a> </li>
<li class='toc3'><a href='#-cpsname'>cpsname</a> </li>
<li class='toc3'><a href='#-deinterlace'>deinterlace</a> </li>
<li class='toc3'><a href='#-envAt'>envAt</a> </li>
<li class='toc3'><a href='#-fastAtL'>fastAtL</a> </li>
<li class='toc3'><a href='#-fillEnds'>fillEnds</a> </li>
<li class='toc3'><a href='#-findReplace'>findReplace</a> </li>
<li class='toc3'><a href='#-ghostAt'>ghostAt</a> </li>
<li class='toc3'><a href='#-hermiteInt'>hermiteInt</a> </li>
<li class='toc3'><a href='#-intAt'>intAt</a> </li>
<li class='toc3'><a href='#-interlace'>interlace</a> </li>
<li class='toc3'><a href='#-interpolate'>interpolate</a> </li>
<li class='toc3'><a href='#-linearInt'>linearInt</a> </li>
<li class='toc3'><a href='#-madd'>madd</a> </li>
<li class='toc3'><a href='#-midiname'>midiname</a> </li>
<li class='toc3'><a href='#-modeAt'>modeAt</a> </li>
<li class='toc3'><a href='#-namecps'>namecps</a> </li>
<li class='toc3'><a href='#-namemidi'>namemidi</a> </li>
<li class='toc3'><a href='#-namename'>namename</a> </li>
<li class='toc3'><a href='#-numChannels'>numChannels</a> </li>
<li class='toc3'><a href='#-poll'>poll</a> </li>
<li class='toc3'><a href='#-prUnarchive'>prUnarchive</a> </li>
<li class='toc3'><a href='#-prUnlace'>prUnlace</a> </li>
<li class='toc3'><a href='#-proxyControlClass'>proxyControlClass</a> </li>
<li class='toc3'><a href='#-quadInt'>quadInt</a> </li>
<li class='toc3'><a href='#-quadIntControl'>quadIntControl</a> </li>
<li class='toc3'><a href='#-quadIntFunction'>quadIntFunction</a> </li>
<li class='toc3'><a href='#-resize'>resize</a> </li>
<li class='toc3'><a href='#-rotateL'>rotateL</a> </li>
<li class='toc3'><a href='#-rotateN'>rotateN</a> </li>
<li class='toc3'><a href='#-rotateS'>rotateS</a> </li>
<li class='toc3'><a href='#-scope'>scope</a> </li>
<li class='toc3'><a href='#-selectFindString'>selectFindString</a> </li>
<li class='toc3'><a href='#-sineInt'>sineInt</a> </li>
<li class='toc3'><a href='#-splineInt'>splineInt</a> </li>
<li class='toc3'><a href='#-splineIntControls'>splineIntControls</a> </li>
<li class='toc3'><a href='#-splineIntFunction'>splineIntFunction</a> </li>
<li class='toc3'><a href='#-splineIntFunctionArray'>splineIntFunctionArray</a> </li>
<li class='toc3'><a href='#-splineIntPart1'>splineIntPart1</a> </li>
<li class='toc3'><a href='#-splineIntPart2'>splineIntPart2</a> </li>
<li class='toc3'><a href='#-unlace'>unlace</a> </li>
</ul></ul></ul></div><div id='menubar'></div>
<div class='contents'>
<div class='header'>
<div id='label'>
<span id='folder'>Classes</span>
| <span id='categories'><a href='./../Browse.html#Collections'>Collections</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Collections>Ordered'>Ordered</a></span>
</div><h1>Array<span id='superclasses'> : <a href="../Classes/ArrayedCollection.html">ArrayedCollection</a> : <a href="../Classes/SequenceableCollection.html">SequenceableCollection</a> : <a href="../Classes/Collection.html">Collection</a> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>fixed size collection</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/Array.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/Array.sc'>Array.sc</a></div><div id='related'>See also: <a href="./../Reference/Literals.html">Literals</a>, <a href="./../Classes/List.html">List</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Arrays are ArrayedCollections whose slots may contain any object. Arrays have a fixed maximum size beyond which they cannot grow. For expandable arrays, use the <a href="./../Classes/List.html">List</a> class.
<p><strong>Literal Arrays</strong> can be created at compile time, and are very efficient. See <a href="./../Reference/Literals.html">Literals</a> for information.
<p>For handling <strong>multidimensional arrays</strong>, there are specific methods which are covered in the helpfile <a href="./../Guides/J-concepts-in-SC.html">J concepts in SC</a>.<div class='note'><span class='notelabel'>NOTE:</span> For Arrays, the <code>add</code> method may or may not return the same Array object. It will add the argument to the receiver if there is space, otherwise it returns a new Array object with the argument added. Thus the proper usage of <code>add</code> with an Array is to always assign the result as follows:<textarea class='editor'> z = z.add(obj);</textarea>
<p>This allows an efficient use of resources, only growing the array when it needs to. The <a href="./../Classes/List.html">List</a> class manages the Array internally, and in many cases is more suitable.</div>
<p>Elements can be put into an existing slot with <code>a.put(2,obj)</code> and accessed with <code>a.at(2)</code> or <code>a[2]</code>
<p>See <a href="./../Classes/ArrayedCollection.html">ArrayedCollection</a> for the principal methods: at, put, clipAt, wrapAt, etc...<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>maxSize: 0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
<div class='method'>
<p>Create a new array with size 0 that can grow up to the fixed size.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>maxSize<td class='argumentdesc'>
<p>The maximum size of the array.</table></div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*newClear' href='./../Overviews/Methods.html#newClear'>newClear</a>(<span class='argstr'>indexedSize: 0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Create a new array with all slots filled with nils.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>indexedSize<td class='argumentdesc'>
<p>The size of the array.</table></div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*with' href='./../Overviews/Methods.html#with'>with</a>( <span class='argstr'>... args</span>)</h3>
<div class='method'>
<p>Create a new Array whose slots are filled with the given arguments. This is the same as the method in ArrayedCollection, but is reimplemented here to be more efficient.<textarea class='editor'>Array.with(7, 'eight', 9).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*fill' href='./../Overviews/Methods.html#fill'>fill</a>(<span class='argstr'>size</span>, <span class='argstr'>function</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Collection.html'>Collection</a></div>
<div class='method'>
<p>Creates a Collection of the given size, the elements of which are determined by evaluation the given function. The function is passed the index as an argument.<textarea class='editor'>Array.fill(4, { arg i; i * 2 });
Bag.fill(14, { arg i; i.rand });</textarea>
<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>size<td class='argumentdesc'>
<p>The size of the collection which is returned. If nil, it returns an empty collection. If an array of sizes is given, the resulting collection has the appropriate dimensions (see: <a href="#*fillND).">*fillND).</a><textarea class='editor'>Array.fill([2, 2, 3], { arg i, j, k; i * 100 + (j * 10) + k });</textarea>
<tr><td class='argumentname'>function<td class='argumentdesc'>
<p>The function which is called for each new element - the index is passed in as a first argument. The function be anything that responds to the message "value".<textarea class='editor'>Array.fill(10, { arg i; 2 ** i });
Array.fill(10, Pxrand([0, 1, 2], inf).iter);
Array.fill(10, 7); // an object that doesn't respond with a new value is just repeatedly added.</textarea>
</table></div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*fill2D' href='./../Overviews/Methods.html#fill2D'>fill2D</a>(<span class='argstr'>rows</span>, <span class='argstr'>cols</span>, <span class='argstr'>function</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Collection.html'>Collection</a></div>
<div class='method'>
<p>Creates a 2 dimensional Collection of the given sizes. The items are determined by evaluation of the supplied function. The function is passed row and column indexes as arguments. See <a href="./../Guides/J-concepts-in-SC.html">J concepts in SC</a><textarea class='editor'>Array.fill2D(2, 4, 0);
Array.fill2D(3, 4, { arg r, c; r*c+c; });</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*fillND' href='./../Overviews/Methods.html#fillND'>fillND</a>(<span class='argstr'>dimensions</span>, <span class='argstr'>function</span>, <span class='argstr'>args: [ ]</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Collection.html'>Collection</a></div>
<div class='method'>
<p>Creates a N dimensional Collection where N is the size of the array <strong>dimensions</strong>. The items are determined by evaluation of the supplied function. The function is passed N number of indexes as arguments. See <a href="./../Guides/J-concepts-in-SC.html">J concepts in SC</a><textarea class='editor'>Array.fillND([4, 4], { arg a, b; a+b; }); // 2D
Array.fillND([4, 4, 4], { arg a, b, c; a+b*c; }); // 3D
Array.fillND([1, 2, 3, 4], { arg a, b, c, d; b+d; }); // 4D</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*newFrom' href='./../Overviews/Methods.html#newFrom'>newFrom</a>(<span class='argstr'>aCollection</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Collection.html'>Collection</a></div>
<div class='method'>
<p>Creates a new Collection from another collection. This supports the interface for the method "as".<textarea class='editor'>Array.newFrom(Set[4, 2, 1]);
Set.newFrom(Array[4, 2, 1]);
[1, 2, 3, 4, 3, 2].as(Set); // as(someClass) calls someClass.newFrom(this)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*geom' href='./../Overviews/Methods.html#geom'>geom</a>(<span class='argstr'>size</span>, <span class='argstr'>start</span>, <span class='argstr'>grow</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill an ArrayedCollection with a geometric series.<textarea class='editor'>Array.geom(5, 1, 3).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*series' href='./../Overviews/Methods.html#series'>series</a>(<span class='argstr'>size</span>, <span class='argstr'>start: 0</span>, <span class='argstr'>step: 1</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill an ArrayedCollection with an arithmetic series.<textarea class='editor'>Array.series(5, 10, 2).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*iota' href='./../Overviews/Methods.html#iota'>iota</a>( <span class='argstr'>... sizes</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Fills an ArrayedCollection with a counter. See <a href="./../Guides/J-concepts-in-SC.html">J concepts in SC</a> for more examples.<textarea class='editor'>Array.iota(2, 3);
Array.iota(2, 3, 4);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*interpolation' href='./../Overviews/Methods.html#interpolation'>interpolation</a>(<span class='argstr'>size</span>, <span class='argstr'>start: 0.0</span>, <span class='argstr'>end: 1.0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill a SequenceableCollection with the interpolated values between the <strong>start</strong> and <strong>end</strong> values.<textarea class='editor'>Array.interpolation(5, 3.2, 20.5);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*rand' href='./../Overviews/Methods.html#rand'>rand</a>(<span class='argstr'>size</span>, <span class='argstr'>minVal</span>, <span class='argstr'>maxVal</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill a SequenceableCollection with random values in the range <strong>minVal</strong> to <strong>maxVal</strong>.<textarea class='editor'>Array.rand(8, 1, 100);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*rand2' href='./../Overviews/Methods.html#rand2'>rand2</a>(<span class='argstr'>size</span>, <span class='argstr'>val</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill a SequenceableCollection with random values in the range -<strong>val</strong> to +<strong>val</strong>.<textarea class='editor'>Array.rand2(8, 100);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*linrand' href='./../Overviews/Methods.html#linrand'>linrand</a>(<span class='argstr'>size</span>, <span class='argstr'>minVal</span>, <span class='argstr'>maxVal</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill a SequenceableCollection with random values in the range <strong>minVal</strong> to <strong>maxVal</strong> with a linear distribution.<textarea class='editor'>Array.linrand(8, 1, 100);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*exprand' href='./../Overviews/Methods.html#exprand'>exprand</a>(<span class='argstr'>size</span>, <span class='argstr'>minVal</span>, <span class='argstr'>maxVal</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill a SequenceableCollection with random values in the range <strong>minVal</strong> to <strong>maxVal</strong> with exponential distribution.<textarea class='editor'>Array.exprand(8, 1, 100);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*fib' href='./../Overviews/Methods.html#fib'>fib</a>(<span class='argstr'>size</span>, <span class='argstr'>a: 0.0</span>, <span class='argstr'>b: 1.0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/SequenceableCollection.html'>SequenceableCollection</a></div>
<div class='method'>
<p>Fill a SequenceableCollection with a fibonacci series.<textarea class='editor'>Array.fib(5);
Array.fib(5, 2, 32); // start from 32 with step 2.</textarea>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>size<td class='argumentdesc'>
<p>the number of values in the collection<tr><td class='argumentname'>a<td class='argumentdesc'>
<p>the starting step value<tr><td class='argumentname'>b<td class='argumentdesc'>
<p>the starting value</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='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*fillNoteNames' href='./../Overviews/Methods.html#fillNoteNames'>fillNoteNames</a>(<span class='argstr'>startNote: "C3"</span>, <span class='argstr'>endNote: "B3"</span>, <span class='argstr'>step: 1</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*makeScale' href='./../Overviews/Methods.html#makeScale'>makeScale</a>(<span class='argstr'>groundNote: "C3"</span>, <span class='argstr'>type: 'major'</span>, <span class='argstr'>startNote</span>, <span class='argstr'>endNote</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*makeScaleCps' href='./../Overviews/Methods.html#makeScaleCps'>makeScaleCps</a>(<span class='argstr'>groundNote: 261.62556530114</span>, <span class='argstr'>type: 'major'</span>, <span class='argstr'>startNote</span>, <span class='argstr'>endNote</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*makeScaleMidi' href='./../Overviews/Methods.html#makeScaleMidi'>makeScaleMidi</a>(<span class='argstr'>groundNote: 60</span>, <span class='argstr'>type: 'major'</span>, <span class='argstr'>startNote</span>, <span class='argstr'>endNote</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>Array.</span><a class='method-name' name='*makeScaleName' href='./../Overviews/Methods.html#makeScaleName'>makeScaleName</a>(<span class='argstr'>groundNote: "C3"</span>, <span class='argstr'>type: 'major'</span>, <span class='argstr'>startNote</span>, <span class='argstr'>endNote</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-at' href='./../Overviews/Methods.html#at'>at</a>(<span class='argstr'>index</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Return the item at <strong>index</strong>.
<p>The index can also be an Array of indices to extract specified elements. Example:<textarea class='editor'>x = [10,20,30];
y = [0,0,2,2,1];
x[y]; // returns [ 10, 10, 30, 30, 20 ]</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-put' href='./../Overviews/Methods.html#put'>put</a>(<span class='argstr'>index</span>, <span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Put <strong>item</strong> at <strong>index</strong>, replacing what is there.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-insert' href='./../Overviews/Methods.html#insert'>insert</a>(<span class='argstr'>index</span>, <span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Inserts the item into the contents of the receiver. This method may return a new ArrayedCollection. For this reason, you should always assign the result of <code>insert</code> to a variable - never depend on add changing the receiver.<textarea class='editor'>(
// in this case a new object is returned
var y, z;
z = [1, 2, 3, 4];
y = z.insert(1, 999);
z.postln;
y.postln;
)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-clipAt' href='./../Overviews/Methods.html#clipAt'>clipAt</a>(<span class='argstr'>index</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Same as <a href="#-at">-at</a>, but values for <strong>index</strong> greater than the size of the ArrayedCollection will be clipped to the last index.<textarea class='editor'>y = [ 1, 2, 3 ];
y.clipAt(13).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-wrapAt' href='./../Overviews/Methods.html#wrapAt'>wrapAt</a>(<span class='argstr'>index</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Same as <a href="#-at">-at</a>, but values for <strong>index</strong> greater than the size of the ArrayedCollection will be wrapped around to 0.<textarea class='editor'>y = [ 1, 2, 3 ];
y.wrapAt(3).postln; // this returns the value at index 0
y.wrapAt(4).postln; // this returns the value at index 1
y.wrapAt([-2, 1]) // index can also be a collection or negative numbers</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-foldAt' href='./../Overviews/Methods.html#foldAt'>foldAt</a>(<span class='argstr'>index</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Same as <a href="#-at">-at</a>, but values for <strong>index</strong> greater than the size of the ArrayedCollection will be folded back.<textarea class='editor'>y = [ 1, 2, 3 ];
y.foldAt(3).postln; // this returns the value at index 1
y.foldAt(4).postln; // this returns the value at index 0
y.foldAt(5).postln; // this returns the value at index 1</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-clipPut' href='./../Overviews/Methods.html#clipPut'>clipPut</a>(<span class='argstr'>index</span>, <span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Same as <a href="#-put">-put</a>, but values for <strong>index</strong> greater than the size of the ArrayedCollection will be clipped to the last index.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-wrapPut' href='./../Overviews/Methods.html#wrapPut'>wrapPut</a>(<span class='argstr'>index</span>, <span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Same as <a href="#-put">-put</a>, but values for <strong>index</strong> greater than the size of the ArrayedCollection will be wrapped around to 0.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-foldPut' href='./../Overviews/Methods.html#foldPut'>foldPut</a>(<span class='argstr'>index</span>, <span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Same as <a href="#-put">-put</a>, but values for <strong>index</strong> greater than the size of the ArrayedCollection will be folded back.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-swap' href='./../Overviews/Methods.html#swap'>swap</a>(<span class='argstr'>i</span>, <span class='argstr'>j</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Swap the values at indices i and j.<textarea class='editor'>[ 1, 2, 3 ].swap(0, 2).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-replace' href='./../Overviews/Methods.html#replace'>replace</a>(<span class='argstr'>find</span>, <span class='argstr'>replace</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Return a new array in which a number of elements have been replaced by another.<textarea class='editor'>a = (0..10) ++ (0..10);
a.replace([4, 5, 6], 100);
a.replace([4, 5, 6], [1734, 1985, 1860]);</textarea>
<p>this method is inherited by <a href="./../Classes/String.html">String</a> :<textarea class='editor'>a = "hello world";
a.replace("world", "word");</textarea>
</div><h3 class='method-code'><span class='method-prefix'></span><a class='method-name' name='-++' href='./../Overviews/Methods.html#++'>++</a>(<span class='argstr'>anArray</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Concatenate the contents of the two collections into a new ArrayedCollection.<textarea class='editor'>(
var y, z;
z = [1, 2, 3, 4];
y = z ++ [7, 8, 9];
z.postln;
y.postln;
)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-add' href='./../Overviews/Methods.html#add'>add</a>(<span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Adds an item to an ArrayedCollection if there is space. This method may return a new ArrayedCollection. For this reason, you should always assign the result of add to a variable - never depend on <code>add</code> changing the receiver.<textarea class='editor'>(
// z and y are the same object
var y, z;
z = [1, 2, 3];
y = z.add(4);
z.postln;
y.postln;
)
(
// in this case a new object is returned
var y, z;
z = [1, 2, 3, 4];
y = z.add(5);
z.postln;
y.postln;
)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-addAll' href='./../Overviews/Methods.html#addAll'>addAll</a>(<span class='argstr'>aCollection</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Adds all the elements of aCollection to the contents of the receiver. This method may return a new ArrayedCollection. For this reason, you should always assign the result of <code>addAll</code> to a variable - never depend on add changing the receiver.<textarea class='editor'>(
// in this case a new object is returned
var y, z;
z = [1, 2, 3, 4];
y = z.addAll([7, 8, 9]);
z.postln;
y.postln;
)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-addFirst' href='./../Overviews/Methods.html#addFirst'>addFirst</a>(<span class='argstr'>item</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Inserts the item before the contents of the receiver, possibly returning a new collection.<textarea class='editor'>(
// in this case a new object is returned
var y, z;
z = [1, 2, 3, 4];
y = z.addFirst(999);
z.postln;
y.postln;
)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-removeAt' href='./../Overviews/Methods.html#removeAt'>removeAt</a>(<span class='argstr'>index</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Remove and return the element at <strong>index</strong>, shrinking the size of the ArrayedCollection.<textarea class='editor'>y = [ 1, 2, 3 ];
y.removeAt(1);
y.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-collect' href='./../Overviews/Methods.html#collect'>collect</a>(<span class='argstr'>function</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Collection.html'>Collection</a></div>
<div class='method'>
<p>Answer a new collection which consists of the results of function evaluated for each item in the collection. The function is passed two arguments, the item and an integer index. See <a href="./../Classes/Collection.html">Collection</a> helpfile for examples.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-do' href='./../Overviews/Methods.html#do'>do</a>(<span class='argstr'>function</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Iterate over the elements in order, calling the function for each element. The function is passed two arguments, the element and an index.<textarea class='editor'>['a', 'b', 'c'].do({ arg item, i; [i, item].postln; });</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-reverseDo' href='./../Overviews/Methods.html#reverseDo'>reverseDo</a>(<span class='argstr'>function</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Iterate over the elements in reverse order, calling the function for each element. The function is passed two arguments, the element and an index.<textarea class='editor'>['a', 'b', 'c'].reverseDo({ arg item, i; [i, item].postln; });</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-deepCollect' href='./../Overviews/Methods.html#deepCollect'>deepCollect</a>(<span class='argstr'>depth: 1</span>, <span class='argstr'>function</span>, <span class='argstr'>index: 0</span>, <span class='argstr'>rank: 0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>The same as <a href="#-collect">-collect</a>, but can look inside sub-arrays up to the specified <strong>depth</strong>.<textarea class='editor'>a = [99, [4,6,5], [[32]]];
a.deepCollect(1, {|item| item.isArray}).postln;
a.deepCollect(2, {|item| item.isArray}).postln;
a.deepCollect(3, {|item| item.isArray}).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-reshape' href='./../Overviews/Methods.html#reshape'>reshape</a>( <span class='argstr'>... shape</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>For a multidimensional array, rearranges the data using the desired number of elements along each dimension. The data may be extended using wrapExtend if needed.<textarea class='editor'>a = [4,7,6,8];
a.reshape(2,2);
a.reshape(2,3);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-windex' href='./../Overviews/Methods.html#windex'>windex</a></h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Interprets the array as a list of probabilities which should sum to 1.0 and returns a random index value based on those probabilities.<textarea class='editor'>(
Array.fill(10, {
[0.1, 0.6, 0.3].windex;
}).postln;
)</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-size' href='./../Overviews/Methods.html#size'>size</a></h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Return the number of elements the ArrayedCollection.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-normalize' href='./../Overviews/Methods.html#normalize'>normalize</a>(<span class='argstr'>min: 0.0</span>, <span class='argstr'>max: 1.0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Returns a new Array with the receiver items normalized between <strong>min</strong> and <strong>max</strong>.<textarea class='editor'>[1, 2, 3].normalize; //default min=0, max= 1
[1, 2, 3].normalize(-20, 10);</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-normalizeSum' href='./../Overviews/Methods.html#normalizeSum'>normalizeSum</a></h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Returns the Array resulting from :<textarea class='editor'>(this / this.sum)</textarea>
<p>so that the array will sum to 1.0.
<p>This is useful for using with windex or wchoose.<textarea class='editor'>[1, 2, 3].normalizeSum.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-plot' href='./../Overviews/Methods.html#plot'>plot</a>(<span class='argstr'>name</span>, <span class='argstr'>bounds</span>, <span class='argstr'>discrete: false</span>, <span class='argstr'>numChannels</span>, <span class='argstr'>minval</span>, <span class='argstr'>maxval</span>, <span class='argstr'>separately: true</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/ArrayedCollection.html'>ArrayedCollection</a></div>
<div class='method'>
<p>Plot values in a GUI window. See <a href="./../Reference/plot.html">plot</a> for more details. When the receiver contains <code>nil</code> items, the plot fails with an error.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-reverse' href='./../Overviews/Methods.html#reverse'>reverse</a></h3>
<div class='method'>
<p>Returns a new Array whose elements are reversed. The receiver is unchanged.<textarea class='editor'>x = [1, 2, 3];
z = x.reverse;
x.postln;
z.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-scramble' href='./../Overviews/Methods.html#scramble'>scramble</a></h3>
<div class='method'>
<p>Returns a new Array whose elements have been scrambled. The receiver is unchanged.<textarea class='editor'>[1, 2, 3, 4, 5, 6].scramble.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-mirror' href='./../Overviews/Methods.html#mirror'>mirror</a></h3>
<div class='method'>
<p>Return a new Array which is the receiver made into a palindrome. The receiver is unchanged.<textarea class='editor'>[1, 2, 3, 4].mirror.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-mirror1' href='./../Overviews/Methods.html#mirror1'>mirror1</a></h3>
<div class='method'>
<p>Return a new Array which is the receiver made into a palindrome with the last element removed. This is useful if the list will be repeated cyclically, the first element will not get played twice. The receiver is unchanged.<textarea class='editor'>[1, 2, 3, 4].mirror1.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-mirror2' href='./../Overviews/Methods.html#mirror2'>mirror2</a></h3>
<div class='method'>
<p>Return a new Array which is the receiver concatenated with a reversal of itself. The center element is duplicated. The receiver is unchanged.<textarea class='editor'>[1, 2, 3, 4].mirror2.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-stutter' href='./../Overviews/Methods.html#stutter'>stutter</a>(<span class='argstr'>n: 2</span>)</h3>
<div class='method'>
<p>Return a new Array whose elements are repeated n times. The receiver is unchanged.<textarea class='editor'>[1, 2, 3].stutter(2).postln;</textarea>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>n<td class='argumentdesc'>
<p>Number of repeats.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-rotate' href='./../Overviews/Methods.html#rotate'>rotate</a>(<span class='argstr'>n: 1</span>)</h3>
<div class='method'>
<p>Return a new Array whose elements are in rotated order. The receiver is unchanged.<textarea class='editor'>[1, 2, 3, 4, 5].rotate(1).postln;
[1, 2, 3, 4, 5].rotate(-1).postln;
[1, 2, 3, 4, 5].rotate(3).postln;</textarea>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>n<td class='argumentdesc'>
<p>Number of elements to rotate. Negative n values rotate left, positive n values rotate right.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pyramid' href='./../Overviews/Methods.html#pyramid'>pyramid</a>(<span class='argstr'>patternType: 1</span>)</h3>
<div class='method'>
<p>Return a new Array whose elements have been reordered via one of 10 "counting" algorithms. Run the examples to see the algorithms.<textarea class='editor'>10.do({ arg i;
[1, 2, 3, 4].pyramid(i + 1).postcs;
});</textarea>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>patternType<td class='argumentdesc'>
<p>Choose counting algorithm. The algorithms are numbered 1 through 10.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pyramidg' href='./../Overviews/Methods.html#pyramidg'>pyramidg</a>(<span class='argstr'>patternType: 1</span>)</h3>
<div class='method'>
<p>Like pyramid, but keep the resulting values grouped in subarrays.<textarea class='editor'>// compare:
[1, 2, 3, 4].pyramid(1).postln;
[1, 2, 3, 4].pyramidg(1).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sputter' href='./../Overviews/Methods.html#sputter'>sputter</a>(<span class='argstr'>probability: 0.25</span>, <span class='argstr'>maxlen: 100</span>)</h3>
<div class='method'>
<p>Return a new Array of length maxlen with the items partly repeated (random choice of given probability).<textarea class='editor'>// compare:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].sputter(0.5, 16).postln;
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].sputter(0.8, 8).postln;</textarea>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>probability<td class='argumentdesc'>
<p>Probability of repeat.<tr><td class='argumentname'>maxlen<td class='argumentdesc'>
<p>The length of the new Array.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-lace' href='./../Overviews/Methods.html#lace'>lace</a>(<span class='argstr'>length</span>)</h3>
<div class='method'>
<p>Returns a new Array whose elements are interlaced sequences of the elements of the receiver's subcollections, up to size length. The receiver is unchanged.<textarea class='editor'>x = [ [1, 2, 3], 6, List["foo", 'bar']];
y = x.lace(12);
x.postln;
y.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-permute' href='./../Overviews/Methods.html#permute'>permute</a>(<span class='argstr'>nthPermutation</span>)</h3>
<div class='method'>
<p>Returns a new Array whose elements are the nthPermutation of the elements of the receiver. The receiver is unchanged.<textarea class='editor'>x = [ 1, 2, 3];
6.do({|i| x.permute(i).postln;});</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allTuples' href='./../Overviews/Methods.html#allTuples'>allTuples</a>(<span class='argstr'>maxTuples: 16384</span>)</h3>
<div class='method'>
<p>Returns a new Array whose elements contain all possible combinations of the receiver's subcollections.<textarea class='editor'>[[1, 2, 3, 4, 5], [10, 20, 30]].allTuples;
[[1, 2, 3, 4, 5], [10, 20, 30], [5, 6]].allTuples;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-wrapExtend' href='./../Overviews/Methods.html#wrapExtend'>wrapExtend</a>(<span class='argstr'>length</span>)</h3>
<div class='method'>
<p>Returns a new Array whose elements are repeated sequences of the receiver, up to size length. The receiver is unchanged.<textarea class='editor'>x = [ 1, 2, 3, "foo", 'bar' ];
y = x.wrapExtend(9);
x.postln;
y.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-foldExtend' href='./../Overviews/Methods.html#foldExtend'>foldExtend</a>(<span class='argstr'>length</span>)</h3>
<div class='method'>
<p>Same as wrapExtend but the sequences fold back on the list elements.<textarea class='editor'>x = [ 1, 2, "foo"];
y = x.foldExtend(9);
x.postln;
y.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-clipExtend' href='./../Overviews/Methods.html#clipExtend'>clipExtend</a>(<span class='argstr'>length</span>)</h3>
<div class='method'>
<p>Same as wrapExtend but the sequences "clip" (return their last element) rather than wrapping.<textarea class='editor'>x = [ 1, 2, "foo"];
y = x.clipExtend(9);
x.postln;
y.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-slide' href='./../Overviews/Methods.html#slide'>slide</a>(<span class='argstr'>windowLength: 3</span>, <span class='argstr'>stepSize: 1</span>)</h3>
<div class='method'>
<p>Return a new Array whose elements are repeated subsequences from the receiver. Easier to demonstrate than explain.<textarea class='editor'>[1, 2, 3, 4, 5, 6].slide(3, 1).postcs;
[1, 2, 3, 4, 5, 6].slide(3, 2).postcs;
[1, 2, 3, 4, 5, 6].slide(4, 1).postcs;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-shift' href='./../Overviews/Methods.html#shift'>shift</a>(<span class='argstr'>n</span>, <span class='argstr'>filler: 0.0</span>)</h3>
<div class='method'>
<p>Shift the values of the array n steps to the right (n positive) or to the left(n negative), dropping the excess and filling empty space with zero.<textarea class='editor'>[1, 2, 3, 4, 5, 6].shift(3).postln;
[1, 2, 3, 4, 5, 6].shift(-3).postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-containsSeqColl' href='./../Overviews/Methods.html#containsSeqColl'>containsSeqColl</a></h3>
<div class='method'>
<p>Returns true if the receiver Array contains any instance of SequenceableCollection<textarea class='editor'>[1, 2, 3, 4].containsSeqColl.postln
[1, 2, [3], 4].containsSeqColl.postln</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-powerset' href='./../Overviews/Methods.html#powerset'>powerset</a></h3>
<div class='method'>
<p>Returns all possible combinations of the array's elements.<textarea class='editor'>[1, 2, 3].powerset.postln
[1, 2, 3].powerset.sort({ |a, b| a.size &gt; b.size }); // sort by size, big first
[1, 2, 3].powerset.sort({ |a, b| a.size &gt; b.size }).reverse; // by size, small first</textarea>
<p>powerset is also supported in Collection:<textarea class='editor'>Set[1, 2, 3].powerset;
List[1, 2, 3].powerset
(a: 1, b: 2, c: 3).powerset;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-envirPairs' href='./../Overviews/Methods.html#envirPairs'>envirPairs</a></h3>
<div class='method'>
<p>Given an array of symbols, this returns an array of pairs of (symbol, value) from the current environment. This can then be used as arguments for a Synth, or in an OSC message.<textarea class='editor'>e = (freq: 340, amp: 0.001, strangeness: 0.85);
e.use {
[\amp, \taste, \strangeness].envirPairs;
}</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-flop' href='./../Overviews/Methods.html#flop'>flop</a></h3>
<div class='method'>
<p>Invert rows and columns in a two dimensional Array (turn inside out). See also: Function, SequenceableCollection.<textarea class='editor'>[[1, 2, 3], [4, 5, 6]].flop;
[[1, 2, 3], [4, 5, 6], [7, 8]].flop; // shorter array wraps
[].flop; // result is always 2-d.</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-multiChannelExpand' href='./../Overviews/Methods.html#multiChannelExpand'>multiChannelExpand</a></h3>
<div class='method'>
<p>Used by UGens to perform multi channel expansion. Same as flop.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-source' href='./../Overviews/Methods.html#source'>source</a></h3>
<div class='method'>
<p>Some UGens return Arrays of OutputProxy when instantiated. This method allows you to get at the source UGen.<textarea class='editor'>z = Pan2.ar;
z.postln;
z.source.postln;</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fork' href='./../Overviews/Methods.html#fork'>fork</a>(<span class='argstr'>join</span>, <span class='argstr'>clock</span>, <span class='argstr'>quant: 0.0</span>, <span class='argstr'>stackSize: 64</span>)</h3>
<div class='method'>
<p>Used within Routines and assumes an array of functions, from which subroutines are created. The subroutines are played while the outer Routine carries on. The join parameter expresses after how many subroutines complete the outer Routine is allowed to go on. By default this happens after all subroutines have completed.<textarea class='editor'>// an array of routine functions:
(
a = [
{ 1.wait; \done_one.postln },
{ 0.5.wait; \done_two.postln },
{ 0.2.wait; \done_three.postln }
];
)
// join after 0
(
Routine {
"join = 0.".postcln;
a.fork(0); \doneAll.postln;
}.play;
)
// join after 1
(
Routine {
"join = 1.".postcln;
a.fork(1); \doneAll.postln;
}.play;
)
// join after all
(
Routine {
"join = a.size (default).".postcln;
a.fork; \doneAll.postln;
}.play;
)
poll(trig, label, trigid)
apply an array of Poll units to an array of UGens (see those helpfiles for more details).
s.boot;
(
x = {
SinOsc.ar([0.1, 0.2], 0).poll * 0.1
}.play;
)
x.trace; // By tracing the Synth you can see the two Poll units we created
x.free</textarea>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dpoll' href='./../Overviews/Methods.html#dpoll'>dpoll</a>(<span class='argstr'>label</span>, <span class='argstr'>run: 1</span>, <span class='argstr'>trigid: -1</span>)</h3>
<div class='method'>
<p>apply an array of Dpoll units to an array of UGens (see those helpfiles for more details).</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atIdentityHash' href='./../Overviews/Methods.html#atIdentityHash'>atIdentityHash</a>(<span class='argstr'>argKey</span>)</h3>
<div class='method'>
<p>This method is used by IdentitySet to search for a key among its members.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atIdentityHashInPairs' href='./../Overviews/Methods.html#atIdentityHashInPairs'>atIdentityHashInPairs</a>(<span class='argstr'>argKey</span>)</h3>
<div class='method'>
<p>This method is used by IdentityDictionary to search for a key among its members.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asString' href='./../Overviews/Methods.html#asString'>asString</a>(<span class='argstr'>limit: 512</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
<div class='method'>
<p>Returns a string representing the Array. May not be compilable due to elision (...) of excessive arguments.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asCompileString' href='./../Overviews/Methods.html#asCompileString'>asCompileString</a></h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
<div class='method'>
<p>Returns a string that will compile to return an Array equal to the receiver.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isValidUGenInput' href='./../Overviews/Methods.html#isValidUGenInput'>isValidUGenInput</a></h3>
<div class='method'>
<p>Returns true. Arrays are valid UGen inputs.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asRawOSC' href='./../Overviews/Methods.html#asRawOSC'>asRawOSC</a></h3>
<div class='method'>
<p>Returns the OSC message as an Int8Array. Receiver must be a bundle.<textarea class='editor'>[0.1, [\s_new, \default, -1, 1, 1, \freq, 1961]].asRawOSC;</textarea>
</div><h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allSplineIntControls' href='./../Overviews/Methods.html#allSplineIntControls'>allSplineIntControls</a>(<span class='argstr'>amt</span>, <span class='argstr'>clipMode: 'wrap'</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asActionFunc' href='./../Overviews/Methods.html#asActionFunc'>asActionFunc</a></h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/Various/ActionFunc.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/Various/ActionFunc.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asAudioRateInput' href='./../Overviews/Methods.html#asAudioRateInput'>asAudioRateInput</a>(<span class='argstr'>for</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asControlInput' href='./../Overviews/Methods.html#asControlInput'>asControlInput</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asNote' href='./../Overviews/Methods.html#asNote'>asNote</a>(<span class='argstr'>cents</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-asNote.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-asNote.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asSpec' href='./../Overviews/Methods.html#asSpec'>asSpec</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asUGenInput' href='./../Overviews/Methods.html#asUGenInput'>asUGenInput</a>(<span class='argstr'>for</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atB' href='./../Overviews/Methods.html#atB'>atB</a>(<span class='argstr'>index</span>, <span class='argstr'>loop: true</span>, <span class='argstr'>extra</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atH' href='./../Overviews/Methods.html#atH'>atH</a>(<span class='argstr'>index</span>, <span class='argstr'>loop: true</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atL' href='./../Overviews/Methods.html#atL'>atL</a>(<span class='argstr'>index</span>, <span class='argstr'>loop: true</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atQ' href='./../Overviews/Methods.html#atQ'>atQ</a>(<span class='argstr'>index</span>, <span class='argstr'>loop: true</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atS' href='./../Overviews/Methods.html#atS'>atS</a>(<span class='argstr'>index</span>, <span class='argstr'>loop: true</span>, <span class='argstr'>extra</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-atSin' href='./../Overviews/Methods.html#atSin'>atSin</a>(<span class='argstr'>index</span>, <span class='argstr'>loop: true</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-bSplineInt' href='./../Overviews/Methods.html#bSplineInt'>bSplineInt</a>(<span class='argstr'>i</span>, <span class='argstr'>amt</span>, <span class='argstr'>loop: true</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-bSplineInt2' href='./../Overviews/Methods.html#bSplineInt2'>bSplineInt2</a>(<span class='argstr'>i</span>, <span class='argstr'>amt</span>, <span class='argstr'>loop: true</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-bSplineIntControls' href='./../Overviews/Methods.html#bSplineIntControls'>bSplineIntControls</a>(<span class='argstr'>amt: 4</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-bSplineIntDeltaControls' href='./../Overviews/Methods.html#bSplineIntDeltaControls'>bSplineIntDeltaControls</a>(<span class='argstr'>amt: 4</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-buildForProxy' href='./../Overviews/Methods.html#buildForProxy'>buildForProxy</a>(<span class='argstr'>proxy</span>, <span class='argstr'>channelOffset: 0</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-cpsname' href='./../Overviews/Methods.html#cpsname'>cpsname</a>(<span class='argstr'>sign</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-deinterlace' href='./../Overviews/Methods.html#deinterlace'>deinterlace</a>(<span class='argstr'>clumpSize: 2</span>, <span class='argstr'>numChan: 1</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-envAt' href='./../Overviews/Methods.html#envAt'>envAt</a>(<span class='argstr'>time</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fastAtL' href='./../Overviews/Methods.html#fastAtL'>fastAtL</a>(<span class='argstr'>index</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fillEnds' href='./../Overviews/Methods.html#fillEnds'>fillEnds</a>(<span class='argstr'>nStart: 1</span>, <span class='argstr'>nEnd: 2</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-findReplace' href='./../Overviews/Methods.html#findReplace'>findReplace</a>(<span class='argstr'>findString</span>, <span class='argstr'>replaceString: ""</span>, <span class='argstr'>ignoreCase: false</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/String/extString-findReplace.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/String/extString-findReplace.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-ghostAt' href='./../Overviews/Methods.html#ghostAt'>ghostAt</a>(<span class='argstr'>i</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hermiteInt' href='./../Overviews/Methods.html#hermiteInt'>hermiteInt</a>(<span class='argstr'>i</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-intAt' href='./../Overviews/Methods.html#intAt'>intAt</a>(<span class='argstr'>index</span>, <span class='argstr'>type: 'linear'</span>, <span class='argstr'>loop: true</span>, <span class='argstr'>extra</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-interlace' href='./../Overviews/Methods.html#interlace'>interlace</a>(<span class='argstr'>clumpSize: 1</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-interpolate' href='./../Overviews/Methods.html#interpolate'>interpolate</a>(<span class='argstr'>division: 10</span>, <span class='argstr'>type: 'linear'</span>, <span class='argstr'>loop: true</span>, <span class='argstr'>extra</span>, <span class='argstr'>close: false</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-linearInt' href='./../Overviews/Methods.html#linearInt'>linearInt</a>(<span class='argstr'>i</span>, <span class='argstr'>step: 0</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-madd' href='./../Overviews/Methods.html#madd'>madd</a>(<span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-midiname' href='./../Overviews/Methods.html#midiname'>midiname</a>(<span class='argstr'>sign</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-modeAt' href='./../Overviews/Methods.html#modeAt'>modeAt</a>(<span class='argstr'>index</span>, <span class='argstr'>mode: 'wrap'</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-namecps' href='./../Overviews/Methods.html#namecps'>namecps</a>(<span class='argstr'>cents</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-namemidi' href='./../Overviews/Methods.html#namemidi'>namemidi</a>(<span class='argstr'>cents</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-namename' href='./../Overviews/Methods.html#namename'>namename</a>(<span class='argstr'>cents</span>, <span class='argstr'>sign</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Note/extVarious-midiname.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numChannels' href='./../Overviews/Methods.html#numChannels'>numChannels</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-poll' href='./../Overviews/Methods.html#poll'>poll</a>(<span class='argstr'>trig: 10</span>, <span class='argstr'>label</span>, <span class='argstr'>trigid: -1</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prUnarchive' href='./../Overviews/Methods.html#prUnarchive'>prUnarchive</a>(<span class='argstr'>slotArray</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prUnlace' href='./../Overviews/Methods.html#prUnlace'>prUnlace</a>(<span class='argstr'>clumpSize: 2</span>, <span class='argstr'>numChan: 1</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-proxyControlClass' href='./../Overviews/Methods.html#proxyControlClass'>proxyControlClass</a></h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-quadInt' href='./../Overviews/Methods.html#quadInt'>quadInt</a>(<span class='argstr'>i</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-quadIntControl' href='./../Overviews/Methods.html#quadIntControl'>quadIntControl</a></h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-quadIntFunction' href='./../Overviews/Methods.html#quadIntFunction'>quadIntFunction</a>(<span class='argstr'>i</span>, <span class='argstr'>x1</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-resize' href='./../Overviews/Methods.html#resize'>resize</a>(<span class='argstr'>newSize: 10</span>, <span class='argstr'>type: 'linear'</span>, <span class='argstr'>loop: false</span>, <span class='argstr'>extra</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-rotateL' href='./../Overviews/Methods.html#rotateL'>rotateL</a>(<span class='argstr'>n: 0</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/UGens/extArray-Rotation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/UGens/extArray-Rotation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-rotateN' href='./../Overviews/Methods.html#rotateN'>rotateN</a>(<span class='argstr'>n: 0</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/UGens/extArray-Rotation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/UGens/extArray-Rotation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-rotateS' href='./../Overviews/Methods.html#rotateS'>rotateS</a>(<span class='argstr'>n: 0</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/UGens/extArray-Rotation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/UGens/extArray-Rotation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-scope' href='./../Overviews/Methods.html#scope'>scope</a>(<span class='argstr'>name: "UGen Scope"</span>, <span class='argstr'>bufsize: 4096</span>, <span class='argstr'>zoom: 1.0</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Control/UGen-scope.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Control/UGen-scope.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-selectFindString' href='./../Overviews/Methods.html#selectFindString'>selectFindString</a>(<span class='argstr'>stringToFind</span>, <span class='argstr'>ignoreCase: false</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/String/extString-findReplace.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Extensions/String/extString-findReplace.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sineInt' href='./../Overviews/Methods.html#sineInt'>sineInt</a>(<span class='argstr'>i</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-splineInt' href='./../Overviews/Methods.html#splineInt'>splineInt</a>(<span class='argstr'>i</span>, <span class='argstr'>amt</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-splineIntControls' href='./../Overviews/Methods.html#splineIntControls'>splineIntControls</a>(<span class='argstr'>amt</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-splineIntFunction' href='./../Overviews/Methods.html#splineIntFunction'>splineIntFunction</a>(<span class='argstr'>i</span>, <span class='argstr'>x1</span>, <span class='argstr'>x2</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-splineIntFunctionArray' href='./../Overviews/Methods.html#splineIntFunctionArray'>splineIntFunctionArray</a>(<span class='argstr'>i</span>, <span class='argstr'>x1array</span>, <span class='argstr'>x2array</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-splineIntPart1' href='./../Overviews/Methods.html#splineIntPart1'>splineIntPart1</a>(<span class='argstr'>x1</span>, <span class='argstr'>x2</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-splineIntPart2' href='./../Overviews/Methods.html#splineIntPart2'>splineIntPart2</a>(<span class='argstr'>i</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/Interpolation/extArray-interpolation.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-unlace' href='./../Overviews/Methods.html#unlace'>unlace</a>(<span class='argstr'>clumpSize: 2</span>, <span class='argstr'>numChan: 1</span>, <span class='argstr'>clip: false</span>)</h3>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Array.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Array.schelp</a><br>link::Classes/Array::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,93 @@
<!doctype html><html lang='en'><head><title>Astrocade | SuperCollider 3.10.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'Astrocade';
var scdoc_sc_version = '3.10.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>Astrocade:</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> </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 id='menubar'></div>
<div class='contents'>
<div class='header'>
<div id='label'>
<span id='folder'>Classes (extension)</span>
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Emulators'>Emulators</a></span>
</div><h1>Astrocade<span id='superclasses'> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></span>
<div class='extension-indicator-ctr' title='This help file originates from a third-party quark or plugin for SuperCollider.'><img class='extension-indicator-icon' alt='Extension' src='./../images/plugin.png'><span class='extension-indicator-text'>Extension</span></div></h1>
<div id='summary'>Sound Chip Simulator</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/f0plugins/Astrocade/Astrocade.sc' title='/Users/zzk/Library/Application Support/SuperCollider/Extensions/f0plugins/Astrocade/Astrocade.sc'>Astrocade.sc</a></div><div id='related'>See also: <a href="./../Classes/Beep.html">Beep</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Astrocade custom 'IO' chip sound chip driver by Aaron Giles and Frank Palazzolo.<div class='note'><span class='notelabel'>NOTE:</span> Not sure this is working as it should, but it's still somewhat fun sounding.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>Astrocade.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>reg0: 0</span>, <span class='argstr'>reg1: 127</span>, <span class='argstr'>reg2: 0</span>, <span class='argstr'>reg3: 0</span>, <span class='argstr'>reg4: 0</span>, <span class='argstr'>reg5: 0</span>, <span class='argstr'>reg6: 15</span>, <span class='argstr'>reg7: 0</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>reg0<td class='argumentdesc'><table>
<tr><td>bits 7-0<td>master oscillator frequency (8bits 0-255)</table>
<tr><td class='argumentname'>reg1<td class='argumentdesc'><table>
<tr><td>bits 7-0<td>tone generator A frequency (8bits 0-255)</table>
<tr><td class='argumentname'>reg2<td class='argumentdesc'><table>
<tr><td>bits 7-0<td>tone generator B frequency (8bits 0-255)</table>
<tr><td class='argumentname'>reg3<td class='argumentdesc'><table>
<tr><td>bits 7-0<td>tone generator C frequency (8bits 0-255)</table>
<tr><td class='argumentname'>reg4<td class='argumentdesc'><table>
<tr><td>bits 7-6<td>vibrato speed<tr><td>bits 5-0<td>vibrato depth (6bits 0-63)</table>
<tr><td class='argumentname'>reg5<td class='argumentdesc'><table>
<tr><td>bit 5<td>noise AM enable<tr><td>bit 4<td>mux source (0=vibrato, 1=noise)<tr><td>bits 3-0<td>tone generator C volume (4bits 0-15)</table>
<tr><td class='argumentname'>reg6<td class='argumentdesc'><table>
<tr><td>bits 7-4<td>tone generator B volume<tr><td>bits 3-0<td>tone generator A volume (4bits 0-15)</table>
<tr><td class='argumentname'>reg7<td class='argumentdesc'><table>
<tr><td>bits 7-0<td>noise volume (8bits 0-255)</table>
</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>
<textarea class='editor'>s.boot;
{Astrocade.ar}.play
{Astrocade.ar(1)}.play
{Astrocade.ar(2)}.play
{Astrocade.ar(2, 50)}.play
//--all three tones
{Astrocade.ar(0, MouseX.kr(0, 255), 100, 200, reg5:2r00001111, reg6:2r111111)}.play
//--noise only
{Astrocade.ar(reg5:2r00100000, reg6:0, reg7:255)}.play
{Pan2.ar(Astrocade.ar(LFSaw.kr(1, 0, 10, 10), 25, reg4:MouseX.kr(0, 255), reg5:MouseY.kr(0, 15)))}.play
{Pan2.ar(Astrocade.ar(SinOsc.kr(4, 0, 10, 10), SinOsc.kr(0.1, 0, 5, 20), reg4:MouseX.kr(0, 255), reg5:2r00010000, reg6:2r00001111, reg7:MouseY.kr(0, 15)))}.play
{Pan2.ar(Astrocade.ar(100, 255, reg4:2r00000111, reg5:MouseX.kr(0, 255), reg6:2r00001111, reg7:MouseY.kr(0, 255)))}.play
{Mix(Astrocade.ar(MouseX.kr(0, 255), LFPulse.kr((0.1..5)*30), LFPulse.kr((0.1..5)*40), LFPulse.kr((0.1..5)*50), reg5: 2r00000111, reg6:2r01110111).dup)}.play</textarea>
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/f0plugins/Astrocade/HelpSource/Classes/Astrocade.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/f0plugins/Astrocade/HelpSource/Classes/Astrocade.schelp</a><br>link::Classes/Astrocade::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,367 @@
<html><head><title>BBCut2</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#Libraries>BBCut'>Libraries>BBCut</a></div>
<h1>BBCut2</h1>
<div id='summary'>splices and reassembles audio</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/core/BBCut2.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/core/BBCut2.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</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='#*new'>new</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='#*delay'>delay</a> </li>
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-free'>free</a> </li>
<li class='toc3'><a href='#-pause'>pause</a> </li>
<li class='toc3'><a href='#-resume'>resume</a> </li>
<li class='toc3'><a href='#-stop'>stop</a> </li>
<li class='toc3'><a href='#-end'>end</a> </li>
<li class='toc3'><a href='#-play'>play</a> </li>
<li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-alive'>alive</a> </li>
<li class='toc3'><a href='#-amp'>amp</a> </li>
<li class='toc3'><a href='#-chooseoffset'>chooseoffset</a> </li>
<li class='toc3'><a href='#-clear'>clear</a> </li>
<li class='toc3'><a href='#-clock'>clock</a> </li>
<li class='toc3'><a href='#-cutgroups'>cutgroups</a> </li>
<li class='toc3'><a href='#-getBlock'>getBlock</a> </li>
<li class='toc3'><a href='#-initBBCut2'>initBBCut2</a> </li>
<li class='toc3'><a href='#-pan'>pan</a> </li>
<li class='toc3'><a href='#-playflag'>playflag</a> </li>
<li class='toc3'><a href='#-proc'>proc</a> </li>
<li class='toc3'><a href='#-provideMaterial'>provideMaterial</a> </li>
<li class='toc3'><a href='#-quantiser'>quantiser</a> </li>
<li class='toc3'><a href='#-setoffset'>setoffset</a> </li>
<li class='toc3'><a href='#-updateblock'>updateblock</a> </li>
<li class='toc3'><a href='#-updatephrase'>updatephrase</a> </li>
</ul></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>This help file is for the BBCut2 class. For an overview of the BBCut2 library, see <a href="./../Overviews/BBCut.html">BBCut</a>.
<p>BBCut2 provides the central scheduling mechanisms for algorithmic audio cutting running on an external clock.
<p>BBCut2 is passed a cut renderer, an algorithmic cutting routine, and an optional quantisation routine. The clock is then passed in via play.
<p>BBCut2 sends OSC messages ahead of rendering time to the Server so as to maintain perfect time lock without the jitter caused by variable network latency. This is superior to BBCut's 'send message at moment of decision' paradigm. The price is that the events during the next beat are determined a beat in advance and thus interaction with the cutting routines may show a beat or more's delay in response. <h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>cutgroups</span>, <span class='argstr'>proc</span>, <span class='argstr'>quantiser</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>cutgroups<td class='argumentdesc'>
<p>an Array of CutGroups, though this argument can also cope with being passed a CutSynth directly, a single CutGroup, an Array of CutSynths and an Array of Arrays of CutSynths. Now, a proc can have multiple renderers. The CutGroup is a necessary abstraction to select the execution graph and bus requirements of SC3, and you can think of BBCut2 making Group Nodes on the Server for each distinct CutGroup (=cut synthesiser chain).<tr><td class='argumentname'>proc<td class='argumentdesc'>
<p>an instance of a class derived from BBCutProc. This is the algorithmic composition routine that will generate cuts. <tr><td class='argumentname'>quantiser<td class='argumentdesc'>
<p>An optional quantisation class which imposes a template on the output of the algorithmic cutter. Leave this nil for default behaviour. </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='*delay' href='./../Overviews/Methods.html#delay'>delay</a></h3>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*delay' href='./../Overviews/Methods.html#delay'>delay</a> = value</h3>
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-free' href='./../Overviews/Methods.html#free'>free</a> </h3>
<div class='method'>
<p>Frees any group and bus resources. If you passed in explicit Group and Bus objects they will not be deleted and are your own responsibility (see CutGroup).</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-pause' href='./../Overviews/Methods.html#pause'>pause</a> </h3>
<div class='method'>
<p>Pause the bbcut2- it will not send further messages to the Server (but may have scheduled some already which can't be taken back).</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-resume' href='./../Overviews/Methods.html#resume'>resume</a> </h3>
<div class='method'>
<p>Restart after a pause.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-stop' href='./../Overviews/Methods.html#stop'>stop</a> </h3>
<div class='method'>
<p>Stop playing, removing the cutter from the current clock. </div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-end' href='./../Overviews/Methods.html#end'>end</a> </h3>
<div class='method'>
<p>Stop and free.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-play' href='./../Overviews/Methods.html#play'>play</a> (<span class='argstr'>clk</span>)</h3>
<div class='method'>
<p>Start playing on a given clock.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>clk<td class='argumentdesc'>
<p>A clock class derived from ExternalClock for the event scheduling. ExternalClock is a base class which wraps a TempoClock in SCLang. ServerClock is used for beat induction control from Server side UGens. If a TempoClock is passed in, it gets wrapped in an ExternalClock. If a bps is passed in (eg .play(2)) then a TempoClock is created at that bps and wrapped in an ExternalClock. </table></div><h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-alive' href='./../Overviews/Methods.html#alive'>alive</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-amp' href='./../Overviews/Methods.html#amp'>amp</a> = <span class='argstr'>amp: 0.1</span></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-chooseoffset' href='./../Overviews/Methods.html#chooseoffset'>chooseoffset</a> (<span class='argstr'>phrasepos</span>, <span class='argstr'>beatspersubdiv</span>, <span class='argstr'>currphraselength</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-clear' href='./../Overviews/Methods.html#clear'>clear</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-clock' href='./../Overviews/Methods.html#clock'>clock</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-clock' href='./../Overviews/Methods.html#clock'>clock</a> = </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-cutgroups' href='./../Overviews/Methods.html#cutgroups'>cutgroups</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-getBlock' href='./../Overviews/Methods.html#getBlock'>getBlock</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initBBCut2' href='./../Overviews/Methods.html#initBBCut2'>initBBCut2</a> (<span class='argstr'>cg</span>, <span class='argstr'>p</span>, <span class='argstr'>q</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pan' href='./../Overviews/Methods.html#pan'>pan</a> = <span class='argstr'>pan: 0</span></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-playflag' href='./../Overviews/Methods.html#playflag'>playflag</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-playflag' href='./../Overviews/Methods.html#playflag'>playflag</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-proc' href='./../Overviews/Methods.html#proc'>proc</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-proc' href='./../Overviews/Methods.html#proc'>proc</a> = <span class='argstr'>p</span></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-provideMaterial' href='./../Overviews/Methods.html#provideMaterial'>provideMaterial</a> (<span class='argstr'>beatlocation</span>, <span class='argstr'>need: 1</span>, <span class='argstr'>tempo</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-quantiser' href='./../Overviews/Methods.html#quantiser'>quantiser</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setoffset' href='./../Overviews/Methods.html#setoffset'>setoffset</a> (<span class='argstr'>prop</span>, <span class='argstr'>phraselength</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-updateblock' href='./../Overviews/Methods.html#updateblock'>updateblock</a> (<span class='argstr'>block</span>, <span class='argstr'>pp</span>, <span class='argstr'>cuts</span>, <span class='argstr'>ir</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-updatephrase' href='./../Overviews/Methods.html#updatephrase'>updatephrase</a> (<span class='argstr'>phrase</span>, <span class='argstr'>currphraselength</span>)</h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>s=Server.default;
//shortest possible example, defaults to BBCutProc11 cut procedure, generates a default clock for you at 2 bps
//will cut up the first audio input stream on your system (use with headphones to avoid feedback)
b=BBCut2(CutStream1.new).play
b.pause; //silent mode
b.resume; //hear again
b.stop; //finish on clock
c=ExternalClock(TempoClock(2.7)).play;
b.play(c); //start on a new running clock
b.stop;
b.free; //free any resources left
//better use, explicit passing of clock, buffer
(
var clock= ExternalClock(TempoClock(2));
var buffer= Buffer.alloc(s,44100,1);
clock.play;
//runs on first available input channel
BBCut2(CutStream1(s.options.numOutputBusChannels,buffer),BBCutProc11.new).play(clock);
)
( //the same for a soundfile: you must allow time for the soundfile to load
var sf;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf1(sf)).play; //will use TempoClock.default so depends what tempo that is at
});
)
TempoClock.default.tempo_(2.3)
//you would usually load soundfiles separately (perhaps before performing) before running cutters
//better practise, more explicit
(
var sf, clock;
clock= ExternalClock(TempoClock(2.5));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf1(sf), BBCutProc11.new).play(clock);
});
)
//sharing clocks, and demonstrating what happens with tempo changes
(
var sf, tempoclock, bbcutclock;
SynthDef(\beep,{Out.ar(0,SinOsc.ar(440,0,0.1)*Line.kr(1,0,0.1,doneAction:2))}).load(s);
tempoclock= TempoClock(2.3);
bbcutclock= ExternalClock(tempoclock);
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
BBCut2([CutBuf1(sf),CutMixer(0,1.0,1.0,1.0)], BBCutProc11.new).play(bbcutclock);
});
bbcutclock.play;
Task({
inf.do({
Synth(\beep);
if(0.1.coin,{tempoclock.tempo_(rrand(1.7,2.7))});
1.0.wait;
});
}).play(tempoclock);
)
//creating CutGroup to choose rendering bus and Group, renders on bus 16 but output on bus 0 due to a hidden CutMixer
(
var clock= ExternalClock(TempoClock(2));
var buffer= Buffer.alloc(s,44100,1);
var group= Group.head(Node.basicNew(s,1));
var bus= Bus.audio(s,1); //mono rendering bus
clock.play;
//runs on first available input channel
BBCut2(CutGroup(CutStream1(nil,buffer),group,bus),BBCutProc11.new).play(clock);
)
//also specifying a CutMixer to choose volume and outbus, but CutGroup will allocate a rendering Bus for you
(
var clock= ExternalClock(TempoClock(2));
var buffer= Buffer.alloc(s,44100,1);
var group= Group.head(Node.basicNew(s,1));
clock.play;
BBCut2(CutGroup([CutStream1(nil,buffer),CutMixer(0,0.5,1.0,{1.0.rand2})],group),BBCutProc11.new).play(clock);
)
//showing off the five input possibilities for the cutgroup array argument
//five options for shortcuts- all work because of code in BBCut2-initBBCut2
//run this first to load the samples:
(
var filenames, bpsound;
//Put in the locations of your samples
filenames= [Platform.resourceDir +/+ "sounds/break.aiff",Platform.resourceDir +/+ "sounds/break2.aiff"];
//how many beats in your samples?
bpsound= [8,4];
f= BBCutBuffer.array(filenames,bpsound);
)
//test soundfile parameters
f.do({arg val; Post &lt;&lt;[val.path, val.numChannels, val.numFrames, val.sampleRate, val.bufnum]&lt;&lt;nl;});
//start a BBCut scheduling clock
c= ExternalClock(TempoClock(2)).play;
//run one line at a time, each BBCut instance
a=BBCut2(CutFunc.new(blockfunc:{Synth(\beep)}),BBCutProc11.new).play(c);
a.end; //end stops and frees the cutter
//makes one running BBCutGroup containing two renderers
a= BBCut2([CutBuf1(f[0]),CutBuf1(f[1])],BBCutProc11.new).play(c);
a.end;
//makes two running groups, first with default cut synth, second with sample based renderers
a= BBCut2([[CutFunc.new(blockfunc:{Synth(\beep)})], [CutBuf1(f[0]),CutBuf1(f[1])]],BBCutProc11.new).play(c);
a.end;
//create explicitly a single BBCutGroup (BBCG is a shortcut name for one)
a= BBCut2(CutGroup(CutBuf1(f[0])),BBCutProc11.new).play(c);
a.end;
//explicitly create an array of BBCutGroups, like the 'makes two running groups' option above but here more explicitly done
a= BBCut2([CutGroup(CutFunc.new(blockfunc:{Synth(\beep)})), CutGroup([CutBuf1(f[0]),CutMixer(0,0.7,1.0,{1.0.rand2})]),CutGroup(CutBuf1(f[1]))],BBCutProc11.new).play(c);
c.tempoclock.tempo_(2.3);
a.end;
//tempo ratio of 20 to 27
(
var sf, clock1, clock2;
clock1= ExternalClock(TempoClock(2));
clock2= ExternalClock(TempoClock(2.7));
Routine.run({
sf=BBCutBuffer.array([Platform.resourceDir +/+ "sounds/break.aiff",Platform.resourceDir +/+ "sounds/break2.aiff"],[8,4]);
s.sync; //this forces a wait for the Buffer to load
BBCut2([CutBuf1(sf[0]),CutMixer(0,0.5,1.0,-1.0)], ChooseCutProc(0.25,{[4,2].choose})).play(clock1);
BBCut2([CutBuf1(sf[1]),CutMixer(0,0.5,1.0,1.0)], ChooseCutProc(0.25,{[4,2].choose})).play(clock2);
});
clock1.play;
clock2.play;
)
//adding/removing cutsynths
//better practise, more explicit
(
var sf, clock;
clock= ExternalClock(TempoClock(2.5));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
g=CutGroup(CutBuf1(sf));
a=BBCut2(g, BBCutProc11.new).play(clock);
});
)
//run these one at a time
g.cutsynths.postln; //default CutMixer was added
g.add(CutComb1({arg i; (i.clip2(10)*0.005)+0.01},0.5));
g.cutsynths.postln;
g.removeAt(2); //remove comb
g.cutsynths.postln;
a.end</pre>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/BBCut2.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/BBCut2.schelp</a><br>link::Classes/BBCut2::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,117 @@
<html><head><title>BBCutBuffer</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#Libraries>BBCut'>Libraries>BBCut</a></div>
<h1>BBCutBuffer</h1>
<div id='summary'>A buffer in BBCut2</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/core/BBCutBuffer.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/core/BBCutBuffer.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Buffer.html">Buffer</a> : <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</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='#*new'>new</a> </li>
<li class='toc3'><a href='#*array'>array</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='#*defaultPAT'>defaultPAT</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>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-beatlength'>beatlength</a> </li>
<li class='toc3'><a href='#-bps'>bps</a> </li>
<li class='toc3'><a href='#-chooseoffset'>chooseoffset</a> </li>
<li class='toc3'><a href='#-convertoffset'>convertoffset</a> </li>
<li class='toc3'><a href='#-eventlengths'>eventlengths</a> </li>
<li class='toc3'><a href='#-eventpats'>eventpats</a> </li>
<li class='toc3'><a href='#-events'>events</a> </li>
<li class='toc3'><a href='#-eventstarts'>eventstarts</a> </li>
<li class='toc3'><a href='#-findevents'>findevents</a> </li>
<li class='toc3'><a href='#-groovepos'>groovepos</a> </li>
<li class='toc3'><a href='#-length'>length</a> </li>
<li class='toc3'><a href='#-onsetsinbeats'>onsetsinbeats</a> </li>
<li class='toc3'><a href='#-quantised'>quantised</a> </li>
<li class='toc3'><a href='#-setgroove'>setgroove</a> </li>
<li class='toc3'><a href='#-timedeviations'>timedeviations</a> </li>
<li class='toc3'><a href='#-trimevents'>trimevents</a> </li>
</ul></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>Holds data on a buffer including any segmentation (event positions). Derived from the Buffer class and has methods for choosing playback segments.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>filename</span>, <span class='argstr'>beatlength: 8</span>, <span class='argstr'>eventlist</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>filename<td class='argumentdesc'>
<p>File location of a soundfile to load. Default path is to the SC3 source folder. <tr><td class='argumentname'>beatlength<td class='argumentdesc'>
<p>Number of beats in the soundfile, also used to estimate the source tempo in beats per second. <tr><td class='argumentname'>eventlist<td class='argumentdesc'>
<p>Array giving a segmentation of the sound file measured in sample frames. The class can construct one for you if you pass in a granularity, ie 0.5 for eighth note cuts imposed throughout the soundfile length- see below. If left nil the default is an even segmentation in eighth notes. <tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A function to be evaluated when the buffer is done loading. This instance of BBCutBuffer is passed as an argument.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*array' href='./../Overviews/Methods.html#array'>array</a> (<span class='argstr'>filenames</span>, <span class='argstr'>beatlengths</span>, <span class='argstr'>eventlists</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>filenames<td class='argumentdesc'>
<p>Array of sound file locations to load<tr><td class='argumentname'>beatlengths<td class='argumentdesc'>
<p>Number of beats in the soundfile, also used to estimate the source tempo in beats per second. <tr><td class='argumentname'>eventlists<td class='argumentdesc'>
<p>Array of Arrays of event positions. <tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A function to be evaluated when all buffers are done loading. This instance of BBCutBuffer is passed as an argument.</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='*defaultPAT' href='./../Overviews/Methods.html#defaultPAT'>defaultPAT</a></h3>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*defaultPAT' href='./../Overviews/Methods.html#defaultPAT'>defaultPAT</a> = value</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><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-beatlength' href='./../Overviews/Methods.html#beatlength'>beatlength</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-beatlength' href='./../Overviews/Methods.html#beatlength'>beatlength</a> = <span class='argstr'>b: 4</span></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bps' href='./../Overviews/Methods.html#bps'>bps</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bps' href='./../Overviews/Methods.html#bps'>bps</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-chooseoffset' href='./../Overviews/Methods.html#chooseoffset'>chooseoffset</a> (<span class='argstr'>block</span>, <span class='argstr'>offsetparam: 0</span>, <span class='argstr'>beatorframe: 0</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-convertoffset' href='./../Overviews/Methods.html#convertoffset'>convertoffset</a> (<span class='argstr'>block</span>, <span class='argstr'>beatorframe: 0</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-eventlengths' href='./../Overviews/Methods.html#eventlengths'>eventlengths</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-eventpats' href='./../Overviews/Methods.html#eventpats'>eventpats</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-events' href='./../Overviews/Methods.html#events'>events</a> = <span class='argstr'>eventlist</span></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-eventstarts' href='./../Overviews/Methods.html#eventstarts'>eventstarts</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-findevents' href='./../Overviews/Methods.html#findevents'>findevents</a> (<span class='argstr'>start</span>, <span class='argstr'>dur</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-groovepos' href='./../Overviews/Methods.html#groovepos'>groovepos</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-length' href='./../Overviews/Methods.html#length'>length</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-length' href='./../Overviews/Methods.html#length'>length</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-onsetsinbeats' href='./../Overviews/Methods.html#onsetsinbeats'>onsetsinbeats</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-quantised' href='./../Overviews/Methods.html#quantised'>quantised</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setgroove' href='./../Overviews/Methods.html#setgroove'>setgroove</a> (<span class='argstr'>groovefunc</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-timedeviations' href='./../Overviews/Methods.html#timedeviations'>timedeviations</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-trimevents' href='./../Overviews/Methods.html#trimevents'>trimevents</a> (<span class='argstr'>start</span>, <span class='argstr'>dur</span>, <span class='argstr'>input</span>, <span class='argstr'>pre</span>, <span class='argstr'>post</span>, <span class='argstr'>tempo</span>)</h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>//run one line at a time
f= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
Post &lt;&lt; [\length,f.length, \beatlength, f.beatlength, \events, f.eventstarts] &lt;&lt; nl;
f= BBCutBuffer.array([Platform.resourceDir +/+ "sounds/break.aiff",Platform.resourceDir +/+ "sounds/break2.aiff"],[8,4],[[0,10000],[3500,6700,9000]]);
f.do({ arg val; Post &lt;&lt; [\length,val.length, \beatlength, val.beatlength, \events, val.eventstarts] &lt;&lt; nl;});
//will only select playback positions from the events list given above, using an offset choice function
(
BBCut2(CutGroup([CutBuf1(f[1],{arg buffer; buffer.eventstarts.choose}), CutBPF1(1000,drqfunc:0.5)]), ChooseCutProc(0.125,4)).play(2)
)
//change the event positions allowed
f[1].events_([10000,20000,40000]);</pre>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/BBCutBuffer.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/BBCutBuffer.schelp</a><br>link::Classes/BBCutBuffer::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,203 @@
<html><head><title>BBCutProc11</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#Libraries>BBCut'>Libraries>BBCut</a></div>
<h1>BBCutProc11</h1>
<div id='summary'>Automatic breakbeat cutting algorithm</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/bbcutprocs/BBCutProc11.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/bbcutprocs/BBCutProc11.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/BBCutProc.html">BBCutProc</a> : <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</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='#*new'>new</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='toc3'><a href='#-initBBCutProc11'>initBBCutProc11</a> </li>
<li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-chooseblock'>chooseblock</a> </li>
</ul></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>The original automatic breakbeat cutting algorithm as refined in the BreakBeatx series of classes. This cut procedure favours small odd number length cuts with respect to some subdiv integer for a phrase. A block consists of an original cut plus some number of repeats. A special fast 'stutter' or 'roll' can occur only to finish off a given phrase.
<p>As is normal for cut procedures and synths, the value message is used to get the current value of any input parameter, so functions can be passed. Defaults are provided for all arguments.
<p>For additional data on the algorithm see
<p>Nick Collins, "Algorithmic Composition Methods for BreakBeat Science",
<p>Proceedings of Music Without Walls, ISBN 1857213319
<p>reproduced at <a href="http://www.cus.cam.ac.uk/~nc272">http://www.cus.cam.ac.uk/~nc272</a><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>sdiv: 8</span>, <span class='argstr'>barlength: 4</span>, <span class='argstr'>phrasebars: 3</span>, <span class='argstr'>numrepeats</span>, <span class='argstr'>stutterchance: 0.2</span>, <span class='argstr'>stutterspeed: 2</span>, <span class='argstr'>stutterarea: 0.5</span>)</h3>
<div class='method'>
<p>Create a BBCutProc11 object with the given parameters.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>sdiv<td class='argumentdesc'>
<p>sub division. A single measure is cut up into sdiv primitive units. So sdiv=8 over 4 beats gives eighth note resolution cutting.<tr><td class='argumentname'>barlength<td class='argumentdesc'>
<p>Normally set to 4.0 beats, for 4/4 bars, this can be altered to allow cuts over a different number of beats. So barlength= 3 gives cuts respecting 3/4. <tr><td class='argumentname'>phrasebars<td class='argumentdesc'>
<p>The length of the current phrase is barlength*phrasebars. <tr><td class='argumentname'>numrepeats<td class='argumentdesc'>
<p>Total number of repeats for normal cuts. So 2 corresponds to a particular size cut at one offset plus one exact repetition.<tr><td class='argumentname'>stutterchance<td class='argumentdesc'>
<p>the tail of a phrase has this chance of becoming a repeating one unit cell stutter (0.0 to 1.0)<tr><td class='argumentname'>stutterspeed<td class='argumentdesc'>
<p>the stutter can be an integer multiple of the subdivision speed. For instance, if subdiv is 8 (quavers) and stutterspeed is 2, then the stutter is in semiquavers (subdiv 16).<tr><td class='argumentname'>stutterarea<td class='argumentdesc'>
<p>a stutter is permissible within this proportion of the last bar of a phrase. Use values larger than 1 for stutters across multiple bars. The default is 0.5, for a half bar at 4/4.</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 class='imethodname'><span class='methprefix'>-</span><a name='-initBBCutProc11' href='./../Overviews/Methods.html#initBBCutProc11'>initBBCutProc11</a> (<span class='argstr'>sd: 8</span>, <span class='argstr'>bl: 4</span>, <span class='argstr'>pb: 3</span>, <span class='argstr'>nr</span>, <span class='argstr'>sc: 0.2</span>, <span class='argstr'>ss: 2</span>, <span class='argstr'>sa: 0.5</span>)</h3>
<div class='method'>
<p>Called internally after a new.
<p>Other methods are overrides of BBCutProc base class behaviour. BBCutProc11 will flag a roll when stuttering.</div><h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-chooseblock' href='./../Overviews/Methods.html#chooseblock'>chooseblock</a> </h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<p>You'll have to substitute your own break sample to hear the rhythmic aspects of this procedure properly<pre class='code prettyprint lang-sc'>//must have run this line before any of the examples
f= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
//default cutups
BBCut2(CutBuf1(f),BBCutProc11.new).play(2.4);
( //demonstrating tempo following from Server Clock control
var bbcut, pulse, clock;
clock= ServerClock.new.play(100);
bbcut= BBCut2(CutBuf1(f),BBCutProc11.new(8,4.0,2,3,0.5,3,1.0));
pulse= SynthDef(\pulse, {
var rate, impulse;
rate= MouseX.kr(2,3);
impulse= Impulse.kr(rate);
SendTrig.kr(impulse, 100, rate);
Out.ar(0,Decay.kr(impulse,0.1)*SinOsc.ar(440,0,0.5))
}).play;
bbcut.play(clock);
)
(
//showing use of all parameters
var w;
var slider,string;
var num;
var names,data, specs, lastval;
var bbcutter, clock;
names= ["tempo","cut","phrasebars","stutterchance","stutterspeed","restchance","ampvariation","panvariation","numrepeats","beatsperbar","randomoffset"];
data= //control spec data for ui controls
[
[2.0,3.0,\exp, 0.0,2.5], //tempo
[4,16,\lin,1,8], //cuts
[1,5,\lin,1,2], //phrasebars
[0.0,1.0,\lin,0.0,0.2], //stutterchance
[1,3,\lin,1,2], //stutterspeed
[0.0,1.0,\lin, 0.0,0.0], //restchance
[0.0,1.0,\amp, 0.0,1.0], //ampvariation
[0.0,1.0,\lin, 0.0,0.0], //panvariation
[1,5,\lin,1,2], //numrepeats
[2.0,6.0,\lin,1.0, 4.0], //subdivision over x beats
[0.0,1.0,\lin,0.0, 0.0] //offsetchance
];
specs= Array.fill(data.size, {arg i; ControlSpec.performList(\new, data.at(i))});
num= names.size;
w = SCWindow("BBCutProc11 demo N.M.Collins 23/08/03", Rect.new(100, 500, 500, (30*num)));
string= Array.fill(num);
slider= Array.fill(num);
//Fill with defaults. This array will hold the updated last value of any GUI element
lastval= Array.fill(num, {arg i; data.at(i).at(4);});
num.do(
{
arg i;
SCStaticText( w, Rect.new(5, (30*i)+5, 95,20)).string_(names.at(i));
slider.put(i,SCSlider.new( w, Rect.new(105, (30*i)+5, 95,20)));
//set slider to default value, else will default to 0.0
slider.at(i).value_(specs.at(i).unmap(data.at(i).at(4)));
string.put(i, SCStaticText( w, Rect.new(205, (30*i)+5, 95,20)).string_(data.at(i).at(4)));
slider.at(i).action_({arg sl;
var val; val = specs.at(i).map(sl.value); string.at(i).string_(val);
lastval.put(i, val); //set associated variable to this value, bbcut code will poll this rather than the slider directly
});
});
w.front;
bbcutter=BBCut2([
CutBuf2(f,{lastval.at(10)}),
CutMixer(0,1.0,{
if(lastval.at(5).coin, //restchance
{0},
{
rrand(lastval.at(6),1.0)} //amp variation
)},
{rrand(-1.0*(lastval.at(7)),lastval.at(7))}) //panvariation
],
BBCutProc11.new(
{lastval.at(1)}, //cut
{lastval.at(9)}, //sdbeats
{lastval.at(2)}, //phrasebars
{lastval.at(8)}, //numrepeats
{lastval.at(3)}, //stutterchance
{lastval.at(4)} //stutterspeed
));
clock=ExternalClock(TempoClock(lastval[0])).play;
bbcutter.play(clock);
//update tempo ten times a second
SystemClock.sched(0.0,{clock.tempoclock.tempo_(lastval.at(0)); 0.1});
)
//If you want fast varying time signatures set phrasebars=1,
//and provide interconnected functions updating barlength and sdiv.
( //default eighth note cutups
var sf,newbarl,phrasecount;
phrasecount=0;
BBCut2(CutBuf1(f),BBCutProc11.new(
{
newbarl=[4.0,3.0,3.5].wrapAt(phrasecount); //4/4 then 3/4 then 7/8 looping
phrasecount=phrasecount+1;
newbarl*2 //always eighth note cuts
},
{newbarl},
1
)).play(2.4);
)</pre>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/BBCutProc11.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/BBCutProc11.schelp</a><br>link::Classes/BBCutProc11::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,97 @@
<!doctype html><html lang='en'><head><title>BBandStop | 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 = 'BBandStop';
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'>BBandStop:</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> </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='#*sc'>sc</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><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>Filters'>Filters</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Filters>BEQSuite'>BEQSuite</a></span>
</div><h1>BBandStop<span id='superclasses'> : <a href="../Classes/BEQSuite.html">BEQSuite</a> : <a href="../Classes/Filter.html">Filter</a> : <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'>Band reject filter</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/BEQSuite.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/BEQSuite.sc'>BEQSuite.sc</a></div><div id='related'>See also: <a href="./../Classes/SOS.html">SOS</a>, <a href="./../Classes/BLowPass.html">BLowPass</a>, <a href="./../Classes/BLowPass4.html">BLowPass4</a>, <a href="./../Classes/BHiPass.html">BHiPass</a>, <a href="./../Classes/BHiPass4.html">BHiPass4</a>, <a href="./../Classes/BPeakEQ.html">BPeakEQ</a>, <a href="./../Classes/BLowShelf.html">BLowShelf</a>, <a href="./../Classes/BHiShelf.html">BHiShelf</a>, <a href="./../Classes/BBandPass.html">BBandPass</a>, <a href="./../Classes/BAllPass.html">BAllPass</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>The B equalization suite is based on the Second Order Section (<a href="./../Classes/SOS.html">SOS</a>) biquad UGen.<div class='note'><span class='notelabel'>NOTE:</span> Biquad coefficient calculations imply certain amount of CPU overhead. These plugin UGens contain optimizations such that the coefficients get updated only when there has been a change to one of the filter's parameters. This can cause spikes in CPU performance and should be considered when using several of these units.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>BBandStop.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in</span>, <span class='argstr'>freq: 1200</span>, <span class='argstr'>bw: 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'>in<td class='argumentdesc'>
<p>input signal to be processed.<tr><td class='argumentname'>freq<td class='argumentdesc'>
<p>center frequency. WARNING: due to the nature of its implementation frequency values close to 0 may cause glitches and/or extremely loud audio artifacts!<tr><td class='argumentname'>bw<td class='argumentdesc'>
<p>the bandwidth in octaves between -3 dB frequencies.<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='method-code'><span class='method-prefix'>BBandStop.</span><a class='method-name' name='*sc' href='./../Overviews/Methods.html#sc'>sc</a>(<span class='argstr'>dummy</span>, <span class='argstr'>freq: 1200</span>, <span class='argstr'>bw: 1</span>)</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'>s.boot;
(
z = {
BBandStop.ar(
SoundIn.ar([0,1]),
MouseX.kr(20, 20000, \exponential),
MouseY.kr(0.0, 10.0, \linear), // bw
0.5); // mul
}.play)
z.release;
(
z = {
BBandStop.ar(
WhiteNoise.ar ! 2,
MouseX.kr(20, 20000, \exponential),
MouseY.kr(0.0, 10.0, \linear), // bw
0.1); // mul
}.play)
z.release;
(
z = { // drill...
BBandStop.ar(
SinOsc.ar(1000) ! 2,
MouseX.kr(800, 1200, \exponential),
MouseY.kr(0.0, 10.0, \linear), // bw
0.1); // mul
}.play)
z.release;
(
z = { // nada
BBandStop.ar(
SinOsc.ar(1000) ! 2,
1000,
MouseY.kr(0.0, 10.0, \linear), // bw
0.5); // mul
}.play)
z.release;</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BBandStop.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BBandStop.schelp</a><br>link::Classes/BBandStop::<br></div></div></body></html>

View file

@ -0,0 +1,182 @@
<!doctype html><html lang='en'><head><title>BBlockerProgram | SuperCollider 3.10.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'BBlockerProgram';
var scdoc_sc_version = '3.10.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>BBlockerProgram:</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='#*new'>new</a> </li>
<li class='toc3'><a href='#*instructions'>instructions</a> </li>
<li class='toc3'><a href='#*descs'>descs</a> </li>
<li class='toc3'><a href='#*printDescs'>printDescs</a> </li>
<li class='toc3'><a href='#*find'>find</a> </li>
<li class='toc3'><a href='#*descOf'>descOf</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='#*initStates'>initStates</a> </li>
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-fillBuffer'>fillBuffer</a> </li>
<li class='toc3'><a href='#-program'>program</a> </li>
<li class='toc3'><a href='#-makeBuffer'>makeBuffer</a> </li>
<li class='toc3'><a href='#-collection'>collection</a> </li>
<li class='toc3'><a href='#-asLocalBuf'>asLocalBuf</a> </li>
<li class='toc3'><a href='#-play'>play</a> </li>
<li class='toc3'><a href='#-ar'>ar</a> </li>
<li class='toc3'><a href='#-fillUpRandom'>fillUpRandom</a> </li>
<li class='toc3'><a href='#-scope'>scope</a> </li>
<li class='toc3'><a href='#-plot'>plot</a> </li>
<li class='toc3'><a href='#-decompile'>decompile</a> </li>
<li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-pr_rTranslate'>pr_rTranslate</a> </li>
<li class='toc3'><a href='#-pr_translate'>pr_translate</a> </li>
</ul></ul><li class='toc1'><a href='#examples'>Examples</a></li>
<ul class='toc'></ul></ul></div><div id='menubar'></div>
<div class='contents'>
<div class='header'>
<div id='label'>
<span id='folder'>Classes (extension)</span>
| <span id='categories'><a href='./../Browse.html#Convenience'>Convenience</a></span>
</div><h1>BBlockerProgram<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
<div class='extension-indicator-ctr' title='This help file originates from a third-party quark or plugin for SuperCollider.'><img class='extension-indicator-icon' alt='Extension' src='./../images/plugin.png'><span class='extension-indicator-text'>Extension</span></div></h1>
<div id='summary'>Convenience class to create and store BetaBlocker programs</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/BetablockerUGens/BBlockerProgram.sc' title='/Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/BetablockerUGens/BBlockerProgram.sc'>BBlockerProgram.sc</a></div><div id='related'>See also: <a href="./../Classes/BBlockerBuf.html">BBlockerBuf</a>, <a href="./../Classes/BBlockerProgram.html">BBlockerProgram</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Convenience class to create and store assembly programs for the BetaBlocker VChip.
<p>See <a href="http://tai-studio.org/portfolio/chip-interpretations.html">http://tai-studio.org/portfolio/chip-interpretations.html</a> for details.<div class='image'><img src='betablocker-01-small.png'/></div>
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>program</span>)</h3>
<div class='method'>
<p>creates a new BBlocker program:<textarea class='editor'>// sawtooth ramp
a = BBlockerProgram([\ORG, \INC, \JMP, 1]);</textarea>
<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>program<td class='argumentdesc'>
<p>Mixed array of instructions (Symbols) and Integers (will be interpreted either as instructions or as values for unary instructions like <code>\JMP</code> or <code>\PHSL</code>).</table></div><h3 class='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*instructions' href='./../Overviews/Methods.html#instructions'>instructions</a></h3>
<div class='method'>
<p>all instructions</div><h3 class='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*descs' href='./../Overviews/Methods.html#descs'>descs</a></h3>
<div class='method'>
<p>all descriptions</div><h3 class='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*printDescs' href='./../Overviews/Methods.html#printDescs'>printDescs</a></h3>
<div class='method'>
<p>print description for each instruction</div><h3 class='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*find' href='./../Overviews/Methods.html#find'>find</a>(<span class='argstr'>identifier</span>)</h3>
<div class='method'>
<p>search for command<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>identifier<td class='argumentdesc'>
<p>search term</table><h4>Returns:</h4>
<div class='returnvalue'>
<p>array of commands</div></div><h3 class='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*descOf' href='./../Overviews/Methods.html#descOf'>descOf</a>(<span class='argstr'>key</span>)</h3>
<div class='method'>
<p>find description for command<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>key<td class='argumentdesc'>
<p>command</table><h4>Returns:</h4>
<div class='returnvalue'>
<p>description string</div></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='method-code'><span class='method-prefix'>BBlockerProgram.</span><a class='method-name' name='*initStates' href='./../Overviews/Methods.html#initStates'>initStates</a></h3>
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fillBuffer' href='./../Overviews/Methods.html#fillBuffer'>fillBuffer</a>(<span class='argstr'>buffer</span>)</h3>
<div class='method'>
<p>fill Buffer with compiled code.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>buffer<td class='argumentdesc'>
<p>buffer to be filled.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-program' href='./../Overviews/Methods.html#program'>program</a></h3>
<div class='method'>
<p><h4>Returns:</h4>
<div class='returnvalue'>
<p>the program</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-makeBuffer' href='./../Overviews/Methods.html#makeBuffer'>makeBuffer</a>(<span class='argstr'>server</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>create a Buffer and fill it with conpiled code.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>instance of Server on which the Buffer is created<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>action to be evaluated after successful buffer creation</table><h4>Returns:</h4>
<div class='returnvalue'>
<p>the Buffer</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-collection' href='./../Overviews/Methods.html#collection'>collection</a>(<span class='argstr'>force: false</span>)</h3>
<div class='method'>
<p>array with <code>256</code> entries containing the codeified program.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>force<td class='argumentdesc'>
<p>if <code>true</code>, force re-computation.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asLocalBuf' href='./../Overviews/Methods.html#asLocalBuf'>asLocalBuf</a></h3>
<div class='method'>
<p><h4>Returns:</h4>
<div class='returnvalue'>
<p>compiled program as a LocalBuf object</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-play' href='./../Overviews/Methods.html#play'>play</a>(<span class='argstr'>rate: 20000</span>, <span class='argstr'>using</span>, <span class='argstr'>leak: false</span>, <span class='argstr'>vol: 0.1</span>, <span class='argstr'>force: true</span>)</h3>
<div class='method'>
<p>play program.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>rate<td class='argumentdesc'>
<p>rate of operation<tr><td class='argumentname'>using<td class='argumentdesc'>
<p>instance of <a href="./../Classes/Server.html">Server</a> or <a href="./../Classes/Buffer.html">Buffer</a>. If a buffer is given, this is used to load the program into.<tr><td class='argumentname'>leak<td class='argumentdesc'>
<p>if <code>true</code>, encapsulate output by a <a href="./../Classes/LeakDC.html">LeakDC</a>.<tr><td class='argumentname'>vol<td class='argumentdesc'>
<p>attenuation<tr><td class='argumentname'>force<td class='argumentdesc'>
<p>force re-filling of collection with program (plus possible randomness)</table><h4>Returns:</h4>
<div class='returnvalue'>
<p><a href="./../Classes/Synth.html">Synth</a> evaluating and playing the program.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>rate: 20000</span>, <span class='argstr'>using</span>, <span class='argstr'>leak: false</span>, <span class='argstr'>vol: 1</span>, <span class='argstr'>force: false</span>)</h3>
<div class='method'>
<p>server playback.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>rate<td class='argumentdesc'>
<p>rate of operation<tr><td class='argumentname'>using<td class='argumentdesc'>
<p>instance of <a href="./../Classes/Server.html">Server</a> or <a href="./../Classes/Buffer.html">Buffer</a>. If a buffer is given, this is used to load the program into.<tr><td class='argumentname'>leak<td class='argumentdesc'>
<p>if <code>true</code>, encapsulate output by a <a href="./../Classes/LeakDC.html">LeakDC</a>.<tr><td class='argumentname'>vol<td class='argumentdesc'>
<p>attenuation<tr><td class='argumentname'>force<td class='argumentdesc'>
<p>force re-filling of collection with program (plus possible randomness)</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fillUpRandom' href='./../Overviews/Methods.html#fillUpRandom'>fillUpRandom</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fillUpRandom' href='./../Overviews/Methods.html#fillUpRandom'>fillUpRandom</a> = value</h3>
<div class='method'>
<p>if <code>true</code>, fill remaining space in collection/<a href="./../Classes/Buffer.html">Buffer</a> with random numbers between <code>0</code> and <code>255</code>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-scope' href='./../Overviews/Methods.html#scope'>scope</a>(<span class='argstr'>rate: 20000</span>, <span class='argstr'>using</span>, <span class='argstr'>leak: false</span>, <span class='argstr'>vol: 0.1</span>, <span class='argstr'>force: true</span>)</h3>
<div class='method'>
<p>run program and scope it.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>rate<td class='argumentdesc'>
<p>rate of operation<tr><td class='argumentname'>using<td class='argumentdesc'>
<p>instance of <a href="./../Classes/Server.html">Server</a> or <a href="./../Classes/Buffer.html">Buffer</a>. If a buffer is given, this is used to load the program into.<tr><td class='argumentname'>leak<td class='argumentdesc'>
<p>if <code>true</code>, encapsulate output by a <a href="./../Classes/LeakDC.html">LeakDC</a>.<tr><td class='argumentname'>vol<td class='argumentdesc'>
<p>attenuation<tr><td class='argumentname'>force<td class='argumentdesc'>
<p>force re-filling of collection with program (plus possible randomness)</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-plot' href='./../Overviews/Methods.html#plot'>plot</a>(<span class='argstr'>rate: 20000</span>, <span class='argstr'>using</span>, <span class='argstr'>leak: false</span>, <span class='argstr'>duration: 1</span>, <span class='argstr'>force: true</span>)</h3>
<div class='method'>
<p>run program and plot its results.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>rate<td class='argumentdesc'>
<p>rate of operation<tr><td class='argumentname'>using<td class='argumentdesc'>
<p>instance of <a href="./../Classes/Server.html">Server</a> or <a href="./../Classes/Buffer.html">Buffer</a>. If a buffer is given, this is used to load the program into.<tr><td class='argumentname'>leak<td class='argumentdesc'>
<p>if <code>true</code>, encapsulate output by a <a href="./../Classes/LeakDC.html">LeakDC</a>.<tr><td class='argumentname'>duration<td class='argumentdesc'>
<p>time to run in seconds.<tr><td class='argumentname'>force<td class='argumentdesc'>
<p>force re-filling of collection with program (plus possible randomness)</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-decompile' href='./../Overviews/Methods.html#decompile'>decompile</a>(<span class='argstr'>force: false</span>)</h3>
<div class='method'>
<p>decompile content of collection.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>force<td class='argumentdesc'>
<p>if <code>true</code>, force re-write of (intermediately used) collection.</table><h4>Returns:</h4>
<div class='returnvalue'>
<p>program</div></div><h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pr_rTranslate' href='./../Overviews/Methods.html#pr_rTranslate'>pr_rTranslate</a>(<span class='argstr'>val</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pr_translate' href='./../Overviews/Methods.html#pr_translate'>pr_translate</a>(<span class='argstr'>val</span>)</h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<textarea class='editor'>(some example code)</textarea>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/BetablockerUGens/HelpSource/Classes/BBlockerProgram.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/BetablockerUGens/HelpSource/Classes/BBlockerProgram.schelp</a><br>link::Classes/BBlockerProgram::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,69 @@
<!doctype html><html lang='en'><head><title>Blip | SuperCollider 3.12.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'Blip';
var scdoc_sc_version = '3.12.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>Blip:</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> </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='#*kr'>kr</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><div id='menubar'></div>
<div class='contents'>
<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>Generators'>Generators</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
</div><h1>Blip<span id='superclasses'> : <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'>Band limited impulse oscillator.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/FSinOsc.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/FSinOsc.sc'>FSinOsc.sc</a></div><div id='related'>See also: <a href="./../Classes/Impulse.html">Impulse</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Band Limited ImPulse generator. All harmonics have equal amplitude. This is the equivalent of 'buzz' in <em>MusicN</em> languages.
<p><em>Synth-O-Matic</em> (1990) had an impulse generator called blip, hence that name here rather than 'buzz'.
<p>It is improved from other implementations in that it will crossfade in a control period when the number of harmonics changes, so that there are no audible pops. It also eliminates the divide in the formula by using a 1/sin table (with special precautions taken for 1/0). The lookup tables are linearly interpolated for better quality.<div class='warning'><span class='warninglabel'>WARNING:</span> This waveform in its raw form could be damaging to your ears at high amplitudes or for long periods.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>Blip.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>freq: 440.0</span>, <span class='argstr'>numharm: 200.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>freq<td class='argumentdesc'>
<p>Frequency in Hertz.<tr><td class='argumentname'>numharm<td class='argumentdesc'>
<p>Number of harmonics. This may be lowered internally if it would cause aliasing.<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='method-code'><span class='method-prefix'>Blip.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>freq: 440.0</span>, <span class='argstr'>numharm: 200.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</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>
<textarea class='editor'>// modulate frequency
{ Blip.ar(XLine.kr(20000,200,6),100,0.2) }.play;
// modulate numharmonics
{ Blip.ar(200,Line.kr(1,100,20),0.2) }.play;</textarea>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Blip.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Blip.schelp</a><br>link::Classes/Blip::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,63 @@
<!doctype html><html lang='en'><head><title>BrownNoise | 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 = 'BrownNoise';
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'>BrownNoise:</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>Generators'>Generators</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Generators>Stochastic'>Stochastic</a></span>
</div><h1>BrownNoise<span id='superclasses'> : <a href="../Classes/WhiteNoise.html">WhiteNoise</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'>Brown Noise.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Noise.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Noise.sc'>Noise.sc</a></div><div id='related'>See also: <a href="./../Classes/ClipNoise.html">ClipNoise</a>, <a href="./../Classes/GrayNoise.html">GrayNoise</a>, <a href="./../Classes/PinkNoise.html">PinkNoise</a>, <a href="./../Classes/WhiteNoise.html">WhiteNoise</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Generates noise whose spectrum falls off in power by 6 dB per octave.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>BrownNoise.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/WhiteNoise.html'>WhiteNoise</a></div>
<h3 class='method-code'><span class='method-prefix'>BrownNoise.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/WhiteNoise.html'>WhiteNoise</a></div>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<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>
<p>compare:<pre class='code prettyprint lang-sc'>{ BrownNoise.ar(0.1) }.play;
{ WhiteNoise.ar(0.1) }.play;</pre>
<p>brownian noise as a frequency modulator:<pre class='code prettyprint lang-sc'>{ SinOsc.ar(BrownNoise.ar(100, 200)) * 0.1 }.play;</pre>
<p>filtered brown noise:<pre class='code prettyprint lang-sc'>{ BPF.ar(BrownNoise.ar(0.1.dup), MouseX.kr(40, 17000, 1), 0.2) }.play;</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BrownNoise.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BrownNoise.schelp</a><br>link::Classes/BrownNoise::<br></div></div></body></html>

View file

@ -0,0 +1,71 @@
<html><head><title>Brusselator</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#UGens>Generators>Chaotic'>UGens>Generators>Chaotic</a></div>
<h1>Brusselator</h1>
<div id='summary'>Prigogine oscillator</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SLUGens/classes/SLUGens.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SLUGens/classes/SLUGens.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/MultiOutUGen.html">MultiOutUGen</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/Oregonator.html">Oregonator</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>
<p>//SLUGens released under the GNU GPL as extensions for SuperCollider 3, by Nick Collins, <a href="http://composerprogrammer.com/index.html">http://composerprogrammer.com/index.html</a><a class='anchor' name='kw_SLUGens'>&nbsp;</a><h2><a class='anchor' name='description'>Description</a></h2>
<p>Euler ODE solver implementation of the Brusselator equations (<a href="http://en.wikipedia.org/wiki/Brusselator).">http://en.wikipedia.org/wiki/Brusselator).</a>
<p>x' = x^2*y - (mu+1)*x + gamma
<p>y' = -x^2*y + mu*x
<p>All inputs can have .kr rate UGens plugged in.
<p>Nonlinear oscillators can blow up, treat with caution. This one is relatively stable however, converging to a fixed point, or a limit cycle, in the upper positive quadrant. for some reasonable values. Just be careful if mu gets much bigger than gamma (though making it larger is necessary to get some chaotic oscillation behaviour); you can retrigger to get back to normal, and keep the rate lower to avoid Euler integration blow-ups. You may just need to scale and push down around zero to avoid a DC offset. Fixed point is at (x,y) = (gamma, mu/gamma)<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'>reset: 0</span>, <span class='argstr'>rate: 0.01</span>, <span class='argstr'>mu: 1</span>, <span class='argstr'>gamma: 1</span>, <span class='argstr'>initx: 0.5</span>, <span class='argstr'>inity: 0.5</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'>reset<td class='argumentdesc'>
<p>If &gt; 0.0, restart with new initial conditions sampled from initx, inity<tr><td class='argumentname'>rate<td class='argumentdesc'>
<p>update rate for a sample step<tr><td class='argumentname'>mu<td class='argumentdesc'>
<p>equation constant. Set mu &gt; (gamma**2 + 1.0) for the more fun limit cycle regions<tr><td class='argumentname'>gamma<td class='argumentdesc'>
<p>equation constant<tr><td class='argumentname'>initx<td class='argumentdesc'>
<p>reset value for x<tr><td class='argumentname'>inity<td class='argumentdesc'>
<p>reset value for 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'>//listen to x and y output
{Out.ar(0,Brusselator.ar(Impulse.kr(MouseY.kr(1,50,'exponential')),MouseX.kr(0.01,1,'exponential')))}.play
//avoid DC offset (default gamma is 1.0, listening to x only, so take off gamma
{Out.ar(0,Pan2.ar((Brusselator.ar(Impulse.kr(MouseY.kr(1,50,'exponential')),MouseX.kr(0.01,1,'exponential')))[0] - 1.0) )}.play
//fun time, stable oscillation with these parameters
{var mu = MouseY.kr(1.0,1.5); Out.ar(0,Pan2.ar(Brusselator.ar(0.0,MouseX.kr(0.01,0.1,'exponential'),mu,0.25)[0] ) )}.play
{ Out.ar(0,Pan2.ar(Brusselator.ar(Impulse.kr(10),MouseX.kr(0.01,0.1,'exponential'),1.5,0.25,MouseY.kr(-1.0,1.0),0.0)[0]) )}.play
{ Out.ar(0,Brusselator.ar(Impulse.kr(MouseY.kr(1,500,'exponential')),MouseX.kr(0.01,0.1,'exponential'),1.15,0.5,0.5,1.0) )}.play</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SLUGens/HelpSource/Classes/Brusselator.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SLUGens/HelpSource/Classes/Brusselator.schelp</a><br>link::Classes/Brusselator::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,58 @@
<html><head><title>BufRateScale</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>Buffer>Info'>UGens>Buffer>Info</a></div>
<h1>BufRateScale</h1>
<div id='summary'>Buffer rate scaling in respect to server samplerate.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InfoUGens.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InfoUGens.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/BufInfoUGenBase.html">BufInfoUGenBase</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/BufChannels.html">BufChannels</a>, <a href="./../Classes/BufDur.html">BufDur</a>, <a href="./../Classes/BufFrames.html">BufFrames</a>, <a href="./../Classes/BufSampleRate.html">BufSampleRate</a>, <a href="./../Classes/BufSamples.html">BufSamples</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='#*kr'>kr</a> <a href='#*ir'>ir</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>Returns a ratio by which the playback of a soundfile is to be scaled.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>bufnum</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/BufInfoUGenBase.html'>BufInfoUGenBase</a></div>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*ir' href='./../Overviews/Methods.html#ir'>ir</a> (<span class='argstr'>bufnum</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/BufInfoUGenBase.html'>BufInfoUGenBase</a></div>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>Buffer index.</table><h4>Returns:</h4>
<div class='returnvalue'>
<p>a ratio by which the playback of a soundfile is to be scaled.</div><h4>Discussion:</h4>
<div class='warning'><span class='warninglabel'>WARNING:</span> The <code class='code prettyprint lang-sc'>.ir</code> method is not the safest choice. Since a buffer can be reallocated at any time, using <code class='code prettyprint lang-sc'>.ir</code> will not track the changes.</div></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'>b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
(
x = { arg rate=1;
BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b) * rate, 0, BufFrames.kr(b)))
}.play;
)</pre>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BufRateScale.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/BufRateScale.schelp</a><br>link::Classes/BufRateScale::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,880 @@
<!doctype html><html lang='en'><head><title>Buffer | 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 = 'Buffer';
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'>Buffer:</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'><li class='toc2'><a href='#Buffer%20Numbers%20and%20Allocation'>Buffer Numbers and Allocation</a></li>
<ul class='toc'></ul><li class='toc2'><a href='#Multichannel%20Buffers'>Multichannel Buffers</a></li>
<ul class='toc'></ul><li class='toc2'><a href='#Completion%20Messages%20and%20Action%20Functions'>Completion Messages and Action Functions</a></li>
<ul class='toc'></ul><li class='toc2'><a href='#Bundling'>Bundling</a></li>
<ul class='toc'></ul></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
<ul class='toc'><li class='toc2'><a href='#Creation%20with%20Immediate%20Memory%20Allocation'>Creation with Immediate Memory Allocation</a></li>
<ul class='toc'><li class='toc3'><a href='#*alloc'>alloc</a> </li>
<li class='toc3'><a href='#*allocConsecutive'>allocConsecutive</a> </li>
<li class='toc3'><a href='#*read'>read</a> </li>
<li class='toc3'><a href='#*readChannel'>readChannel</a> </li>
<li class='toc3'><a href='#*readNoUpdate'>readNoUpdate</a> </li>
<li class='toc3'><a href='#*cueSoundFile'>cueSoundFile</a> </li>
<li class='toc3'><a href='#*loadCollection'>loadCollection</a> </li>
<li class='toc3'><a href='#*sendCollection'>sendCollection</a> </li>
<li class='toc3'><a href='#*loadDialog'>loadDialog</a> </li>
</ul><li class='toc2'><a href='#Creation%20without%20Immediate%20Memory%20Allocation'>Creation without Immediate Memory Allocation</a></li>
<ul class='toc'><li class='toc3'><a href='#*new'>new</a> </li>
</ul><li class='toc2'><a href='#Cached%20Buffers'>Cached Buffers</a></li>
<ul class='toc'><li class='toc3'><a href='#*cachedBufferAt'>cachedBufferAt</a> </li>
<li class='toc3'><a href='#*cachedBuffersDo'>cachedBuffersDo</a> </li>
</ul><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='#*freeAll'>freeAll</a> </li>
<li class='toc3'><a href='#*readWithInfo'>readWithInfo</a> </li>
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
<ul class='toc'><li class='toc2'><a href='#Variables'>Variables</a></li>
<ul class='toc'><li class='toc3'><a href='#-server'>server</a> </li>
<li class='toc3'><a href='#-bufnum'>bufnum</a> </li>
<li class='toc3'><a href='#-numFrames'>numFrames</a> </li>
<li class='toc3'><a href='#-numChannels'>numChannels</a> </li>
<li class='toc3'><a href='#-sampleRate'>sampleRate</a> </li>
<li class='toc3'><a href='#-path'>path</a> </li>
</ul><li class='toc2'><a href='#Explicit%20allocation'>Explicit allocation</a></li>
<ul class='toc'><li class='toc3'><a href='#-alloc'>alloc</a> <a href='#-allocMsg'>allocMsg</a> </li>
<li class='toc3'><a href='#-allocRead'>allocRead</a> <a href='#-allocReadMsg'>allocReadMsg</a> </li>
<li class='toc3'><a href='#-allocReadChannel'>allocReadChannel</a> <a href='#-allocReadChannelMsg'>allocReadChannelMsg</a> </li>
</ul><li class='toc2'><a href='#Other%20methods'>Other methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-read'>read</a> </li>
<li class='toc3'><a href='#-readMsg'>readMsg</a> </li>
<li class='toc3'><a href='#-readChannel'>readChannel</a> </li>
<li class='toc3'><a href='#-readChannelMsg'>readChannelMsg</a> </li>
<li class='toc3'><a href='#-cueSoundFile'>cueSoundFile</a> <a href='#-cueSoundFileMsg'>cueSoundFileMsg</a> </li>
<li class='toc3'><a href='#-write'>write</a> <a href='#-writeMsg'>writeMsg</a> </li>
<li class='toc3'><a href='#-free'>free</a> <a href='#-freeMsg'>freeMsg</a> </li>
<li class='toc3'><a href='#-zero'>zero</a> <a href='#-zeroMsg'>zeroMsg</a> </li>
<li class='toc3'><a href='#-set'>set</a> <a href='#-setMsg'>setMsg</a> </li>
<li class='toc3'><a href='#-setn'>setn</a> <a href='#-setnMsg'>setnMsg</a> </li>
<li class='toc3'><a href='#-loadCollection'>loadCollection</a> </li>
<li class='toc3'><a href='#-sendCollection'>sendCollection</a> </li>
<li class='toc3'><a href='#-get'>get</a> <a href='#-getMsg'>getMsg</a> </li>
<li class='toc3'><a href='#-getn'>getn</a> <a href='#-getMsg'>getMsg</a> </li>
<li class='toc3'><a href='#-loadToFloatArray'>loadToFloatArray</a> </li>
<li class='toc3'><a href='#-getToFloatArray'>getToFloatArray</a> </li>
<li class='toc3'><a href='#-normalize'>normalize</a> <a href='#-normalizeMsg'>normalizeMsg</a> </li>
<li class='toc3'><a href='#-fill'>fill</a> <a href='#-fillMsg'>fillMsg</a> </li>
<li class='toc3'><a href='#-copyData'>copyData</a> <a href='#-copyMsg'>copyMsg</a> </li>
<li class='toc3'><a href='#-close'>close</a> <a href='#-closeMsg'>closeMsg</a> </li>
<li class='toc3'><a href='#-plot'>plot</a> </li>
<li class='toc3'><a href='#-play'>play</a> </li>
<li class='toc3'><a href='#-query'>query</a> </li>
<li class='toc3'><a href='#-updateInfo'>updateInfo</a> </li>
</ul><li class='toc2'><a href='#Buffer%20Fill%20Commands'>Buffer Fill Commands</a></li>
<ul class='toc'><li class='toc3'><a href='#-gen'>gen</a> <a href='#-genMsg'>genMsg</a> </li>
<li class='toc3'><a href='#-sine1'>sine1</a> <a href='#-sine1Msg'>sine1Msg</a> </li>
<li class='toc3'><a href='#-sine2'>sine2</a> <a href='#-sine2Msg'>sine2Msg</a> </li>
<li class='toc3'><a href='#-sine3'>sine3</a> <a href='#-sine3Msg'>sine3Msg</a> </li>
<li class='toc3'><a href='#-cheby'>cheby</a> <a href='#-chebyMsg'>chebyMsg</a> </li>
</ul><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-asBufWithValues'>asBufWithValues</a> </li>
<li class='toc3'><a href='#-asControlInput'>asControlInput</a> </li>
<li class='toc3'><a href='#-asUGenInput'>asUGenInput</a> </li>
<li class='toc3'><a href='#-cache'>cache</a> </li>
<li class='toc3'><a href='#-doOnInfo'>doOnInfo</a> </li>
<li class='toc3'><a href='#-duration'>duration</a> </li>
<li class='toc3'><a href='#-getnMsg'>getnMsg</a> </li>
<li class='toc3'><a href='#-memoryFootprint'>memoryFootprint</a> </li>
<li class='toc3'><a href='#-preparePartConv'>preparePartConv</a> </li>
<li class='toc3'><a href='#-queryDone'>queryDone</a> </li>
<li class='toc3'><a href='#-queryMsg'>queryMsg</a> </li>
<li class='toc3'><a href='#-readNoUpdate'>readNoUpdate</a> </li>
<li class='toc3'><a href='#-setnMsgArgs'>setnMsgArgs</a> </li>
<li class='toc3'><a href='#-startFrame'>startFrame</a> </li>
<li class='toc3'><a href='#-streamCollection'>streamCollection</a> </li>
<li class='toc3'><a href='#-synthArg'>synthArg</a> </li>
<li class='toc3'><a href='#-uncache'>uncache</a> </li>
</ul></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#Server'>Server</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Server>Abstractions'>Abstractions</a></span>
</div><h1>Buffer<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>Client-side representation of a buffer on a server</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/Buffer.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/Buffer.sc'>Buffer.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/BBCutBuffer.html">BBCutBuffer</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>A Buffer object is a client-side abstraction for a server-side buffer. (SuperCollider's server-client architecture is a common source of confusion when working with Buffer objects, so please see <a href="./../Guides/ClientVsServer.html">Client vs Server</a>.)
<p>A buffer is most often used to hold sampled audio, such as a soundfile loaded into memory, but can be used to hold other types of data as well. Technically speaking, a buffer on the server is a globally available, multichannel array of 32-bit floating-point numbers. It also has an associated sample rate, represented in Hertz as a 64-bit float.
<p>The Buffer class encapsulates a number of common tasks, OSC messages, and capabilities related to server-side buffers see the examples lower down this document for many examples of using Buffers for sound playback and recording.
<p>Buffers are commonly used with <a href="./../Classes/PlayBuf.html">PlayBuf</a>, <a href="./../Classes/RecordBuf.html">RecordBuf</a>, <a href="./../Classes/DiskIn.html">DiskIn</a>, <a href="./../Classes/DiskOut.html">DiskOut</a>, <a href="./../Classes/BufWr.html">BufWr</a>, <a href="./../Classes/BufRd.html">BufRd</a>, and other UGens. (See their individual help files for more examples.) Buffers can be freed or altered even while being accessed. See <a href="./../Reference/Server-Architecture.html">Server Architecture</a> for some technical details.
<p>Buffer objects should not be created or modified within a <a href="./../Classes/SynthDef.html">SynthDef</a>. If this is needed, see <a href="./../Classes/LocalBuf.html">LocalBuf</a>.<h3><a class='anchor' name='Buffer%20Numbers%20and%20Allocation'>Buffer Numbers and Allocation</a></h3>
<p>Although the number of buffers on a server is set at the time it is booted, memory must still be allocated within the server app before they can hold values. (At boot time all buffers have a size of 0.)
<p><a href="./../Classes/Server.html">Server</a>-side buffers are identified by number, starting from 0. When using Buffer objects, buffer numbers are automatically allocated from the Server's bufferAllocator. When you call <code class='code prettyprint lang-sc'>.free</code> on a Buffer object it will release the buffer's memory on the server, and free the buffer number for future reallocation. See <a href="./../Classes/ServerOptions.html">ServerOptions</a> for details on setting the number of available buffers.
<p>Normally you should not need to supply a buffer number (see <a href="./../Classes/Buffer.html#*alloc">Buffer: *alloc</a>). You should only do so if you are sure you know what you are doing. Similarly, in normal use you should not need to access the buffer number, since instances of Buffer can be used directly as <a href="./../Classes/UGen.html">UGen</a> inputs or <a href="./../Classes/Synth.html">Synth</a> args.<h3><a class='anchor' name='Multichannel%20Buffers'>Multichannel Buffers</a></h3>
<p>Multichannel buffers interleave their data. Thus the actual number of available values when requesting or setting values by index using methods such as <code class='code prettyprint lang-sc'>set, setn, get, getn</code>, etc., is equal to <code class='code prettyprint lang-sc'>numFrames * numChannels</code>. Indices start at 0 and go up to <code class='code prettyprint lang-sc'>(numFrames * numChannels) - 1</code>. In a two channel buffer for instance, index 0 will be the first value of the first channel, index 1 will be the first value of the second channel, index 2 will be the second value of the first channel, and so on.
<p>In some cases it is simpler to use multiple single channel buffers instead of a single multichannel one.<h3><a class='anchor' name='Completion%20Messages%20and%20Action%20Functions'>Completion Messages and Action Functions</a></h3>
<p>Many buffer operations (such as reading and writing files) are asynchronous, meaning that they will take an arbitrary amount of time to complete. Asynchronous commands are passed to a background thread on the server so as not to steal CPU time from the audio synthesis thread. Since they can last an arbitrary amount of time it is convenient to be able to specify something else that can be done immediately on completion. The ability to do this is implemented in two ways in Buffer's various methods: completion messages and action functions.
<p>A completion message is a second OSC command which is included in the message which is sent to the server. (See <a href="./../Guides/NodeMessaging.html">Node Messaging</a> for a discussion of OSC messages.) The server will execute this immediately upon completing the first command. An action function is a <a href="./../Classes/Function.html">Function</a> which will be evaluated when the client receives the appropriate reply from the server, indicating that the previous command is done. Action functions are therefore inherently more flexible than completion messages, but slightly less efficient due to the small amount of added latency involved in message traffic. Action functions are passed the Buffer object as an argument when they are evaluated.
<p>With Buffer methods that take a completion message, it is also possible to pass in a function that returns an OSC message. As in action functions this will be passed the Buffer as an argument. It is important to understand however that this function will be evaluated after the Buffer object has been created (so that its bufnum and other details are accessible), but before the corresponding message is sent to the server.<h3><a class='anchor' name='Bundling'>Bundling</a></h3>
<p>Many of the methods below have two versions: a regular one which sends its corresponding message to the server immediately, and one which returns the message in an <a href="./../Classes/Array.html">Array</a> so that it can be added to a bundle. It is also possible to capture the messages generated by the regular methods using Server's automated bundling capabilities. See <a href="./../Classes/Server.html">Server</a> and <a href="./../Guides/Bundled-Messages.html">Bundled Server Messages</a> for more details.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3><a class='anchor' name='Creation%20with%20Immediate%20Memory%20Allocation'>Creation with Immediate Memory Allocation</a></h3>
<h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*alloc' href='./../Overviews/Methods.html#alloc'>alloc</a>(<span class='argstr'>server</span>, <span class='argstr'>numFrames</span>, <span class='argstr'>numChannels: 1</span>, <span class='argstr'>completionMessage</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>Create and return a Buffer and immediately allocate the required memory on the server. The buffer's values will be initialised to 0.0.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer. The default is the default Server.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to allocate. Actual memory use will correspond to numFrames * numChannels.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>The number of channels for the Buffer. The default is 1.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>// Allocate 8 second stereo buffer
s.boot;
b = Buffer.alloc(s, s.sampleRate * 8.0, 2);
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*allocConsecutive' href='./../Overviews/Methods.html#allocConsecutive'>allocConsecutive</a>(<span class='argstr'>numBufs: 1</span>, <span class='argstr'>server</span>, <span class='argstr'>numFrames</span>, <span class='argstr'>numChannels: 1</span>, <span class='argstr'>completionMessage</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>Allocates a range of consecutively-numbered buffers, for use with UGens like <a href="./../Classes/VOsc.html">VOsc</a> and <a href="./../Classes/VOsc3.html">VOsc3</a> that require a contiguous block of buffers, and returns an array of corresponding Buffer objects.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>numBufs<td class='argumentdesc'>
<p>The number of consecutively indexed buffers to allocate.<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffers. The default is the default Server.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to allocate in each buffer. Actual memory use will correspond to numFrames * numChannels.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>The number of channels for each buffer. The default is 1.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed each Buffer and its index in the array as arguments when evaluated.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.</table><h4>Discussion:</h4>
<p>N.B. You must treat the array of Buffers as a group. Freeing them individually or reusing them can result in allocation errors. You should free all Buffers in the array at the same time by iterating over it with do.<pre class='code prettyprint lang-sc'>s.boot;
// allocate an array of Buffers and fill them with different harmonics
(
b = Buffer.allocConsecutive(8, s, 4096, 1, { |buf, i|
buf.sine1Msg((1..((i+1)*6)).reciprocal) // completion Messages
});
a = { VOsc.ar(SinOsc.kr(0.5, 0).range(b.first.bufnum + 0.1, b.last.bufnum - 0.1),
[440, 441], 0, 0.2) }.play;
)
a.free;
// iterate over the array and free it
b.do(_.free);</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*read' href='./../Overviews/Methods.html#read'>read</a>(<span class='argstr'>server</span>, <span class='argstr'>path</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>action</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>Allocate a buffer and immediately read a soundfile into it. This method sends a query message as a completion message so that the Buffer's instance variables will be updated automatically.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer.<tr><td class='argumentname'>path<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.</table><h4>Discussion:</h4>
<p>N.B. You cannot rely on the buffer's instance variables being instantly updated, as there is a small amount of latency involved. action will be evaluated upon receipt of the reply to the query, so use this in cases where access to instance variables is needed.<pre class='code prettyprint lang-sc'>// read a soundfile
s.boot;
p = Platform.resourceDir +/+ "sounds/a11wlk01.wav";
b = Buffer.read(s, p);
// now play it
(
x = SynthDef(\help_Buffer, { arg out = 0, bufnum;
Out.ar( out,
PlayBuf.ar(1, bufnum, BufRateScale.kr(bufnum))
)
}).play(s,[\bufnum, b]);
)
x.free; b.free;
// with an action function
// note that the vars are not immediately up-to-date
(
b = Buffer.read(s, p, action: { arg buffer;
("After update:" + buffer.numFrames).postln;
x = { PlayBuf.ar(1, buffer, BufRateScale.kr(buffer)) }.play;
});
("Before update:" + b.numFrames).postln;
)
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*readChannel' href='./../Overviews/Methods.html#readChannel'>readChannel</a>(<span class='argstr'>server</span>, <span class='argstr'>path</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>channels</span>, <span class='argstr'>action</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>As <a href="#*read">*read</a> above, but takes an <a href="./../Classes/Array.html">Array</a> of channel indices to read in, allowing one to read only the selected channels.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer.<tr><td class='argumentname'>path<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>channels<td class='argumentdesc'>
<p>An Array of channels to be read from the soundfile. Indices start from zero. These will be read in the order provided.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
// first a standard read so we can see what's in the file
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/SinedPink.aiff");
// Platform.resourceDir +/+ "sounds/SinedPink.aiff" contains SinOsc on left, PinkNoise on right
b.plot;
b.free;
// Now just the sine
b = Buffer.readChannel(s, Platform.resourceDir +/+ "sounds/SinedPink.aiff", channels: [0]);
b.plot;
b.free;
// Now just the pink noise
b = Buffer.readChannel(s, Platform.resourceDir +/+ "sounds/SinedPink.aiff", channels: [1]);
b.plot;
b.free;
// Now reverse channel order
b = Buffer.readChannel(s, Platform.resourceDir +/+ "sounds/SinedPink.aiff", channels: [1, 0]);
b.plot;
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*readNoUpdate' href='./../Overviews/Methods.html#readNoUpdate'>readNoUpdate</a>(<span class='argstr'>server</span>, <span class='argstr'>path</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>bufnum</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>As <a href="#*read">*read</a> above, but without the automatic update of instance variables. Call <code class='code prettyprint lang-sc'>updateInfo</code> (see below) to update the vars.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer.<tr><td class='argumentname'>path<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>// with a completion message
s.boot;
(
SynthDef(\help_Buffer,{ arg out=0, bufnum;
Out.ar( out,
PlayBuf.ar(1,bufnum,BufRateScale.kr(bufnum))
)
}).add;
y = Synth.basicNew(\help_Buffer); // not sent yet
b = Buffer.readNoUpdate(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav",
completionMessage: { arg buffer;
// synth add its s_new msg to follow
// after the buffer read completes
y.newMsg(s,[\bufnum, buffer],\addToTail)
});
)
// note vars not accurate
b.numFrames; // nil
b.updateInfo;
b.numFrames; // 188893
// when done...
y.free;
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*cueSoundFile' href='./../Overviews/Methods.html#cueSoundFile'>cueSoundFile</a>(<span class='argstr'>server</span>, <span class='argstr'>path</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numChannels: 2</span>, <span class='argstr'>bufferSize: 32768</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>Allocate a buffer and preload a soundfile for streaming in using <a href="./../Classes/DiskIn.html">DiskIn</a>.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer.<tr><td class='argumentname'>path<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The frame of the soundfile that DiskIn will start playing at.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>The number of channels in the soundfile.<tr><td class='argumentname'>bufferSize<td class='argumentdesc'>
<p>This must be a multiple of (2 * the server's block size). 32768 is the default and is suitable for most cases.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
(
SynthDef(\help_Buffer_cue,{ arg out=0,bufnum;
Out.ar(out,
DiskIn.ar( 1, bufnum )
)
}).add;
)
(
s.makeBundle(nil, {
b = Buffer.cueSoundFile(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav", 0, 1);
y = Synth(\help_Buffer_cue, [\bufnum, b], s);
});
)
b.free; y.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*loadCollection' href='./../Overviews/Methods.html#loadCollection'>loadCollection</a>(<span class='argstr'>server</span>, <span class='argstr'>collection</span>, <span class='argstr'>numChannels: 1</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Load a large collection into a buffer on the server. Returns a Buffer object.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to create the buffer.<tr><td class='argumentname'>collection<td class='argumentdesc'>
<p>A subclass of Collection (i.e. an Array) containing only floats and integers. Multi-dimensional arrays will not work.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>The number of channels that the buffer should have. Note that buffers interleave multichannel data. You are responsible for providing an interleaved collection if needed. Multi-dimensional arrays will not work.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.</table><h4>Discussion:</h4>
<p>This is accomplished through writing the collection to a SoundFile and loading it from there. For this reason this method will only work with a server on your local machine. For a remote server use <code class='code prettyprint lang-sc'>sendCollection</code>, below. The file is automatically deleted after loading. This allows for larger collections than setn, below, and is in general the safest way to get a large collection into a buffer. The sample rate of the buffer will be the sample rate of the server on which it is created.<pre class='code prettyprint lang-sc'>s.boot;
(
a = FloatArray.fill(44100 * 5.0, {1.0.rand2}); // 5 seconds of noise
b = Buffer.loadCollection(s, a);
)
// test it
b.get(20000,{|msg| (msg == a[20000]).postln});
// play it
x = { PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 0) * 0.5 }.play;
b.free; x.free;
// interleave a multi-dimensional array
(
l = Signal.sineFill(16384, Array.fill(200, {0}).add(1));
r = Array.fill(16384, {1.0.rand2});
m = [Array.newFrom(l), r]; // a multi-dimensional array
m = m.lace(32768); // interleave the two collections
b = Buffer.loadCollection(s, m, 2, {|buf|
x = { PlayBuf.ar(2, buf, BufRateScale.kr(buf), loop: 1) * 0.5 }.play;
});
)
b.plot;
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*sendCollection' href='./../Overviews/Methods.html#sendCollection'>sendCollection</a>(<span class='argstr'>server</span>, <span class='argstr'>collection</span>, <span class='argstr'>numChannels: 1</span>, <span class='argstr'>wait: -1</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Stream a large collection into a buffer on the server using multiple setn messages. Returns a Buffer object.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to create the buffer.<tr><td class='argumentname'>collection<td class='argumentdesc'>
<p>A subclass of Collection (i.e. an Array) containing only floats and integers. Multi-dimensional arrays will not work.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>The number of channels that the buffer should have. Note that buffers interleave multichannel data. You are responsible for providing an interleaved collection if needed. Multi-dimensional arrays will not work. See the example in <a href="#*loadCollection">*loadCollection</a> above, to see how to do this.<tr><td class='argumentname'>wait<td class='argumentdesc'>
<p>An optional wait time between sending setn messages. In a high traffic situation it may be safer to set this to something above zero, which is the default.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.</table><h4>Discussion:</h4>
<p>This allows for larger collections than setn, below. This is not as safe as <a href="#*loadCollection">*loadCollection</a> above, but will work with servers on remote machines. The sample rate of the buffer will be the sample rate of the server on which it is created.<pre class='code prettyprint lang-sc'>s.boot;
(
a = Array.fill(2000000,{ rrand(0.0,1.0) }); // a LARGE collection
b = Buffer.sendCollection(s, a, 1, 0, {arg buf; "finished".postln;});
)
b.get(1999999, {|msg| (msg == a[1999999]).postln});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*loadDialog' href='./../Overviews/Methods.html#loadDialog'>loadDialog</a>(<span class='argstr'>server</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames</span>, <span class='argstr'>action</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>As <a href="#*read">*read</a> above, but gives you a load dialog window to browse for a file. Cocoa and SwingOSC compatible.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
(
b = Buffer.loadDialog(s, action: { arg buffer;
x = { PlayBuf.ar(buffer.numChannels, buffer, BufRateScale.kr(buffer)) }.play;
});
)
x.free; b.free;</pre>
</div><h3><a class='anchor' name='Creation%20without%20Immediate%20Memory%20Allocation'>Creation without Immediate Memory Allocation</a></h3>
<h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>server</span>, <span class='argstr'>numFrames</span>, <span class='argstr'>numChannels</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>Create and return a new Buffer object, without immediately allocating the corresponding memory on the server. This combined with 'message' methods can be flexible with bundles.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The server on which to allocate the buffer. The default is the default Server.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to allocate. Actual memory use will correspond to numFrames * numChannels.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>The number of channels for the Buffer. The default is 1.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>An explicitly specified buffer number. Supplying a number bypasses the server's buffer allocator, which can lead to conflicts. The best practice is to leave this unset and let the buffer number allocator choose the next available bufnum.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.new(s, 44100 * 8.0, 2);
c = Buffer.new(s, 44100 * 4.0, 2);
b.query; // numFrames = 0
s.sendBundle(nil, b.allocMsg, c.allocMsg); // sent both at the same time
b.query; // now it's right
c.query;
b.free; c.free;</pre>
</div><h3><a class='anchor' name='Cached%20Buffers'>Cached Buffers</a></h3>
<p>To assist with automatic updates of buffer information (see <code class='code prettyprint lang-sc'>updateInfo</code> and <code class='code prettyprint lang-sc'>read</code>), buffer objects are cached in a collection associated with the <a href="./../Classes/Server.html">Server</a> object hosting the buffers. Freeing a buffer removes it from the cache; quitting the server clears all the cached buffers. (This also occurs if the server crashes unexpectedly.)
<p>You may access cached buffers using the following methods.
<p>It may be simpler to access them through the server object:<pre class='code prettyprint lang-sc'>myServer.cachedBufferAt(bufnum)
myServer.cachedBuffersDo(func)
b = Buffer.alloc(s, 2048, 1);
Buffer.cachedBufferAt(s, 0); // assuming b has bufnum 0
s.cachedBufferAt(0); // same result
s.cachedBuffersDo({ |buf| buf.postln });</pre>
<h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*cachedBufferAt' href='./../Overviews/Methods.html#cachedBufferAt'>cachedBufferAt</a>(<span class='argstr'>server</span>, <span class='argstr'>bufnum</span>)</h3>
<div class='method'>
<p>Access a buffer by its number.</div><h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*cachedBuffersDo' href='./../Overviews/Methods.html#cachedBuffersDo'>cachedBuffersDo</a>(<span class='argstr'>server</span>, <span class='argstr'>func</span>)</h3>
<div class='method'>
<p>Iterate over all cached buffers. The iteration is not in any order, but will touch all buffers.</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='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*freeAll' href='./../Overviews/Methods.html#freeAll'>freeAll</a>(<span class='argstr'>server</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>Buffer.</span><a class='method-name' name='*readWithInfo' href='./../Overviews/Methods.html#readWithInfo'>readWithInfo</a>(<span class='argstr'>server</span>, <span class='argstr'>path</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/SuperDirt/classes/extBuffer.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/SuperDirt/classes/extBuffer.sc</a></div>
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
<h3><a class='anchor' name='Variables'>Variables</a></h3>
<p>The following variables have getter methods.<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-server' href='./../Overviews/Methods.html#server'>server</a></h3>
<div class='method'>
<p>Returns the Buffer's Server object.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-bufnum' href='./../Overviews/Methods.html#bufnum'>bufnum</a></h3>
<div class='method'>
<p>Returns the buffer number of the corresponding server-side buffer. In normal use you should not need to access this value, since instances of Buffer can be used directly as UGen inputs or Synth args.<h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.alloc(s,44100 * 8.0,2);
b.bufnum.postln;
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numFrames' href='./../Overviews/Methods.html#numFrames'>numFrames</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numFrames' href='./../Overviews/Methods.html#numFrames'>numFrames</a> = value</h3>
<div class='method'>
<p>Returns the number of sample frames in the corresponding server-side buffer. Note that multichannel buffers interleave their samples, so when dealing with indices in methods like get and getn, the actual number of available values is numFrames * numChannels.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numChannels' href='./../Overviews/Methods.html#numChannels'>numChannels</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numChannels' href='./../Overviews/Methods.html#numChannels'>numChannels</a> = value</h3>
<div class='method'>
<p>Returns the number of channels in the corresponding server-side buffer.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sampleRate' href='./../Overviews/Methods.html#sampleRate'>sampleRate</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sampleRate' href='./../Overviews/Methods.html#sampleRate'>sampleRate</a> = value</h3>
<div class='method'>
<p>Returns the sample rate of the corresponding server-side buffer.
<p>Changing this value only changes what the buffer thinks its sample rate is. It does not resample the buffer's content.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-path' href='./../Overviews/Methods.html#path'>path</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-path' href='./../Overviews/Methods.html#path'>path</a> = value</h3>
<div class='method'>
<p>Returns a string containing the path of a soundfile that has been loaded into the corresponding server-side buffer.</div><h3><a class='anchor' name='Explicit%20allocation'>Explicit allocation</a></h3>
<p>These methods allocate the necessary memory on the server for a Buffer previously created with <a href="#*new">*new</a>.<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-alloc' href='./../Overviews/Methods.html#alloc'>alloc</a>(<span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allocMsg' href='./../Overviews/Methods.html#allocMsg'>allocMsg</a>(<span class='argstr'>completionMessage</span>)</h3>
<div class='method'><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.new(s, 44100 * 8.0, 2);
b.query; // numFrames = 0
b.alloc;
b.query; // numFrames = 352800
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allocRead' href='./../Overviews/Methods.html#allocRead'>allocRead</a>(<span class='argstr'>argpath</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allocReadMsg' href='./../Overviews/Methods.html#allocReadMsg'>allocReadMsg</a>(<span class='argstr'>argpath</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>Read a soundfile into a buffer on the server for a Buffer previously created with <a href="#*new">*new</a>. Note that this will not autoupdate instance variables. Call <code class='code prettyprint lang-sc'>updateInfo</code> in order to do this.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>argpath<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.new(s);
b.allocRead(Platform.resourceDir +/+ "sounds/a11wlk01.wav");
x = { PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 1) * 0.5 }.play;
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allocReadChannel' href='./../Overviews/Methods.html#allocReadChannel'>allocReadChannel</a>(<span class='argstr'>argpath</span>, <span class='argstr'>startFrame</span>, <span class='argstr'>numFrames: 0</span>, <span class='argstr'>channels: -1</span>, <span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-allocReadChannelMsg' href='./../Overviews/Methods.html#allocReadChannelMsg'>allocReadChannelMsg</a>(<span class='argstr'>argpath</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>channels</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>As <a href="#-allocRead">-allocRead</a> above, but allows you to specify which channels to read.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>argpath<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>channels<td class='argumentdesc'>
<p>An Array of channels to be read from the soundfile. Indices start from zero. These will be read in the order provided.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.new(s);
// read only the first channel (a Sine wave) of a stereo file
b.allocReadChannel(Platform.resourceDir +/+ "sounds/SinedPink.aiff", channels: [0]);
x = { PlayBuf.ar(1, b, BufRateScale.kr(b), loop: 1) * 0.5 }.play;
x.free; b.free;</pre>
</div><h3><a class='anchor' name='Other%20methods'>Other methods</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-read' href='./../Overviews/Methods.html#read'>read</a>(<span class='argstr'>argpath</span>, <span class='argstr'>fileStartFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>bufStartFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Read a soundfile into an already allocated buffer.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>argpath<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>fileStartFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>bufStartFrame<td class='argumentdesc'>
<p>The index of the frame in the buffer at which to start reading. The default is 0, which is the beginning of the buffer.<tr><td class='argumentname'>leaveOpen<td class='argumentdesc'>
<p>A boolean indicating whether or not the Buffer should be left 'open'. For use with DiskIn you will want this to be true, as the buffer will be used for streaming the soundfile in from disk. (For this the buffer must have been allocated with a multiple of (2 * synth block size). A common number is 32768 frames. cueSoundFile below, provides a simpler way of doing this.) The default is false which is the correct value for all other cases.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.<tr><td class='argumentname'>(completionMessage)<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-readMsg' href='./../Overviews/Methods.html#readMsg'>readMsg</a>(<span class='argstr'>argpath</span>, <span class='argstr'>fileStartFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>bufStartFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p> construct the message for a read command. args are like those for read, except that last arg is completionMessage.<h4>Discussion:</h4>
<p>Note that if the number of frames in the file is greater than the number of frames in the buffer, it will be truncated. Note that readMsg will not auto-update instance variables. Call updateInfo in order to do this.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-readChannel' href='./../Overviews/Methods.html#readChannel'>readChannel</a>(<span class='argstr'>argpath</span>, <span class='argstr'>fileStartFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>bufStartFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>channels</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>As <a href="#-read">-read</a> above, but allows you to specify which channels to read.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>argpath<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>fileStartFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to read. The default is -1, which will read the whole file.<tr><td class='argumentname'>bufStartFrame<td class='argumentdesc'>
<p>The index of the frame in the buffer at which to start reading. The default is 0, which is the beginning of the buffer.<tr><td class='argumentname'>leaveOpen<td class='argumentdesc'>
<p>A boolean indicating whether or not the Buffer should be left 'open'. For use with DiskIn you will want this to be true, as the buffer will be used for streaming the soundfile in from disk. (For this the buffer must have been allocated with a multiple of (2 * synth block size). A common number is 32768 frames. cueSoundFile below, provides a simpler way of doing this.) The default is false which is the correct value for all other cases.<tr><td class='argumentname'>channels<td class='argumentdesc'>
<p>An Array of channels to be read from the soundfile. Indices start from zero. These will be read in the order provided. The number of channels requested must match this Buffer's numChannels.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.<tr><td class='argumentname'>(completionMessage)<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-readChannelMsg' href='./../Overviews/Methods.html#readChannelMsg'>readChannelMsg</a>(<span class='argstr'>argpath</span>, <span class='argstr'>fileStartFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>bufStartFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>channels</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p> as above for single channel, with last arg being completionMessage.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-cueSoundFile' href='./../Overviews/Methods.html#cueSoundFile'>cueSoundFile</a>(<span class='argstr'>path</span>, <span class='argstr'>startFrame</span>, <span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-cueSoundFileMsg' href='./../Overviews/Methods.html#cueSoundFileMsg'>cueSoundFileMsg</a>(<span class='argstr'>path</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>A convenience method to cue a soundfile into the buffer for use with a <a href="./../Classes/DiskIn.html">DiskIn</a>. The buffer must have been allocated with a multiple of (2 * the server's block size) frames. A common size is 32768 frames.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>path<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be read.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The first frame of the soundfile to read. The default is 0, which is the beginning of the file.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
//create with cueSoundFile class method
b = Buffer.cueSoundFile(s, Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0, 1);
x = { DiskIn.ar(1, b) }.play;
b.close; // must call close in between cueing
// now use like named instance method, but different arguments
b.cueSoundFile(Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff");
// have to do all this to clean up properly!
x.free; b.close; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-write' href='./../Overviews/Methods.html#write'>write</a>(<span class='argstr'>path</span>, <span class='argstr'>headerFormat: "aiff"</span>, <span class='argstr'>sampleFormat: "int24"</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-writeMsg' href='./../Overviews/Methods.html#writeMsg'>writeMsg</a>(<span class='argstr'>path</span>, <span class='argstr'>headerFormat: "aiff"</span>, <span class='argstr'>sampleFormat: "int24"</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>Write the contents of the buffer to a file. See <a href="./../Classes/SoundFile.html">SoundFile</a> for information on valid values for headerFormat and sampleFormat.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>path<td class='argumentdesc'>
<p>A String representing the path of the soundfile to be written. If no path is given, Buffer writes into the default recording directory with a generic name.<tr><td class='argumentname'>headerFormat<td class='argumentdesc'>
<p>A String.<tr><td class='argumentname'>sampleFormat<td class='argumentdesc'>
<p>A String.<tr><td class='argumentname'>numFrames<td class='argumentdesc'>
<p>The number of frames to write. The default is -1, which will write the whole buffer.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The index of the frame in the buffer from which to start writing. The default is 0, which is the beginning of the buffer.<tr><td class='argumentname'>leaveOpen<td class='argumentdesc'>
<p>A boolean indicating whether or not the Buffer should be left 'open'. For use with DiskOut you will want this to be true. The default is false which is the correct value for all other cases.<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-free' href='./../Overviews/Methods.html#free'>free</a>(<span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-freeMsg' href='./../Overviews/Methods.html#freeMsg'>freeMsg</a>(<span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>Release the buffer's memory on the server and return the bufferID back to the server's buffer number allocator for future reuse.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-zero' href='./../Overviews/Methods.html#zero'>zero</a>(<span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-zeroMsg' href='./../Overviews/Methods.html#zeroMsg'>zeroMsg</a>(<span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>Sets all values in this buffer to 0.0.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-set' href='./../Overviews/Methods.html#set'>set</a>(<span class='argstr'>index</span>, <span class='argstr'>float</span> <span class='argstr'>... morePairs</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-setMsg' href='./../Overviews/Methods.html#setMsg'>setMsg</a>(<span class='argstr'>index</span>, <span class='argstr'>float</span> <span class='argstr'>... morePairs</span>)</h3>
<div class='method'>
<p>Set the value in the buffer at index to be equal to float. Additional pairs of indices and floats may be included in the same message.<h4>Discussion:</h4>
<p>Note that multichannel buffers interleave their sample data, therefore the actual number of available values is equal to <code class='code prettyprint lang-sc'>numFrames * numChannels</code>. Indices start at 0.<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.alloc(s, 4, 2);
b.set(0, 0.2, 1, 0.3, 7, 0.4); // set the values at indices 0, 1, and 7.
b.getn(0, 8, {|msg| msg.postln});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-setn' href='./../Overviews/Methods.html#setn'>setn</a>( <span class='argstr'>... args</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-setnMsg' href='./../Overviews/Methods.html#setnMsg'>setnMsg</a>( <span class='argstr'>... args</span>)</h3>
<div class='method'>
<p>Set a contiguous range of values in the buffer starting at the index startAt to be equal to the Array of floats or integers, values. The number of values set corresponds to the size of values. Additional pairs of starting indices and arrays of values may be included in the same message.<h4>Discussion:</h4>
<p>Note that multichannel buffers interleave their sample data, therefore the actual number of available values is equal to <code class='code prettyprint lang-sc'>numFrames * numChannels</code>. You are responsible for interleaving the data in values if needed. Multi-dimensional arrays will not work. Indices start at 0.
<p>N.B. The maximum number of values that you can set with a single setn message is 1633 when the server is using UDP as its communication protocol. Use <a href="#-loadCollection">-loadCollection</a> and <a href="#-sendCollection">-sendCollection</a> to set larger ranges of values.<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.alloc(s,16);
b.setn(0, Array.fill(16, { rrand(0,1) }));
b.getn(0, b.numFrames, {|msg| msg.postln});
b.setn(0, [1, 2, 3], 4, [1, 2, 3]);
b.getn(0, b.numFrames, {|msg| msg.postln});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-loadCollection' href='./../Overviews/Methods.html#loadCollection'>loadCollection</a>(<span class='argstr'>collection</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Load a large collection into this buffer. This is accomplished through writing the collection to a SoundFile and loading it from there. For this reason this method will only work with a server on your local machine. For a remote server use sendCollection, below. The file is automatically deleted after loading.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>collection<td class='argumentdesc'>
<p>A subclass of Collection (i.e. an Array) containing only floats and integers. Multi-dimensional arrays will not work.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The index of the frame at which to start loading the collection. The default is 0, which is the start of the buffer.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.</table><h4>Discussion:</h4>
<p>This allows for larger collections than setn, above, and is in general the safest way to get a large collection into a buffer. The sample rate of the buffer will be the sample rate of the server on which it was created. The number of channels and frames will have been determined when the buffer was allocated. You are responsible for making sure that the size of collection is not greater than numFrames, and for interleaving any data if needed.<pre class='code prettyprint lang-sc'>s.boot;
(
v = Signal.sineFill(128, 1.0/[1,2,3,4,5,6]);
b = Buffer.alloc(s, 128);
)
(
b.loadCollection(v, action: {|buf|
x = { PlayBuf.ar(buf.numChannels, buf, BufRateScale.kr(buf), loop: 1)
* 0.2 }.play;
});
)
x.free; b.free;
// interleave a multi-dimensional array
(
l = Signal.sineFill(16384, Array.fill(200, {0}).add(1));
r = Array.fill(16384, {1.0.rand2});
m = [Array.newFrom(l), r]; // a multi-dimensional array
m = m.lace(32768); // interleave the two collections
b = Buffer.alloc(s, 16384, 2);
)
(
b.loadCollection(m, 0, {|buf|
x = { PlayBuf.ar(2, buf, BufRateScale.kr(buf), loop: 1) * 0.5 }.play;
});
)
b.plot;
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sendCollection' href='./../Overviews/Methods.html#sendCollection'>sendCollection</a>(<span class='argstr'>collection</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>wait: -1</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Stream a large collection into this buffer using multiple setn messages.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>collection<td class='argumentdesc'>
<p>A subclass of Collection (i.e. an Array) containing only floats and integers. Multi-dimensional arrays will not work.<tr><td class='argumentname'>startFrame<td class='argumentdesc'>
<p>The index of the frame at which to start streaming in the collection. The default is 0, which is the start of the buffer.<tr><td class='argumentname'>wait<td class='argumentdesc'>
<p>An optional wait time between sending setn messages. In a high traffic situation it may be safer to set this to something above zero, which is the default.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.</table><h4>Discussion:</h4>
<p>This allows for larger collections than setn. This is not as safe as loadCollection, above, but will work with servers on remote machines. The sample rate of the buffer will be the sample rate of the server on which it is created.<pre class='code prettyprint lang-sc'>s.boot;
(
a = Array.fill(2000000,{ rrand(0.0,1.0) });
b = Buffer.alloc(s, 2000000);
)
b = b.sendCollection(a, action: {arg buf; "finished".postln;});
b.get(1999999, {|msg| (msg == a[1999999]).postln});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-get' href='./../Overviews/Methods.html#get'>get</a>(<span class='argstr'>index</span>, <span class='argstr'>action</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-getMsg' href='./../Overviews/Methods.html#getMsg'>getMsg</a>(<span class='argstr'>index</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Send a message requesting the value in the buffer at index. action is a Function which will be passed the value as an argument and evaluated when a reply is received.<h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.alloc(s,16);
b.setn(0, Array.fill(16, { rrand(0.0, 1.0) }));
b.get(0, {|msg| msg.postln});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-getn' href='./../Overviews/Methods.html#getn'>getn</a>(<span class='argstr'>index</span>, <span class='argstr'>count</span>, <span class='argstr'>action</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-getMsg' href='./../Overviews/Methods.html#getMsg'>getMsg</a>(<span class='argstr'>index</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Send a message requesting the a contiguous range of values of size count starting from index. action is a Function which will be passed the values in an Array as an argument and evaluated when a reply is received. See setn above for an example.<h4>Discussion:</h4>
<p>N.B. The maximum number of values that you can get with a single getn message is 1633 when the server is using UDP as its communication protocol. Use <a href="#-loadToFloatArray">-loadToFloatArray</a> and <a href="#-getToFloatArray">-getToFloatArray</a> to get larger ranges of values.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-loadToFloatArray' href='./../Overviews/Methods.html#loadToFloatArray'>loadToFloatArray</a>(<span class='argstr'>index: 0</span>, <span class='argstr'>count: -1</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Write the buffer to a file and then load it into a FloatArray.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>index<td class='argumentdesc'>
<p>The index in the buffer to begin writing from. The default is 0.<tr><td class='argumentname'>count<td class='argumentdesc'>
<p>The number of values to write. The default is -1, which writes from index until the end of the buffer.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function which will be passed the resulting FloatArray as an argument and evaluated when loading is finished.</table><h4>Discussion:</h4>
<p>This is safer than getToFloatArray but only works with a server on your local machine. In general this is the safest way to get a large range of values from a server buffer into the client app.<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
// same as Buffer.plot
b.loadToFloatArray(action: { arg array; a = array; {a.plot;}.defer; "done".postln;});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-getToFloatArray' href='./../Overviews/Methods.html#getToFloatArray'>getToFloatArray</a>(<span class='argstr'>index: 0</span>, <span class='argstr'>count</span>, <span class='argstr'>wait: 0.01</span>, <span class='argstr'>timeout: 3</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Stream the buffer to the client using a series of getn messages and put the results into a FloatArray.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>index<td class='argumentdesc'>
<p>The index in the buffer to begin writing from. The default is 0.<tr><td class='argumentname'>count<td class='argumentdesc'>
<p>The number of values to write. The default is -1, which writes from index until the end of the buffer.<tr><td class='argumentname'>wait<td class='argumentdesc'>
<p>The amount of time in seconds to wait between sending getn messages. Longer times are safer. The default is 0.01 seconds which seems reliable under normal circumstances. A setting of 0 is not recommended.<tr><td class='argumentname'>timeout<td class='argumentdesc'>
<p>The amount of time in seconds after which to post a warning if all replies have not yet been received. the default is 3.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function which will be passed the resulting FloatArray as an argument and evaluated when all replies have been received.</table><h4>Discussion:</h4>
<p>This is more risky than loadToFloatArray but does works with servers on remote machines. In high traffic situations it is possible for data to be lost. If this method has not received all its replies by timeout it will post a warning saying that the method has failed. In general use loadToFloatArray instead wherever possible.<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
// like Buffer.plot
b.getToFloatArray(wait:0.01,action:{arg array; a = array; {a.plot;}.defer;"done".postln;});
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-normalize' href='./../Overviews/Methods.html#normalize'>normalize</a>(<span class='argstr'>newmax: 1</span>, <span class='argstr'>asWavetable: false</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-normalizeMsg' href='./../Overviews/Methods.html#normalizeMsg'>normalizeMsg</a>(<span class='argstr'>newmax: 1</span>, <span class='argstr'>asWavetable: false</span>)</h3>
<div class='method'>
<p>Normalizes the buffer so that the peak absolute value is newmax (which defaults to 1). If your buffer is in Wavetable format then set the asWavetable argument to true.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fill' href='./../Overviews/Methods.html#fill'>fill</a>(<span class='argstr'>startAt</span>, <span class='argstr'>numFrames</span>, <span class='argstr'>value</span> <span class='argstr'>... more</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fillMsg' href='./../Overviews/Methods.html#fillMsg'>fillMsg</a>(<span class='argstr'>startAt</span>, <span class='argstr'>numFrames</span>, <span class='argstr'>value</span> <span class='argstr'>... more</span>)</h3>
<div class='method'>
<p>Starting at the index startAt, set the next numFrames to value. Additional ranges may be included in the same message.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-copyData' href='./../Overviews/Methods.html#copyData'>copyData</a>(<span class='argstr'>buf</span>, <span class='argstr'>dstStartAt: 0</span>, <span class='argstr'>srcStartAt: 0</span>, <span class='argstr'>numSamples: -1</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-copyMsg' href='./../Overviews/Methods.html#copyMsg'>copyMsg</a>(<span class='argstr'>buf</span>, <span class='argstr'>dstStartAt: 0</span>, <span class='argstr'>srcStartAt: 0</span>, <span class='argstr'>numSamples: -1</span>)</h3>
<div class='method'>
<p>Starting at the index srcStartAt, copy numSamples samples from this to the destination buffer buf starting at dstStartAt. If numSamples is negative, the maximum number of samples possible is copied. The default is start from 0 in the source and copy the maximum number possible starting at 0 in the destination.<h4>Discussion:</h4>
<p>Note: This method used to be called copy, but this conflicts with the method for object-copying. Therefore Buffer:copy is now intended to create a copy of the client-side Buffer object. Its use for copying buffer data on the server is deprecated. If you see a deprecation warning, the data will still be copied on the server and your code will still work, but you should update your code for the new method name.<pre class='code prettyprint lang-sc'>s.boot;
(
SynthDef(\help_Buffer_copy, {
arg out = 0, buf;
Line.ar(0, 0, dur: BufDur.kr(buf), doneAction: Done.freeSelf);
Out.ar(out, PlayBuf.ar(1, buf));
}).add;
)
(
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
c = Buffer.alloc(s, 120000);
)
Synth(\help_Buffer_copy, [\buf, b]);
// copy the whole buffer
b.copyData(c);
Synth(\help_Buffer_copy, [\buf, c]);
// copy some samples
c.zero;
b.copyData(c, numSamples: 4410);
Synth(\help_Buffer_copy, [\buf, c]);
// buffer "compositing"
c.zero;
b.copyData(c, numSamples: 4410);
b.copyData(c, dstStartAt: 4410, numSamples: 15500);
Synth(\help_Buffer_copy, [\buf, c]);
b.free;
c.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-close' href='./../Overviews/Methods.html#close'>close</a>(<span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-closeMsg' href='./../Overviews/Methods.html#closeMsg'>closeMsg</a>(<span class='argstr'>completionMessage</span>)</h3>
<div class='method'>
<p>After using a Buffer with a DiskOut or DiskIn, it is necessary to close the soundfile. Failure to do so can cause problems.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>completionMessage<td class='argumentdesc'>
<p>A valid OSC message or a Function which will return one. A Function will be passed this Buffer as an argument when evaluated.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-plot' href='./../Overviews/Methods.html#plot'>plot</a>(<span class='argstr'>name</span>, <span class='argstr'>bounds</span>, <span class='argstr'>minval</span>, <span class='argstr'>maxval</span>, <span class='argstr'>separately: false</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc</a></div>
<div class='method'>
<p>Plot the contents of the Buffer in a GUI window.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>name<td class='argumentdesc'>
<p>The name of the resulting window.<tr><td class='argumentname'>bounds<td class='argumentdesc'>
<p>An instance of Rect determining the size of the resulting view.<tr><td class='argumentname'>minval<td class='argumentdesc'>
<p>the minimum value in the plot<tr><td class='argumentname'>maxval<td class='argumentdesc'>
<p>the maximum value in the plot<tr><td class='argumentname'>separately<td class='argumentdesc'>
<p>a boolean whether to use separate display ranges or a single shared range.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
b.plot;
b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-play' href='./../Overviews/Methods.html#play'>play</a>(<span class='argstr'>loop: false</span>, <span class='argstr'>mul: 1</span>)</h3>
<div class='method'>
<p>Plays the contents of the buffer on the server and returns a corresponding Synth.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>loop<td class='argumentdesc'>
<p>A Boolean indicating whether or not to loop playback. If false the synth will automatically be freed when done. The default is false.<tr><td class='argumentname'>mul<td class='argumentdesc'>
<p>A value by which to scale the output. The default is 1.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
b.play; // frees itself
x = b.play(true);
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-query' href='./../Overviews/Methods.html#query'>query</a></h3>
<div class='method'>
<p>Sends a b_query message to the server, asking for a description of this buffer. The results are posted to the post window. Does not update instance vars.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-updateInfo' href='./../Overviews/Methods.html#updateInfo'>updateInfo</a>(<span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Sends a b_query message to the server, asking for a description of this buffer. Upon reply this Buffer's instance variables are automatically updated.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>A Function to be evaluated once the file has been read and this Buffer's instance variables have been updated. The function will be passed this Buffer as an argument.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.readNoUpdate(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
b.numFrames; // incorrect, shows nil
b.updateInfo({|buf| buf.numFrames.postln; }); // now it's right
b.free;</pre>
</div><h3><a class='anchor' name='Buffer%20Fill%20Commands'>Buffer Fill Commands</a></h3>
<p>These correspond to the various b_gen OSC Commands, which fill the buffer with values for use. See <a href="./../Reference/Server-Command-Reference.html">Server Command Reference</a> for more details.<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-gen' href='./../Overviews/Methods.html#gen'>gen</a>(<span class='argstr'>genCommand</span>, <span class='argstr'>genArgs</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-genMsg' href='./../Overviews/Methods.html#genMsg'>genMsg</a>(<span class='argstr'>genCommand</span>, <span class='argstr'>genArgs</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<div class='method'>
<p>This is a generalized version of the commands below.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>genCommand<td class='argumentdesc'>
<p>A String indicating the name of the command to use. See Server-Command-Reference for a list of valid command names.<tr><td class='argumentname'>genArgs<td class='argumentdesc'>
<p>An Array containing the corresponding arguments to the command.<tr><td class='argumentname'>normalize<td class='argumentdesc'>
<p>A Boolean indicating whether or not to normalize the buffer to a peak value of 1.0. The default is true.<tr><td class='argumentname'>asWavetable<td class='argumentdesc'>
<p>A Boolean indicating whether or not to write to the buffer in wavetable format so that it can be read by interpolating oscillators. The default is true.<tr><td class='argumentname'>clearFirst<td class='argumentdesc'>
<p>A Boolean indicating whether or not to clear the buffer before writing. The default is true.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sine1' href='./../Overviews/Methods.html#sine1'>sine1</a>(<span class='argstr'>amps</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sine1Msg' href='./../Overviews/Methods.html#sine1Msg'>sine1Msg</a>(<span class='argstr'>amps</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<div class='method'>
<p>Fill this buffer with a series of sine wave harmonics using specified amplitudes.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>amps<td class='argumentdesc'>
<p>An Array containing amplitudes for the harmonics. The first float value specifies the amplitude of the first partial, the second float value specifies the amplitude of the second partial, and so on.<tr><td class='argumentname'>normalize<td class='argumentdesc'>
<p>A Boolean indicating whether or not to normalize the buffer to a peak value of 1.0. The default is true.<tr><td class='argumentname'>asWavetable<td class='argumentdesc'>
<p>A Boolean indicating whether or not to write to the buffer in wavetable format so that it can be read by interpolating oscillators. The default is true.<tr><td class='argumentname'>clearFirst<td class='argumentdesc'>
<p>A Boolean indicating whether or not to clear the buffer before writing. The default is true.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
(
b = Buffer.alloc(s, 512, 1);
b.sine1(1.0 / [1, 2, 3, 4], true, true, true);
x = { Osc.ar(b, 200, 0, 0.5) }.play;
)
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sine2' href='./../Overviews/Methods.html#sine2'>sine2</a>(<span class='argstr'>freqs</span>, <span class='argstr'>amps</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sine2Msg' href='./../Overviews/Methods.html#sine2Msg'>sine2Msg</a>(<span class='argstr'>freqs</span>, <span class='argstr'>amps</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<div class='method'>
<p>Fill this buffer with a series of sine wave partials using specified frequencies and amplitudes.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>freqs<td class='argumentdesc'>
<p>An Array containing frequencies (in cycles per buffer) for the partials.<tr><td class='argumentname'>amps<td class='argumentdesc'>
<p>An Array containing amplitudes for the partials. This should contain the same number of items as freqs.<tr><td class='argumentname'>normalize<td class='argumentdesc'>
<p>A Boolean indicating whether or not to normalize the buffer to a peak value of 1.0. The default is true.<tr><td class='argumentname'>asWavetable<td class='argumentdesc'>
<p>A Boolean indicating whether or not to write to the buffer in wavetable format so that it can be read by interpolating oscillators. The default is true.<tr><td class='argumentname'>clearFirst<td class='argumentdesc'>
<p>A Boolean indicating whether or not to clear the buffer before writing. The default is true.</table><h4>Discussion:</h4>
<pre class='code prettyprint lang-sc'>s.boot;
(
b = Buffer.alloc(s, 512, 1);
b.sine2([1.0, 3], [1, 0.5]);
x = { Osc.ar(b, 200, 0, 0.5) }.play;
)
x.free; b.free;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sine3' href='./../Overviews/Methods.html#sine3'>sine3</a>(<span class='argstr'>freqs</span>, <span class='argstr'>amps</span>, <span class='argstr'>phases</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sine3Msg' href='./../Overviews/Methods.html#sine3Msg'>sine3Msg</a>(<span class='argstr'>freqs</span>, <span class='argstr'>amps</span>, <span class='argstr'>phases</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<div class='method'>
<p>Fill this buffer with a series of sine wave partials using specified frequencies, amplitudes, and initial phases.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>freqs<td class='argumentdesc'>
<p>An Array containing frequencies (in cycles per buffer) for the partials.<tr><td class='argumentname'>amps<td class='argumentdesc'>
<p>An Array containing amplitudes for the partials. This should contain the same number of items as freqs.<tr><td class='argumentname'>phases<td class='argumentdesc'>
<p>An Array containing initial phase for the partials (in radians). This should contain the same number of items as freqs.<tr><td class='argumentname'>normalize<td class='argumentdesc'>
<p>A Boolean indicating whether or not to normalize the buffer to a peak value of 1.0. The default is true.<tr><td class='argumentname'>asWavetable<td class='argumentdesc'>
<p>A Boolean indicating whether or not to write to the buffer in wavetable format so that it can be read by interpolating oscillators. The default is true.<tr><td class='argumentname'>clearFirst<td class='argumentdesc'>
<p>A Boolean indicating whether or not to clear the buffer before writing. The default is true.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-cheby' href='./../Overviews/Methods.html#cheby'>cheby</a>(<span class='argstr'>amps</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-chebyMsg' href='./../Overviews/Methods.html#chebyMsg'>chebyMsg</a>(<span class='argstr'>amps</span>, <span class='argstr'>normalize: true</span>, <span class='argstr'>asWavetable: true</span>, <span class='argstr'>clearFirst: true</span>)</h3>
<div class='method'>
<p>Fill this buffer with a series of Chebyshev polynomials, which can be defined as: <code class='code prettyprint lang-sc'>cheby(n) = amplitude * cos(n * acos(x))</code>. To eliminate a DC offset when used as a waveshaper, the wavetable is offset so that the center value is zero.
<p>Similar functionality can be found in <a href="./../Classes/Signal.html#*chebyFill">Signal.chebyFill</a> and <a href="./../Classes/Wavetable.html#*chebyFill">Wavetable.chebyFill</a>. If you require Chebyshev polynomials that do not include the offset compensation, it is recommended to use one of these.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>amplitudes<td class='argumentdesc'>
<p>An Array containing amplitudes for the harmonics. The first float value specifies the amplitude for n = 1, the second float value specifies the amplitude for n = 2, and so on.<tr><td class='argumentname'>normalize<td class='argumentdesc'>
<p>A Boolean indicating whether or not to normalize the buffer to a peak value of 1.0. The default is true.<tr><td class='argumentname'>asWavetable<td class='argumentdesc'>
<p>A Boolean indicating whether or not to write to the buffer in wavetable format so that it can be read by interpolating oscillators. The default is true.<tr><td class='argumentname'>clearFirst<td class='argumentdesc'>
<p>A Boolean indicating whether or not to clear the buffer before writing. The default is true.</table><h4>Discussion:</h4>
<div class='note'><span class='notelabel'>NOTE:</span> In previous versions, offsetting (to ensure the center value is zero) was performed incorrectly. This was fixed in version 3.7, so any code that may have relied on the (wrong) behavior may need to be changed. If using a Chebyshev buffer as a waveshaper, the simplest fix is to wrap the <a href="./../Classes/Shaper.html">Shaper</a> in a <a href="./../Classes/LeakDC.html">LeakDC</a> UGen.</div>
<p><pre class='code prettyprint lang-sc'>s.boot;
b = Buffer.alloc(s, 512, 1, {arg buf; buf.chebyMsg([1,0,1,1,0,1])});
(
x = {
Shaper.ar(
b,
SinOsc.ar(300, 0, Line.kr(0,1,6)),
0.5
)
}.play;
)
x.free; b.free;</pre>
</div><h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asBufWithValues' href='./../Overviews/Methods.html#asBufWithValues'>asBufWithValues</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asControlInput' href='./../Overviews/Methods.html#asControlInput'>asControlInput</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asUGenInput' href='./../Overviews/Methods.html#asUGenInput'>asUGenInput</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-cache' href='./../Overviews/Methods.html#cache'>cache</a></h3>
</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnInfo' href='./../Overviews/Methods.html#doOnInfo'>doOnInfo</a> = value</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-duration' href='./../Overviews/Methods.html#duration'>duration</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-getnMsg' href='./../Overviews/Methods.html#getnMsg'>getnMsg</a>(<span class='argstr'>index</span>, <span class='argstr'>count</span>, <span class='argstr'>action</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-memoryFootprint' href='./../Overviews/Methods.html#memoryFootprint'>memoryFootprint</a></h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/SuperDirt/classes/extBuffer.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/SuperDirt/classes/extBuffer.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-preparePartConv' href='./../Overviews/Methods.html#preparePartConv'>preparePartConv</a>(<span class='argstr'>buf</span>, <span class='argstr'>fftsize</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/PartConv.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/PartConv.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-queryDone' href='./../Overviews/Methods.html#queryDone'>queryDone</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-queryMsg' href='./../Overviews/Methods.html#queryMsg'>queryMsg</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-readNoUpdate' href='./../Overviews/Methods.html#readNoUpdate'>readNoUpdate</a>(<span class='argstr'>argpath</span>, <span class='argstr'>fileStartFrame: 0</span>, <span class='argstr'>numFrames: -1</span>, <span class='argstr'>bufStartFrame: 0</span>, <span class='argstr'>leaveOpen: false</span>, <span class='argstr'>completionMessage</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-setnMsgArgs' href='./../Overviews/Methods.html#setnMsgArgs'>setnMsgArgs</a>( <span class='argstr'>... args</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-startFrame' href='./../Overviews/Methods.html#startFrame'>startFrame</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-startFrame' href='./../Overviews/Methods.html#startFrame'>startFrame</a> = value</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-streamCollection' href='./../Overviews/Methods.html#streamCollection'>streamCollection</a>(<span class='argstr'>collstream</span>, <span class='argstr'>collsize</span>, <span class='argstr'>startFrame: 0</span>, <span class='argstr'>wait: -1</span>, <span class='argstr'>action</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-synthArg' href='./../Overviews/Methods.html#synthArg'>synthArg</a></h3>
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Players/instrSupport.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Players/instrSupport.sc</a></div>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-uncache' href='./../Overviews/Methods.html#uncache'>uncache</a></h3>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Buffer.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Buffer.schelp</a><br>link::Classes/Buffer::<br></div></div></body></html>

View file

@ -0,0 +1,365 @@
<html><head><title>Bus</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#Server>Abstractions'>Server>Abstractions</a></div>
<h1>Bus</h1>
<div id='summary'>Representation of a bus on the server</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/Bus.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/Bus.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Classes/Server.html">Server</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='#*control'>control</a> </li>
<li class='toc3'><a href='#*audio'>audio</a> </li>
<li class='toc3'><a href='#*alloc'>alloc</a> </li>
<li class='toc3'><a href='#*new'>new</a> </li>
<li class='toc3'><a href='#*newFrom'>newFrom</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='toc3'><a href='#-index'>index</a> </li>
<li class='toc3'><a href='#-free'>free</a> </li>
<li class='toc3'><a href='#-rate'>rate</a> </li>
<li class='toc3'><a href='#-numChannels'>numChannels</a> </li>
<li class='toc3'><a href='#-server'>server</a> </li>
<li class='toc3'><a href='#-asMap'>asMap</a> </li>
<li class='toc3'><a href='#-subBus'>subBus</a> </li>
<li class='toc2'><a href='#Asynchronous%20Control%20Bus%20Methods'>Asynchronous Control Bus Methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-value'>value</a> </li>
<li class='toc3'><a href='#-set'>set</a> </li>
<li class='toc3'><a href='#-setn'>setn</a> </li>
<li class='toc3'><a href='#-get'>get</a> </li>
<li class='toc3'><a href='#-getn'>getn</a> </li>
</ul><li class='toc2'><a href='#Synchronous%20Control%20Bus%20Methods'>Synchronous Control Bus Methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-getSynchronous'>getSynchronous</a> </li>
<li class='toc3'><a href='#-getnSynchronous'>getnSynchronous</a> </li>
<li class='toc3'><a href='#-setSynchronous'>setSynchronous</a> </li>
<li class='toc3'><a href='#-setnSynchronous'>setnSynchronous</a> </li>
</ul><li class='toc2'><a href='#Conveniences%20for%20multichannel%20buses'>Conveniences for multichannel buses</a></li>
<ul class='toc'><li class='toc3'><a href='#-setAt'>setAt</a> </li>
<li class='toc3'><a href='#-setnAt'>setnAt</a> </li>
<li class='toc3'><a href='#-setPairs'>setPairs</a> </li>
</ul><li class='toc2'><a href='#Using%20Buses%20like%20UGens'>Using Buses like UGens</a></li>
<ul class='toc'><li class='toc3'><a href='#-kr'>kr</a> <a href='#-ar'>ar</a> </li>
</ul><li class='toc2'><a href='#OSC%20Bundle%20Methods'>OSC Bundle Methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-getMsg'>getMsg</a> </li>
<li class='toc3'><a href='#-getnMsg'>getnMsg</a> </li>
<li class='toc3'><a href='#-setMsg'>setMsg</a> </li>
<li class='toc3'><a href='#-setnMsg'>setnMsg</a> </li>
<li class='toc3'><a href='#-fillMsg'>fillMsg</a> </li>
</ul><li class='toc2'><a href='#Monitoring%20with%20an%20oscilloscope'>Monitoring with an oscilloscope</a></li>
<ul class='toc'><li class='toc3'><a href='#-scope'>scope</a> </li>
</ul><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-=='>==</a> </li>
<li class='toc3'><a href='#-alloc'>alloc</a> </li>
<li class='toc3'><a href='#-asBus'>asBus</a> </li>
<li class='toc3'><a href='#-asControlInput'>asControlInput</a> </li>
<li class='toc3'><a href='#-asUGenInput'>asUGenInput</a> </li>
<li class='toc3'><a href='#-fill'>fill</a> </li>
<li class='toc3'><a href='#-hash'>hash</a> </li>
<li class='toc3'><a href='#-isAudioOut'>isAudioOut</a> </li>
<li class='toc3'><a href='#-isSettable'>isSettable</a> </li>
<li class='toc3'><a href='#-play'>play</a> </li>
<li class='toc3'><a href='#-plot'>plot</a> </li>
<li class='toc3'><a href='#-plotAudio'>plotAudio</a> </li>
<li class='toc3'><a href='#-prepareForProxySynthDef'>prepareForProxySynthDef</a> </li>
<li class='toc3'><a href='#-realloc'>realloc</a> </li>
<li class='toc3'><a href='#-setAll'>setAll</a> </li>
</ul></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>The clientside representation of an audio or control bus on a server. Encapsulates all the <a href="./../Browse.html#OpenSoundControl">OSC</a> messages a Bus can receive. Manages allocation and deallocation of bus indices so that you don't need to worry about conflicts. The number of control busses, audio busses, and input and output busses is fixed and cannot be changed after the server has been booted.
<p>For more information see <a href="./../Guides/ClientVsServer.html">Client vs Server</a> and <a href="./../Reference/Server-Architecture.html">Server Architecture</a>.
<p>Note that using the Bus class to allocate a multichannel bus does not 'create' a multichannel bus, but rather simply reserves a series of adjacent bus indices with the bus' <a href="./../Classes/Server.html">Server</a> object's bus allocators. <code class='code prettyprint lang-sc'>abus.index</code> simply returns the first of those indices. When using a Bus with an <a href="./../Classes/In.html">In</a> or <a href="./../Classes/Out.html">Out</a> ugen there is nothing to stop you from reading to or writing from a larger range, or from hardcoding to a bus that has been allocated. You are responsible for making sure that the number of channels match and that there are no conflicts.
<p>Bus objects should not be created or modified within a <a href="./../Classes/SynthDef.html">SynthDef</a>.<div class='note'><span class='notelabel'>NOTE:</span> The lowest <code class='code prettyprint lang-sc'>n</code> bus indices are reserved for hardware output and input, where<pre class='code prettyprint lang-sc'>n = server.options.numOutputBusChannels + server.options.numInputBusChannels</pre>
<p><dl>
<dt>Hardware output buses<dd><code class='code prettyprint lang-sc'>0 .. (numOutputBusChannels - 1)</code><dt>Hardware input buses<dd><code class='code prettyprint lang-sc'>numOutputBusChannels .. (numOutputBusChannels + numInputBusChannels - 1)</code><dt>First private bus index<dd><code class='code prettyprint lang-sc'>numOutputBusChannels + numInputBusChannels</code></dl>
<p>Do not try to use hardware I/O buses as private buses.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*control' href='./../Overviews/Methods.html#control'>control</a> (<span class='argstr'>server</span>, <span class='argstr'>numChannels: 1</span>)</h3>
<div class='method'>
<p>Allocate a control bus on the server.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The <a href="./../Classes/Server.html">Server</a>. Defaults to Server.default.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>Number of channels to allocate</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*audio' href='./../Overviews/Methods.html#audio'>audio</a> (<span class='argstr'>server</span>, <span class='argstr'>numChannels: 1</span>)</h3>
<div class='method'>
<p>Allocate an audio bus on the server.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The <a href="./../Classes/Server.html">Server</a>. Defaults to Server.default.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>Number of channels to allocate</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*alloc' href='./../Overviews/Methods.html#alloc'>alloc</a> (<span class='argstr'>rate</span>, <span class='argstr'>server</span>, <span class='argstr'>numChannels: 1</span>)</h3>
<div class='method'>
<p>Allocate a bus of either rate as specified by <code class='code prettyprint lang-sc'>rate</code>.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>rate<td class='argumentdesc'>
<p>Rate symbol: \control or \audio<tr><td class='argumentname'>server<td class='argumentdesc'>
<p>The <a href="./../Classes/Server.html">Server</a>. Defaults to Server.default.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
<p>Number of channels to allocate</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>rate: 'audio'</span>, <span class='argstr'>index: 0</span>, <span class='argstr'>numChannels: 2</span>, <span class='argstr'>server</span>)</h3>
<div class='method'>
<p>This method does not allocate a bus index, but assumes that you already have allocated the appropriate bus index and can supply it yourself.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*newFrom' href='./../Overviews/Methods.html#newFrom'>newFrom</a> (<span class='argstr'>bus</span>, <span class='argstr'>offset</span>, <span class='argstr'>numChannels: 1</span>)</h3>
<div class='method'>
<p>This method creates a new Bus that is a subset of the bus. The bus will be at the same rate as the input bus. offset is the index into the given bus. numChannels is the desired number of channels. If the combination of offset and numChannels is outside the input bus' range, an error will be thrown.</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 class='imethodname'><span class='methprefix'>-</span><a name='-index' href='./../Overviews/Methods.html#index'>index</a> </h3>
<div class='method'>
<p>Get the Bus' index. Normally you should not need to do this since instances of Bus can be passed directly as <a href="./../Classes/UGen.html">UGen</a> inputs or <a href="./../Classes/Synth.html">Synth</a> args.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-free' href='./../Overviews/Methods.html#free'>free</a> (<span class='argstr'>clear: false</span>)</h3>
<div class='method'>
<p>Return the bus' indices to the server's bus allocator so they can be reallocated.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-rate' href='./../Overviews/Methods.html#rate'>rate</a> </h3>
<div class='method'>
<p>Get the Bus' rate. This is a symbol, either \control or \audio.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-numChannels' href='./../Overviews/Methods.html#numChannels'>numChannels</a> </h3>
<div class='method'>
<p>Get the Bus' number of channels.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-server' href='./../Overviews/Methods.html#server'>server</a> </h3>
<div class='method'>
<p>Get the Bus' server object.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-asMap' href='./../Overviews/Methods.html#asMap'>asMap</a> </h3>
<div class='method'><h4>Returns:</h4>
<div class='returnvalue'>
<p>a symbol consisting of the letter 'c' or 'a' (for control or audio) followed by the bus's index. This may be used when setting a synth node's control inputs to map the input to the control bus.</div><h4>Discussion:</h4>
<p>See the <a href="./../Classes/Node.html">Node</a> help file for more information on mapping controls to buses.<pre class='code prettyprint lang-sc'>(
a = Bus.control(s, 1).set(440);
b = Bus.control(s, 1).set(0.01);
)
(
SynthDef(\rlpf, { |ffreq, rq|
Out.ar(0, RLPF.ar(WhiteNoise.ar(0.2), ffreq, rq))
}).play(s, [\ffreq, a.asMap, \rq, b.asMap]);
)</pre>
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-subBus' href='./../Overviews/Methods.html#subBus'>subBus</a> (<span class='argstr'>offset</span>, <span class='argstr'>numChannels: 1</span>)</h3>
<div class='method'>
<p>Get a new Bus that is a subset of this bus (see <code class='code prettyprint lang-sc'>newFrom</code>).</div><h3><a class='anchor' name='Asynchronous%20Control%20Bus%20Methods'>Asynchronous Control Bus Methods</a></h3>
<p>The following commands apply only to control buses and are asynchronous. For synchronous access to control busses please consult <a href="#Synchronous%20Control%20Bus%20Methods">Synchronous%20Control%20Bus%20Methods</a>.<h3 class='imethodname'><span class='methprefix'>-</span><a name='-value' href='./../Overviews/Methods.html#value'>value</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-value' href='./../Overviews/Methods.html#value'>value</a> = <span class='argstr'>value</span></h3>
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
<div class='method'>
<p>Set all channels to this float value. This command is asynchronous.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-set' href='./../Overviews/Methods.html#set'>set</a> ( <span class='argstr'>... values</span>)</h3>
<div class='method'>
<p>A list of values for each channel of the control bus. The list of values supplied should not be greater than the number of channels. This command is asynchronous.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setn' href='./../Overviews/Methods.html#setn'>setn</a> (<span class='argstr'>values</span>)</h3>
<div class='method'>
<p>As set but takes an array as an argument.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-get' href='./../Overviews/Methods.html#get'>get</a> (<span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Get the current value of this control bus. This command is asynchronous.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>a function that will be evaluated when the server responds, with the current value of the bus passed as an argument. This will be a float for a single channel bus, or an array of floats for a multichannel bus. The default action posts the bus values.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-getn' href='./../Overviews/Methods.html#getn'>getn</a> (<span class='argstr'>count</span>, <span class='argstr'>action</span>)</h3>
<div class='method'>
<p>Get the current values of this control bus. This command is asynchronous.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>count<td class='argumentdesc'>
<p>the number of channels to read, starting from this bus' first channel.<tr><td class='argumentname'>action<td class='argumentdesc'>
<p>a function that will be evaluated when the server responds, with the current values of the bus in an array passed as an argument.</table></div><h3><a class='anchor' name='Synchronous%20Control%20Bus%20Methods'>Synchronous Control Bus Methods</a></h3>
<p>Synchronous access to control busses only works for servers with a shared memory interface. You can check with <a href="./../Classes/Server.html#-hasShmInterface">hasShmInterface</a> if the server provides these methods.<div class='note'><span class='notelabel'>NOTE:</span> Before 3.5 the the internal server could be controlled via shared control busses and <a href="./../Classes/SharedIn.html">SharedIn</a> and <a href="./../Classes/SharedOut.html">SharedOut</a>. These classes have been deprecated and will be removed.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-getSynchronous' href='./../Overviews/Methods.html#getSynchronous'>getSynchronous</a> </h3>
<div class='method'>
<p>Get the current value of this control bus. This command is synchronous.<h4>Returns:</h4>
<div class='returnvalue'>
<p>Value of the control bus.</div></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-getnSynchronous' href='./../Overviews/Methods.html#getnSynchronous'>getnSynchronous</a> (<span class='argstr'>count</span>)</h3>
<div class='method'>
<p>Get the current values of this control bus. This command is synchronous.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>count<td class='argumentdesc'>
<p>The number of channels to read, starting from this bus' first channel.</table><h4>Returns:</h4>
<div class='returnvalue'>
<p>Array of values.</div></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setSynchronous' href='./../Overviews/Methods.html#setSynchronous'>setSynchronous</a> ( <span class='argstr'>... values</span>)</h3>
<div class='method'>
<p>A list of values for each channel of the control bus. The list of values supplied should not be greater than the number of channels. This command is synchronous.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setnSynchronous' href='./../Overviews/Methods.html#setnSynchronous'>setnSynchronous</a> (<span class='argstr'>values</span>)</h3>
<div class='method'>
<p>As setSynchronous but takes an array as an argument.</div><h3><a class='anchor' name='Conveniences%20for%20multichannel%20buses'>Conveniences for multichannel buses</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setAt' href='./../Overviews/Methods.html#setAt'>setAt</a> (<span class='argstr'>offset</span> <span class='argstr'>... values</span>)</h3>
<div class='method'>
<p>set the bus value(s) beginning at offset. asynchronous.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setnAt' href='./../Overviews/Methods.html#setnAt'>setnAt</a> (<span class='argstr'>offset</span>, <span class='argstr'>values</span>)</h3>
<div class='method'>
<p>set the bus to the list of values supplied. asynchronous.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setPairs' href='./../Overviews/Methods.html#setPairs'>setPairs</a> ( <span class='argstr'>... pairs</span>)</h3>
<div class='method'>
<p>set the bus values by pairs of index, value, ... asynchronous</div><h3><a class='anchor' name='Using%20Buses%20like%20UGens'>Using Buses like UGens</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>numChannels</span>, <span class='argstr'>offset: 0</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-ar' href='./../Overviews/Methods.html#ar'>ar</a> (<span class='argstr'>numChannels</span>, <span class='argstr'>offset: 0</span>)</h3>
<div class='method'>
<p>use a bus like a UGen. The numChannels and offset arguments can be used to get a subset of the bus.<h4>Discussion:</h4>
<p>By default, all the bus channels are used. E.g. in an 8 channel bus,<ul>
<li><code class='code prettyprint lang-sc'>b.kr</code> will return an <a href="./../Classes/In.html">In</a> ugen reading from all the 8 channels of the bus;<li><code class='code prettyprint lang-sc'>b.kr(4)</code> will return the first four channels, and<li><code class='code prettyprint lang-sc'>b.kr(2, 5)</code> will return two channels, starting from the bus's channels at index 5 and 6.</ul>
</div><h3><a class='anchor' name='OSC%20Bundle%20Methods'>OSC Bundle Methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-getMsg' href='./../Overviews/Methods.html#getMsg'>getMsg</a> </h3>
<div class='method'>
<p>Returns a msg of the type /c_get for use in osc bundles.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-getnMsg' href='./../Overviews/Methods.html#getnMsg'>getnMsg</a> (<span class='argstr'>count</span>)</h3>
<div class='method'>
<p>Returns a msg of the type /c_getn for use in osc bundles.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>count<td class='argumentdesc'>
<p>the number of channels to read, starting from this bus' first channel. The default is this bus' numChannels.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setMsg' href='./../Overviews/Methods.html#setMsg'>setMsg</a> ( <span class='argstr'>... values</span>)</h3>
<div class='method'>
<p>Returns a msg of the type /c_set for use in osc bundles.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-setnMsg' href='./../Overviews/Methods.html#setnMsg'>setnMsg</a> (<span class='argstr'>values</span>)</h3>
<div class='method'>
<p>Returns a msg of the type /c_setn for use in osc bundles.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>values<td class='argumentdesc'>
<p>an array of values to which adjacent channels should be set, starting at this bus' first channel.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-fillMsg' href='./../Overviews/Methods.html#fillMsg'>fillMsg</a> (<span class='argstr'>value</span>)</h3>
<div class='method'>
<p>Returns a msg of the type /c_fill for use in osc bundles.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>value<td class='argumentdesc'>
<p>the value to which this bus' channels will be set.</table></div><h3><a class='anchor' name='Monitoring%20with%20an%20oscilloscope'>Monitoring with an oscilloscope</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-scope' href='./../Overviews/Methods.html#scope'>scope</a> (<span class='argstr'>bufsize: 4096</span>, <span class='argstr'>zoom</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Control/server-scope.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Control/server-scope.sc</a></div>
<div class='method'>
<p>Displays a bus in a <a href="./../Classes/Stethoscope.html">Stethoscope</a>, using the Bus' <a href="#-numChannels">-numChannels</a>, <a href="#-index">-index</a>, and <a href="#-rate">-rate</a> properties.<pre class='code prettyprint lang-sc'>s.boot
b=Bus.audio(s, 2);
a={SinOsc.ar([330,440], 0, 0.4)}.play(s, b) //you won't hear this if you only have two channels
b.scope
a.free;
b.free;</pre>
</div><h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-==' href='./../Overviews/Methods.html#=='>==</a> (<span class='argstr'>aBus</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-alloc' href='./../Overviews/Methods.html#alloc'>alloc</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-asBus' href='./../Overviews/Methods.html#asBus'>asBus</a> </h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asBus.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asBus.sc</a></div>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-asControlInput' href='./../Overviews/Methods.html#asControlInput'>asControlInput</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-asUGenInput' href='./../Overviews/Methods.html#asUGenInput'>asUGenInput</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-fill' href='./../Overviews/Methods.html#fill'>fill</a> (<span class='argstr'>value</span>, <span class='argstr'>numChans</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-hash' href='./../Overviews/Methods.html#hash'>hash</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-isAudioOut' href='./../Overviews/Methods.html#isAudioOut'>isAudioOut</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-isSettable' href='./../Overviews/Methods.html#isSettable'>isSettable</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-play' href='./../Overviews/Methods.html#play'>play</a> (<span class='argstr'>target: 0</span>, <span class='argstr'>outbus</span>, <span class='argstr'>fadeTime</span>, <span class='argstr'>addAction: 'addToTail'</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-plot' href='./../Overviews/Methods.html#plot'>plot</a> (<span class='argstr'>duration: 0.01</span>, <span class='argstr'>bounds</span>, <span class='argstr'>minval</span>, <span class='argstr'>maxval</span>, <span class='argstr'>separately: false</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc</a></div>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-plotAudio' href='./../Overviews/Methods.html#plotAudio'>plotAudio</a> (<span class='argstr'>duration: 0.01</span>, <span class='argstr'>minval: -1</span>, <span class='argstr'>maxval: 1</span>, <span class='argstr'>bounds</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc</a></div>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-prepareForProxySynthDef' href='./../Overviews/Methods.html#prepareForProxySynthDef'>prepareForProxySynthDef</a> (<span class='argstr'>proxy</span>)</h3>
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/ProxySpace/wrapForNodeProxy.sc</a></div>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-realloc' href='./../Overviews/Methods.html#realloc'>realloc</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setAll' href='./../Overviews/Methods.html#setAll'>setAll</a> (<span class='argstr'>value</span>)</h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>s.boot;
(
// something to play with
SynthDef(\help_Bus, { arg out=0,ffreq=100;
var x;
x = RLPF.ar(LFPulse.ar(SinOsc.kr(0.2, 0, 10, 21), [0,0.1], 0.1),
ffreq, 0.1)
.clip2(0.4);
Out.ar(out, x);
}).add;
)
x = Synth(\help_Bus);
// get a bus
b = Bus.control(s);
// map the synth's second input (ffreq) to read
// from the bus' output index
x.map(1, b);
// By setting the bus' value you send a /c_fill message
// to each channel of the bus setting it to supplied float value
b.value = 100;
b.value = 1000;
b.value = 30;
// Since this is a single channel bus this has the same effect
b.set(300);
b.numChannels.postln;
// multi-channel: b.set(300,350);
// Get the current value. This is asynchronous so you can't rely on it happening immediately.
(
a = "waiting";
b.get({arg value; a = value; ("after the server responds a is set to:" + a).postln;});
("a is now:" + a).postln;
)
x.free;
// buses can also be used with kr or ar like UGens:
(
SynthDef(\help_Bus, {
var ffreq = b.kr;
Out.ar(0,
RLPF.ar(
LFPulse.ar(SinOsc.kr(0.2, 0, 10, 21), [0,0.1], 0.1),
ffreq, 0.1
).clip2(0.4)
);
}).play;
)
b.free; // release it so it may be reallocated!
// using and setting multichannel buses:
(
b = Bus.control(s, 4);
x = SynthDef(\helpBusMulti, {
var freqs = b.kr;
Out.ar(0, Splay.ar(SinOsc.ar(freqs) * Decay2.ar(Dust.ar(10 ! 4), 0.001, 0.1)) * 0.5);
}).play;
)
// set bus beginning at index 0:
// none of these methods checks whether the indexes remain
// within the bus's range.
b.set(234, 345, 456, 567);
b.getn;
b.setn([100, 200, 300, 400]);
b.getn;
// get to individual channels
b.setAt(3, 500);
b.getn;
b.setAt(1, 300, 400);
b.getn;
b.setnAt(1, [250, 350]);
b.getn;
// set by pairs of index, value ...
b.setPairs(3, 600, 0, 200);
b.getn;
b.set(300, 500, 700, 900);
( // just get the first 2 channels
x = SynthDef(\helpBusMulti, {
Out.ar(0, SinOsc.ar(b.kr(2)) * 0.2);
}).play;
)
b.set(300, 303);
x.free;
( // just channels[[2, 3]];
y = SynthDef(\helpBusMulti, {
Out.ar(0, LFNoise2.ar(b.kr(2, 2)) * 0.2);
}).play;
)
b.setAt(2, 1200);
b.setAt(3, 2400);
y.free;
b.free;</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Bus.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Bus.schelp</a><br>link::Classes/Bus::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,68 @@
<!doctype html><html lang='en'><head><title>COsc | SuperCollider 3.12.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'COsc';
var scdoc_sc_version = '3.12.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>COsc:</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 id='menubar'></div>
<div class='contents'>
<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>Generators'>Generators</a>&#8201;&gt;&#8201;<a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
</div><h1>COsc<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'>Chorusing wavetable oscillator.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Osc.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Osc.sc'>Osc.sc</a></div><div id='related'>See also: <a href="./../Classes/Osc.html">Osc</a>, <a href="./../Classes/OscN.html">OscN</a>, <a href="./../Classes/VOsc.html">VOsc</a>, <a href="./../Classes/VOsc3.html">VOsc3</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Chorusing wavetable lookup oscillator. Produces sum of two signals at<textarea class='editor'>(freq ± (beats / 2)).</textarea>
<p>Due to summing, the peak amplitude is not the same as the wavetable and can be twice of that.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>COsc.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>bufnum</span>, <span class='argstr'>freq: 440.0</span>, <span class='argstr'>beats: 0.5</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>COsc.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>bufnum</span>, <span class='argstr'>freq: 440.0</span>, <span class='argstr'>beats: 0.5</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
<p>The number of a buffer filled in wavetable format.<tr><td class='argumentname'>freq<td class='argumentdesc'>
<p>Frequency in Hertz.<tr><td class='argumentname'>beats<td class='argumentdesc'>
<p>Beat frequency in Hertz.<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>
<textarea class='editor'>(
b = Buffer.alloc(s, 512, 1, {arg buf; buf.sine1Msg(1.0/[1,2,3,4,5,6,7,8,9,10])});
{ COsc.ar(b.bufnum, 200, 0.7, 0.25) }.play;
)</textarea>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/COsc.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/COsc.schelp</a><br>link::Classes/COsc::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,110 @@
<!doctype html><html lang='en'><head><title>CSVFileReader | SuperCollider 3.10.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'CSVFileReader';
var scdoc_sc_version = '3.10.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>CSVFileReader:</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='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='#*delim'>delim</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><div id='menubar'></div>
<div class='contents'>
<div class='header'>
<div id='label'>
<span id='folder'>Classes</span>
| <span id='categories'><a href='./../Browse.html#Files'>Files</a></span>
</div><h1>CSVFileReader<span id='superclasses'> : <a href="../Classes/FileReader.html">FileReader</a> : <a href="../Classes/Stream.html">Stream</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>file reader for comma separated data</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/TabFileReader.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/TabFileReader.sc'>TabFileReader.sc</a></div><div id='related'>See also: <a href="./../Classes/File.html">File</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>CSVFileReader reads comma-separated text files into 2D arrays line by line.
<p>For tab delimited files use <a href="./../Classes/TabFileReader.html">TabFileReader</a>. For semi-colon-delimited files use <a href="./../Classes/SemiColonFileReader.html">SemiColonFileReader</a>. For space-delimited files, or custom delimiters, use <a href="./../Classes/FileReader.html">FileReader</a>.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<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='method-code'><span class='method-prefix'>CSVFileReader.</span><a class='method-name' name='*delim' href='./../Overviews/Methods.html#delim'>delim</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>
<textarea class='editor'>(
// write a test file:
f = File("CSVReadTest.sc", "w");
f.write(
"Some,comma,delimited,items, in line 1
and then, some more, with several commas,,,, in line 3
"
);
f.close;
)
// open file, read and put strings into array, close file.
x = CSVFileReader.read("CSVReadTest.sc").postcs;
// can skip empty lines:
x = CSVFileReader.read("CSVReadTest.sc", true).postcs;
// can skip blank entries caused by multiple commas:
x = CSVFileReader.read("CSVReadTest.sc", true, true).postcs;
// do file open/close by hand if you prefer:
f = File("CSVReadTest.sc", "r"); f.isOpen;
t = CSVFileReader(f);
t.read(true, true).postcs;
f.close;
(
// write a test file with numbers:
f = File("CSVReadTestNum.sc", "w");
(1..10).do { |n| f.write(n.asString ++ ","); };
f.close;
)
x = CSVFileReader.read("CSVReadTestNum.sc", true, true).postcs;
x.collect(_.collect(_.interpret)); // convert to numbers.
// or do it immediately:
x = CSVFileReader.readInterpret("CSVReadTestNum.sc").postcs;
(
// write a test file with several lines of numbers:
f = File("CSVReadTestNum.sc", "w");
(1..100).do { |n|
f.write(n.asString ++ if (n % 10 != 0, ",", Char.nl)); };
f.close;
)
x = CSVFileReader.readInterpret("CSVReadTestNum.sc", true, true).postln;</textarea>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CSVFileReader.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CSVFileReader.schelp</a><br>link::Classes/CSVFileReader::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,42 @@
<html><head><title>ChaosGen</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>ChaosGen</h1>
<div id='summary'>UGens that cause chaos</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/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/CuspN.html">CuspN</a>, <a href="../Classes/FBSineN.html">FBSineN</a>, <a href="../Classes/GbmanN.html">GbmanN</a>, <a href="../Classes/HenonN.html">HenonN</a>, <a href="../Classes/LatoocarfianN.html">LatoocarfianN</a>, <a href="../Classes/LinCongN.html">LinCongN</a>, <a href="../Classes/LorenzL.html">LorenzL</a>, <a href="../Classes/QuadN.html">QuadN</a>, <a href="../Classes/StandardN.html">StandardN</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='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></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
<p>"ChaosGen" is an <em>abstract class</em> - in other words, a class that you do not use directly. Instead, use one of its subclasses. Various things inherit from this abstract class, including <a href="./../Classes/HenonN.html">HenonN</a>, <a href="./../Classes/LinCongL.html">LinCongL</a>, <a href="./../Classes/LatoocarfianL.html">LatoocarfianL</a>, <a href="./../Classes/GbmanL.html">GbmanL</a>, <a href="./../Classes/CuspL.html">CuspL</a>, <a href="./../Classes/StandardL.html">StandardL</a>, and more.
<p>These chaotic UGens generally each represent a deterministic set of equations, which can take different starting parameters. The equations define a system whose evolution over time is highly sensitive to initial conditions, and can exhibit highly intricate behaviour.
<p>To learn more, start here: <a href="http://en.wikipedia.org/wiki/Chaos_theory">http://en.wikipedia.org/wiki/Chaos_theory</a>
<p>To see all classes which derive from the ChaosGen class, run this line:<pre class='code prettyprint lang-sc'>ChaosGen.allSubclasses.do(_.postln)</pre>
<p><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<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><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/ChaosGen.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/ChaosGen.schelp</a><br>link::Classes/ChaosGen::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,165 @@
<html><head><title>Chromagram</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#UGens>Analysis'>UGens>Analysis</a></div>
<h1>Chromagram</h1>
<div id='summary'>Octave chroma band based representation of energy in a signal; Chromagram for nTET tuning systems with any base reference</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SCMIRUGens/Classes/Chromagram.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SCMIRUGens/Classes/Chromagram.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/MultiOutUGen.html">MultiOutUGen</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/SensoryDissonance.html">SensoryDissonance</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='#*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><a class='anchor' name='kw_Chroma'>&nbsp;</a><a class='anchor' name='kw_pitch%20class'>&nbsp;</a><a class='anchor' name='kw_equal%20temperament'>&nbsp;</a><a class='anchor' name='kw_filter%20bank'>&nbsp;</a><h2><a class='anchor' name='description'>Description</a></h2>
<p>A chromagram, measuring the energy at particular chroma within an nTET tuning system.
<p>Possible extension: TODO: Could have arbitrary tuning systems if precalculated the exact fft bin + interpolation data.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>fft</span>, <span class='argstr'>fftsize: 2048</span>, <span class='argstr'>n: 12</span>, <span class='argstr'>tuningbase: 32.703195662575</span>, <span class='argstr'>octaves: 8</span>, <span class='argstr'>integrationflag: 0</span>, <span class='argstr'>coeff: 0.9</span>, <span class='argstr'>octaveratio: 2</span>, <span class='argstr'>perframenormalize: 0</span>)</h3>
<div class='method'><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>fft<td class='argumentdesc'>
<p>input fft chain, that is, from an FFT UGen<tr><td class='argumentname'>fftsize<td class='argumentdesc'>
<p>FFT size, required for initialisation<tr><td class='argumentname'>n<td class='argumentdesc'>
<p>Equal divisions of an octave, e.g. n=12 is 12TET, 12 steps in an octave<tr><td class='argumentname'>tuningbase<td class='argumentdesc'>
<p>Base frequency or tuning; will correspong to index 0 in results (conventionally, this would be a 'C' in 12TET, but its an arbitrary reference)<tr><td class='argumentname'>octaves<td class='argumentdesc'>
<p>Number of octaves considered from tuning base up<tr><td class='argumentname'>integrationflag<td class='argumentdesc'>
<p>Whether to integrate from frame to frame, off by default<tr><td class='argumentname'>coeff<td class='argumentdesc'>
<p>Coefficient of integration<tr><td class='argumentname'>octaveratio<td class='argumentdesc'>
<p>Default of 2 is a 'normal' octave; other ratios are possible, e.g. Bohlen-Pierce scale uses 13 equal divisions over the ratio of 3 for a 'tritave'<tr><td class='argumentname'>perframenormalize<td class='argumentdesc'>
<p>Defaults to off, but if set to 1 will normalize each frame with respect to itself (as long as there is non-negligible power), potentially providing a more robust measure for comparison between frames (each frame will have then a normalized distribution over chroma, independent of volume)</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'>(
{
var in, fft, chroma;
//in = SinOsc.ar(440,0,0.1);
in= SoundIn.ar;
fft = FFT(LocalBuf(2048), in);
chroma=Chromagram.kr(fft);
chroma.poll;
Out.ar(0,Pan2.ar(in));
}.play
)
//n TET display
n= 12; //19, 24
(
x = {
var in, fft, chroma;
//in = SinOsc.ar(440,0,0.1);
in= SoundIn.ar;
fft = FFT(LocalBuf(2048), in);
chroma=Chromagram.kr(fft, 2048, n);
//chroma=Chromagram.kr(fft, 2048, n, 36.midicps, 7, 1, 0.9);
Out.kr(0,chroma);
}.play;
c= Bus.new('control', 0, n);
)
//poll coefficients snapshot
c.getn(n,{arg val; {val.plot;}.defer});
//Continuous graphical display of Chromagram values; free routine before closing window
(
var ms;
w=Window.new((n.asString)++" chroma coefficients", Rect(200,400,n*20+50,300));
ms= MultiSliderView.new(w, Rect(10,10,n*20,280));
ms.value_(Array.fill(n,0.0));
ms.valueThumbSize_(20.0);
ms.indexThumbSize_(20.0);
ms.gap_(0);
w.front;
r= {
inf.do{
c.getn(n,{arg val; {ms.value_(val)}.defer});
0.04.wait; //25 frames per second
};
}.fork;
w.onClose = {
r.stop;
c.free;
x.free;
};
)
b.free;
//Bohlen-Pierce over 3 tritaves, normalized results per frame
(
{
var in, fft, chroma;
//in = SinOsc.ar(440,0,0.1);
in= SoundIn.ar;
fft = FFT(LocalBuf(2048), in);
chroma=Chromagram.kr(fft,2048,13,octaves:3,octaveratio:3,perframenormalize:1);
chroma.poll;
Out.ar(0,Pan2.ar(in));
}.play
)</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SCMIRUGens/HelpSource/Classes/Chromagram.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SCMIRUGens/HelpSource/Classes/Chromagram.schelp</a><br>link::Classes/Chromagram::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,78 @@
<!doctype html><html lang='en'><head><title>Clock | 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 = 'Clock';
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'>Clock:</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'><li class='toc2'><a href='#Scheduling'>Scheduling</a></li>
<ul class='toc'></ul><li class='toc2'><a href='#Useful%20Tasks'>Useful Tasks</a></li>
<ul class='toc'></ul><li class='toc2'><a href='#Scheduling%20and%20Threads'>Scheduling and Threads</a></li>
<ul class='toc'></ul></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
<ul class='toc'><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='#*bars2beats'>bars2beats</a> </li>
<li class='toc3'><a href='#*beats'>beats</a> </li>
<li class='toc3'><a href='#*beats2bars'>beats2bars</a> </li>
<li class='toc3'><a href='#*beats2secs'>beats2secs</a> </li>
<li class='toc3'><a href='#*nextTimeOnGrid'>nextTimeOnGrid</a> </li>
<li class='toc3'><a href='#*play'>play</a> </li>
<li class='toc3'><a href='#*seconds'>seconds</a> </li>
<li class='toc3'><a href='#*secs2beats'>secs2beats</a> </li>
<li class='toc3'><a href='#*timeToNextBeat'>timeToNextBeat</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></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#Scheduling'>Scheduling</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Scheduling>Clocks'>Clocks</a></span>
</div><h1>Clock<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>abstract superclass for clocks</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Clock.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Clock.sc'>Clock.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/AppClock.html">AppClock</a>, <a href="../Classes/FollowerClock.html">FollowerClock</a>, <a href="../Classes/SystemClock.html">SystemClock</a>, <a href="../Classes/TempoClock.html">TempoClock</a></div>
<div id='related'>See also: <a href="./../Classes/AppClock.html">AppClock</a>, <a href="./../Classes/SystemClock.html">SystemClock</a>, <a href="./../Classes/TempoClock.html">TempoClock</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Clock is an abstract class: it only defines an abstract set of methods that all clocks should implement. See its subclasses: <a href="./../Classes/SystemClock.html">SystemClock</a>, <a href="./../Classes/TempoClock.html">TempoClock</a>, <a href="./../Classes/AppClock.html">AppClock</a> for specific implementations.<h3><a class='anchor' name='Scheduling'>Scheduling</a></h3>
<p>A Clock keeps track of time and allows <strong>tasks</strong> to be <strong>scheduled</strong> for some time in the future (e.g. using <a href="./../Classes/TempoClock.html#-sched">sched</a>, <a href="./../Classes/TempoClock.html#-schedAbs">schedAbs</a> or <a href="./../Classes/TempoClock.html#-play">play</a> methods). A task can be any <a href="./../Classes/Object.html">Object</a>. When the time at which a task was scheduled is up, the task is <em>awoken</em>, i.e. its <a href="./../Classes/Object.html#-awake">awake</a> method is evaluated. If the value returned by this method is a number, the task is automatically <strong>rescheduled</strong> for the time equal to its last scheduled time plus the return value (in <a href="./../Classes/TempoClock.html#-beats">beats</a>).<h3><a class='anchor' name='Useful%20Tasks'>Useful Tasks</a></h3>
<p>Objects of different classes may do different things in response to being scheduled on a clock by having own implementation of the <code class='code prettyprint lang-sc'>awake</code> method. The <a href="./../Classes/Object.html#-awake">Object: -awake</a> method that all classes inherit simply calls the same object's <a href="./../Classes/Object.html#-next">next</a> method, forwarding the <code class='code prettyprint lang-sc'>beats</code> argument as well as the return value, so subclasses may implement either one to equivalent effect, as far as clock scheduling is concerned. <a class='footnote anchor' name='footnote_org_1' href='#footnote_1'><sup>1</sup></a>
<p>Examples of useful objects to be scheduled on clocks:<ul>
<li><a href="./../Classes/Function.html#-awake">Function: -awake</a> method is implemented so as to call the function's own <a href="./../Classes/Function.html#-value">Function: -value</a> method, effectively running the code within the function.<li><a href="./../Classes/Routine.html#-awake">Routine: -awake</a> calls own <a href="./../Classes/Routine.html#-next">Routine: -next</a>, in turn starting or resuming the Routine's Function.<li>Some subclasses of <a href="./../Classes/Stream.html">Stream</a> will have its <code class='code prettyprint lang-sc'>next</code> method do something useful aside from returning a new value in a stream.</ul>
<h3><a class='anchor' name='Scheduling%20and%20Threads'>Scheduling and Threads</a></h3>
<p>Whenever a task is awaken, its <code class='code prettyprint lang-sc'>awake</code> method is called in the context of the <a href="./../Classes/Process.html#-mainThread">main thread</a>. Just before that, the main thread's <a href="./../Classes/Thread.html#-beats">logical time</a> is set to the scheduling time of the awaken task, and its <a href="./../Classes/Thread.html#-clock">clock</a> is set to the scheduling clock. Note however that if the task is a <a href="./../Classes/Routine.html">Routine</a> it will then immediately start or resume its Function, setting itself as the <a href="./../Classes/Thread.html#.thisThread">current thread</a>.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<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='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*bars2beats' href='./../Overviews/Methods.html#bars2beats'>bars2beats</a></h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*beats' href='./../Overviews/Methods.html#beats'>beats</a></h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*beats' href='./../Overviews/Methods.html#beats'>beats</a> = </h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*beats2bars' href='./../Overviews/Methods.html#beats2bars'>beats2bars</a></h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*beats2secs' href='./../Overviews/Methods.html#beats2secs'>beats2secs</a>(<span class='argstr'>beats</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*nextTimeOnGrid' href='./../Overviews/Methods.html#nextTimeOnGrid'>nextTimeOnGrid</a>(<span class='argstr'>quant: 1</span>, <span class='argstr'>phase: 0</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*play' href='./../Overviews/Methods.html#play'>play</a>(<span class='argstr'>task</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*seconds' href='./../Overviews/Methods.html#seconds'>seconds</a></h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*secs2beats' href='./../Overviews/Methods.html#secs2beats'>secs2beats</a>(<span class='argstr'>secs</span>)</h3>
<h3 class='method-code'><span class='method-prefix'>Clock.</span><a class='method-name' name='*timeToNextBeat' href='./../Overviews/Methods.html#timeToNextBeat'>timeToNextBeat</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><div class='footnotes'>
<a class='anchor' name='footnote_1'/><div class='footnote'>[<a href='#footnote_org_1'>1</a>] - However, note that the <code class='code prettyprint lang-sc'>next</code> method is also involved in the concept of <a href="./../Tutorials/Streams-Patterns-Events1.html#Streams">streams</a>.</div></div><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Clock.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Clock.schelp</a><br>link::Classes/Clock::<br></div></div></body></html>

View file

@ -0,0 +1,81 @@
<!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>

View file

@ -0,0 +1,142 @@
<!doctype html><html lang='en'><head><title>Condition | 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 = 'Condition';
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'>Condition:</div>
<span class='toc_search'>Filter: <input id='toc_search'></span><ul class='toc'><li class='toc1'><a href='#classmethods'>Class methods</a></li>
<ul class='toc'><li class='toc3'><a href='#*new'>new</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='toc3'><a href='#-test'>test</a> </li>
<li class='toc3'><a href='#-wait'>wait</a> </li>
<li class='toc3'><a href='#-hang'>hang</a> </li>
<li class='toc3'><a href='#-signal'>signal</a> </li>
<li class='toc3'><a href='#-unhang'>unhang</a> </li>
<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#Scheduling'>Scheduling</a></span>
</div><h1>Condition<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
</h1>
<div id='summary'>Block the execution of a thread</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Condition.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Condition.sc'>Condition.sc</a></div></div>
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>Condition.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>test: false</span>)</h3>
<div class='method'>
<p>Create a new instance, set the <strong>test</strong> variable.</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 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-test' href='./../Overviews/Methods.html#test'>test</a></h3>
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-test' href='./../Overviews/Methods.html#test'>test</a> = value</h3>
<div class='method'>
<p>Answer whether the condition will block or not (boolean).</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-wait' href='./../Overviews/Methods.html#wait'>wait</a></h3>
<div class='method'>
<p>Wait until the condition is true and signalled. This only works in a Routine. This method yields a symbol (\hang), so that the clock doesn't reschedule the Routine.<pre class='code prettyprint lang-sc'>c = Condition(false); fork { 0.5.wait; "started ...".postln; c.wait; "... and finished.".postln };
c.test = true;
c.signal;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hang' href='./../Overviews/Methods.html#hang'>hang</a>(<span class='argstr'>value: 'hang'</span>)</h3>
<div class='method'>
<p>Wait for <strong>value</strong> time, regardless of test. This only works in a Routine. This method yields a symbol (\hang), so that the clock doesn't reschedule the Routine.<pre class='code prettyprint lang-sc'>c = Condition.new; fork { 0.5.wait; "started ...".postln; c.hang; "... and finished.".postln };
c.unhang;</pre>
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-signal' href='./../Overviews/Methods.html#signal'>signal</a></h3>
<div class='method'>
<p>If <a href="#-test">-test</a> is true, reschedule blocked threads.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-unhang' href='./../Overviews/Methods.html#unhang'>unhang</a></h3>
<div class='method'>
<p>Resume threads.</div><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'>(
c = Condition.new(false);
Routine {
1.wait;
"waited for 1 second".postln;
1.wait;
"waited for another second, now waiting for you ... ".postln;
c.wait;
"the condition has stopped waiting.".postln;
1.wait;
"waited for another second".postln;
"waiting for you ... ".postln;
c.test = false;
c.wait;
"the condition has stopped waiting.".postln;
1.wait;
"the end".postln;
}.play;
)
// continue
(
c.test = true;
c.signal;
)
// a typical use is a routine that can pause under certain conditions:
(
c = Condition.new;
fork { loop { 1.wait; "going".postln; c.wait } };
)
c.test = true; c.signal;
c.test = false;</pre>
<pre class='code prettyprint lang-sc'>// the same, using hang
(
c = Condition.new;
Routine {
1.wait;
"waited for 1 second".postln;
1.wait;
"waited for another second, now waiting for you ... ".postln;
c.hang;
"the condition has stopped waiting.".postln;
1.wait;
"waited for another second".postln;
"waiting for you ... ".postln;
c.hang;
"the condition has stopped waiting.".postln;
}.play;
)
// continue
c.unhang;</pre>
<p>Waiting for Synths to end (waitForFree) uses a Condition implicitly:<pre class='code prettyprint lang-sc'>(
SynthDef(\help, { |out|
var mod = LFNoise2.kr(ExpRand(0.5, 2)) * 0.5;
var snd = mod * Blip.ar(Rand(200, 800) * (mod + 1));
Out.ar(out, snd);
FreeSelf.kr(mod &lt; 0); // free the synth when amplitude goes below 0.
}).add;
)
(
fork {
10.do {
"started a synth".postln;
Synth(\help).waitForFree;
"This one ended. Wait a second, I will start the next one.".postln;
1.wait;
};
"This is it.".postln;
}
);</pre>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Condition.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Condition.schelp</a><br>link::Classes/Condition::<br></div></div></body></html>

View file

@ -0,0 +1,61 @@
<!doctype html><html lang='en'><head><title>ControlRate | SuperCollider 3.10.2 Help</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../codemirror.css' type='text/css' />
<link rel='stylesheet' href='./../editor.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../lib/jquery.min.js'></script>
<script src='./../lib/codemirror-5.39.2.min.js' type='text/javascript'></script>
<script src='./../lib/codemirror-addon-simple-5.39.2.min.js' type='text/javascript'></script>
<script>
var helpRoot = './..';
var scdoc_title = 'ControlRate';
var scdoc_sc_version = '3.10.2';
</script>
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='qrc:///qtwebchannel/qwebchannel.js' type='text/javascript'></script>
</head>
<body onload='fixTOC()'>
<div id='toc'>
<div id='toctitle'>ControlRate:</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='#*ir'>ir</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 id='menubar'></div>
<div class='contents'>
<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>Info'>Info</a></span>
</div><h1>ControlRate<span id='superclasses'> : <a href="../Classes/InfoUGenBase.html">InfoUGenBase</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'>Server control rate.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InfoUGens.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InfoUGens.sc'>InfoUGens.sc</a></div><div id='related'>See also: <a href="./../Classes/RadiansPerSample.html">RadiansPerSample</a>, <a href="./../Classes/SampleDur.html">SampleDur</a>, <a href="./../Classes/SampleRate.html">SampleRate</a>, <a href="./../Classes/SubsampleOffset.html">SubsampleOffset</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>Get the current control rate of the server.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>ControlRate.</span><a class='method-name' name='*ir' href='./../Overviews/Methods.html#ir'>ir</a></h3>
<div class='supmethod'>From superclass: <a href='./../Classes/InfoUGenBase.html'>InfoUGenBase</a></div>
<div class='method'>
<p><h4>Returns:</h4>
<div class='returnvalue'>
<p>The current control rate of the server.
<p>equivalent to 1 / <a href="./../Classes/ControlDur.html">ControlDur</a></div></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>
<textarea class='editor'>{ ControlRate.ir.poll }.play;</textarea>
<p>play a sine tone at control rate<textarea class='editor'>{ SinOsc.ar(ControlRate.ir) * 0.1 }.play;</textarea>
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/ControlRate.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/ControlRate.schelp</a><br>link::Classes/ControlRate::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
</body></html>

View file

@ -0,0 +1,62 @@
<html><head><title>CuspL</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>CuspL</h1>
<div id='summary'>Cusp map 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/CuspN.html">CuspN</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/CuspN.html">CuspN</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 the difference equation:<pre> x(n+1) = a - b * sqrt(|x(n)|)</pre>
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
var a = 1.0, b = 1.9, xi = 0, size = 64;
plot(size.collect { xi = a - (b * sqrt(abs(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'>a: 1</span>, <span class='argstr'>b: 1.9</span>, <span class='argstr'>xi: 0</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
<div class='supmethod'>From superclass: <a href='./../Classes/CuspN.html'>CuspN</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'>xi<td class='argumentdesc'>
<p>Initial value of x</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'>// vary frequency
{ CuspL.ar(MouseX.kr(20, SampleRate.ir), 1.0, 1.99) * 0.3 }.play(s);
// mouse-controlled params
{ CuspL.ar(SampleRate.ir/4, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1)) * 0.3 }.play(s);
// as a frequency control
{ SinOsc.ar(CuspL.ar(40, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1))*800+900)*0.4 }.play(s);</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CuspL.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CuspL.schelp</a><br>link::Classes/CuspL::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,66 @@
<html><head><title>CuspN</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>CuspN</h1>
<div id='summary'>Cusp map 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/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/CuspL.html">CuspL</a></div>
<div id='related'>See also: <a href="./../Classes/CuspL.html">CuspL</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 equation:<pre> x(n+1) = a - b * sqrt(|x(n)|)</pre>
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
var a = 1.0, b = 1.9, xi = 0, size = 64;
plot(size.collect { xi = a - (b * sqrt(abs(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'>a: 1</span>, <span class='argstr'>b: 1.9</span>, <span class='argstr'>xi: 0</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'>a<td class='argumentdesc'>
<p>Equation variable<tr><td class='argumentname'>b<td class='argumentdesc'>
<p>Equation variable<tr><td class='argumentname'>xi<td class='argumentdesc'>
<p>Initial value of x<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'>// vary frequency
{ CuspN.ar(MouseX.kr(20, SampleRate.ir), 1.0, 1.99) * 0.3 }.play(s);
// mouse-controlled params
{ CuspN.ar(SampleRate.ir/4, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1)) * 0.3 }.play(s);
// as a frequency control
{ SinOsc.ar(CuspN.ar(40, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1))*800+900)*0.4 }.play(s);</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CuspN.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/CuspN.schelp</a><br>link::Classes/CuspN::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,80 @@
<html><head><title>CutBuf1</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#Libraries>BBCut'>Libraries>BBCut</a></div>
<h1>CutBuf1</h1>
<div id='summary'>BBCut2 buffer playback, efficient but inflexible</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutBuf1.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutBuf1.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/CutSynth.html">CutSynth</a> : <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</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='#*new'>new</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>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-bbcutbuf'>bbcutbuf</a> </li>
<li class='toc3'><a href='#-free'>free</a> </li>
<li class='toc3'><a href='#-initCutBuf1'>initCutBuf1</a> </li>
<li class='toc3'><a href='#-offset'>offset</a> </li>
<li class='toc3'><a href='#-renderBlock'>renderBlock</a> </li>
<li class='toc3'><a href='#-setup'>setup</a> </li>
</ul></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>Playback for a buffer, using a single fixed PlayBuf UGen with jump in playback position- cheap for CPU but no enveloping, so it may click, and no individual parameters for different grains are supported. <h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>bbcutbuf</span>, <span class='argstr'>offset</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>bbcutbuf<td class='argumentdesc'>
<p>An instance of BBCutBuffer representing the buffer to be cut-up.<tr><td class='argumentname'>offset<td class='argumentdesc'>
<p>A parameter to be passed to any cut playback position determining routine. The default chooseoffset method is in BBCutBuffer and the parameter is a single number from 0.0 to 1.0 giving the chance of a jump to a random event in the source.</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><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bbcutbuf' href='./../Overviews/Methods.html#bbcutbuf'>bbcutbuf</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bbcutbuf' href='./../Overviews/Methods.html#bbcutbuf'>bbcutbuf</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-free' href='./../Overviews/Methods.html#free'>free</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initCutBuf1' href='./../Overviews/Methods.html#initCutBuf1'>initCutBuf1</a> (<span class='argstr'>bcb</span>, <span class='argstr'>off</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-offset' href='./../Overviews/Methods.html#offset'>offset</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-offset' href='./../Overviews/Methods.html#offset'>offset</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-renderBlock' href='./../Overviews/Methods.html#renderBlock'>renderBlock</a> (<span class='argstr'>block</span>, <span class='argstr'>clock</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setup' href='./../Overviews/Methods.html#setup'>setup</a> </h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>(
var sf, clock;
clock= ExternalClock(TempoClock(2.1));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
//0.3.coin chance of random offset starting position for cut playback
BBCut2(CutBuf1(sf,0.3), BBCutProc11.new).play(clock);
});
)</pre>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutBuf1.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutBuf1.schelp</a><br>link::Classes/CutBuf1::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,150 @@
<html><head><title>CutBuf2</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#Libraries>BBCut'>Libraries>BBCut</a></div>
<h1>CutBuf2</h1>
<div id='summary'>BBCut2 buffer playback with modulatable grain parameters</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutBuf2.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutBuf2.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/CutSynth.html">CutSynth</a> : <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</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='#*new'>new</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>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-atkprop'>atkprop</a> </li>
<li class='toc3'><a href='#-bbcutbuf'>bbcutbuf</a> </li>
<li class='toc3'><a href='#-curve'>curve</a> </li>
<li class='toc3'><a href='#-dutycycle'>dutycycle</a> </li>
<li class='toc3'><a href='#-initCutBuf2'>initCutBuf2</a> </li>
<li class='toc3'><a href='#-offset'>offset</a> </li>
<li class='toc3'><a href='#-pbsfunc'>pbsfunc</a> </li>
<li class='toc3'><a href='#-relprop'>relprop</a> </li>
<li class='toc3'><a href='#-renderBlock'>renderBlock</a> </li>
<li class='toc3'><a href='#-setup'>setup</a> </li>
</ul></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>Playback for a buffer, with individual grains spawned for each cut. Each grain may have associated parameters for playback speed, enveloping and dutycycle (ratio of duration to inter-onset-interval). <h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>bbcutbuf</span>, <span class='argstr'>offset</span>, <span class='argstr'>pbsfunc</span>, <span class='argstr'>dutycycle</span>, <span class='argstr'>atkprop</span>, <span class='argstr'>relprop</span>, <span class='argstr'>curve</span>)</h3>
<div class='method'>
<p>All of the arguments apart from bbcutbuf can have more complex objects than SimpleNumbers passed in. You can pass in anything which responds to value (like a Function) or even objects which respond to the updateblock method such as CutPBS1 (see examples below).<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>bbcutbuf<td class='argumentdesc'>
<p>An instance of BBCutBuffer representing the buffer to be cut-up.<tr><td class='argumentname'>offset<td class='argumentdesc'>
<p>A parameter to be passed to any cut playback position determining routine. The default chooseoffset method is in BBCutBuffer and the parameter is a single number from 0.0 to 1.0 giving the chance of a jump to a random event in the source.<tr><td class='argumentname'>pbsfunc<td class='argumentdesc'>
<p>Playback speed (rate) control for each cut. This can be a constant, or some other object that responds to .value, which is called for every repeat in a block. The first argument is the repeat number in the block, and the second argument is the block itself. If pbsfunc responds to .updateblock, that will also be called every block with the current block passed as an argument.<tr><td class='argumentname'>dutycycle<td class='argumentdesc'>
<p>Ratio of duration to inter-onset-interval (IOI). 0.5 would mean that the duration of grains is only half the length between cut start times. <tr><td class='argumentname'>atkprop<td class='argumentdesc'>
<p>Enveloping parameter for attack speed. Rated as a proportion of the overall envelope (0.0 to 1.0) <tr><td class='argumentname'>relprop<td class='argumentdesc'>
<p>Enveloping parameter for release speed. Rated as a proportion of the overall envelope (0.0 to 1.0) <tr><td class='argumentname'>curve<td class='argumentdesc'>
<p>Envelope curve</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><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-atkprop' href='./../Overviews/Methods.html#atkprop'>atkprop</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-atkprop' href='./../Overviews/Methods.html#atkprop'>atkprop</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bbcutbuf' href='./../Overviews/Methods.html#bbcutbuf'>bbcutbuf</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bbcutbuf' href='./../Overviews/Methods.html#bbcutbuf'>bbcutbuf</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-curve' href='./../Overviews/Methods.html#curve'>curve</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-curve' href='./../Overviews/Methods.html#curve'>curve</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-dutycycle' href='./../Overviews/Methods.html#dutycycle'>dutycycle</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-dutycycle' href='./../Overviews/Methods.html#dutycycle'>dutycycle</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initCutBuf2' href='./../Overviews/Methods.html#initCutBuf2'>initCutBuf2</a> (<span class='argstr'>bcb</span>, <span class='argstr'>off</span>, <span class='argstr'>pf</span>, <span class='argstr'>dc</span>, <span class='argstr'>ap</span>, <span class='argstr'>rp</span>, <span class='argstr'>c</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-offset' href='./../Overviews/Methods.html#offset'>offset</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-offset' href='./../Overviews/Methods.html#offset'>offset</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pbsfunc' href='./../Overviews/Methods.html#pbsfunc'>pbsfunc</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pbsfunc' href='./../Overviews/Methods.html#pbsfunc'>pbsfunc</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-relprop' href='./../Overviews/Methods.html#relprop'>relprop</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-relprop' href='./../Overviews/Methods.html#relprop'>relprop</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-renderBlock' href='./../Overviews/Methods.html#renderBlock'>renderBlock</a> (<span class='argstr'>block</span>, <span class='argstr'>clock</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setup' href='./../Overviews/Methods.html#setup'>setup</a> </h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>(
var sf, clock;
s=Server.default;
clock= ExternalClock(TempoClock(2.1)).play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf2(sf,0.3), BBCutProc11.new).play(clock);
});
)
//dutycycle and envelope manipulations, CutPBS1 instance used to control repitching of rolls
(
var sf, clock;
clock= ExternalClock(TempoClock(2.1)).play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf2(sf,0.3, CutPBS1(0.97,{1.rand2}), 0.5, 0.001, 0.5, -4), WarpCutProc1.new).play(clock);
});
)
//showing passing of functions, the block argument passed to the dutycycle function is a BBCutBlock object
(
var sf, clock;
clock=ExternalClock(TempoClock(3.3)).play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break2.aiff",4);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf2(sf,0.3, {rrand(0.9,1.1)}, {arg i, block; var ioi; ioi= block.iois[i]; ioi.min(0.75)/ioi},{exprand(0.001,0.5)}), ChooseCutProc({[0.5,1.0,1.25].choose},{rrand(1,4)})).play(clock);
});
)
(
var sf, clock;
clock=ExternalClock(TempoClock(3.3)).play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break2.aiff",4);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf2(sf, relprop:0.8, curve:{rrand(-16,-1)}), ChooseCutProc({[0.5,1.0,0.25].choose},{rrand(1,4)})).play(clock);
});
)</pre>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutBuf2.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutBuf2.schelp</a><br>link::Classes/CutBuf2::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,221 @@
<html><head><title>CutBuf3</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 (extension)</div>
<div id='categories'><a href='./../Browse.html#Libraries>BBCut'>Libraries>BBCut</a></div>
<h1>CutBuf3</h1>
<div id='summary'>BBCut2 buffer playback with modulatable grain parameters</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutBuf3.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutBuf3.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/CutSynth.html">CutSynth</a> : <a href="../Classes/Object.html">Object</a></div>
<div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</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='#*new'>new</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>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-atk'>atk</a> </li>
<li class='toc3'><a href='#-bbcutbuf'>bbcutbuf</a> </li>
<li class='toc3'><a href='#-curve'>curve</a> </li>
<li class='toc3'><a href='#-deviationmult'>deviationmult</a> </li>
<li class='toc3'><a href='#-dutycycle'>dutycycle</a> </li>
<li class='toc3'><a href='#-initCutBuf2'>initCutBuf2</a> </li>
<li class='toc3'><a href='#-offset'>offset</a> </li>
<li class='toc3'><a href='#-pbsfunc'>pbsfunc</a> </li>
<li class='toc3'><a href='#-posttrim'>posttrim</a> </li>
<li class='toc3'><a href='#-pretrim'>pretrim</a> </li>
<li class='toc3'><a href='#-rel'>rel</a> </li>
<li class='toc3'><a href='#-renderBlock'>renderBlock</a> </li>
<li class='toc3'><a href='#-setup'>setup</a> </li>
</ul></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>Playback for a segmented buffer, with individual grains spawned for each event. Cuts play back any events within their scope. The scheduling system for bbcut2 takes account of groove based time deviations from quantised template positions for the events, and perceptual attack times. Note that FX units may switch exactly on the cuts, which may or may not match up with the event playback. There are options to constrain the amount of groove deviation.
<p>Because CutBuf3 works by scheduling individual events in a soundfile, there is no repitch for different tempi. So you may get different plkayback speeds from a CutBuf2 or 1- ie, with CutBuf3 you should hear the sample's original pitch at whatever tempo you explore. <h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>bbcutbuf</span>, <span class='argstr'>offset</span>, <span class='argstr'>deviationmult</span>, <span class='argstr'>pretrim</span>, <span class='argstr'>posttrim</span>, <span class='argstr'>pbsfunc</span>, <span class='argstr'>dutycycle</span>, <span class='argstr'>atk</span>, <span class='argstr'>rel</span>, <span class='argstr'>curve</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>bbcutbuf<td class='argumentdesc'>
<p>An instance of BBCutBuffer representing the buffer to be cut-up.<tr><td class='argumentname'>offset<td class='argumentdesc'>
<p>A parameter to be passed to any cut playback position determining routine. The default chooseoffset method is in BBCutBuffer and the parameter is a single number from 0.0 to 1.0 giving the chance of a jump to a random event in the source. You can pass an Array in that has two parameters, being [randomoffsetchance, quantise grid of offsetcutting in beats]. Ie, [0.3, 0.5] would have a 30% chance of jumping to a random eighth note position. <tr><td class='argumentname'>deviationmult<td class='argumentdesc'>
<p>Multiplies the groove based time deviations of events. Set to 0.0 for rigid quantise based playback, 1.0 for full original timing properties. <tr><td class='argumentname'>pretrim<td class='argumentdesc'>
<p>If playing back a cut, play any events within the cut even if there tming deviation puts them ahead of the cut start. Ie, play anticipatory events. <tr><td class='argumentname'>posttrim<td class='argumentdesc'>
<p>The same for events whose deviation puts them after the end of the cut, but whose quantised position is within the cut. <tr><td class='argumentname'>pbsfunc<td class='argumentdesc'>
<p>Playback speed (rate) control for each cut. This can be a constant, or some other object that responds to .value, which is called for every repeat in a block. The first argument is the repeat number in the block, and the second argument is the block itself. If pbsfunc responds to .updateblock, that will also be called every block with the current block passed as an argument.<tr><td class='argumentname'>dutycycle<td class='argumentdesc'>
<p>Ratio of duration to inter-onset-interval (IOI). 0.5 would mean that the duration of grains is only half the length between cut start times. <tr><td class='argumentname'>atk<td class='argumentdesc'>
<p>Enveloping parameter for attack speed of an event grain, in seconds. You may set to zero to play back source events exactly as in the original, assuming the source is proprely segmented and there are no clicks. <tr><td class='argumentname'>rel<td class='argumentdesc'>
<p>Enveloping parameter for release speed in seconds.<tr><td class='argumentname'>curve<td class='argumentdesc'>
<p>Envelope curve parameter.
<p>The cut synthesis arguments apart from bbcutbuf can have more complex objects than SimpleNumbers passed in. You can pass in anything which responds to value (like a Function) or even objects which respond to the updateblock method such as CutPBS1 (see examples below). </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><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-atk' href='./../Overviews/Methods.html#atk'>atk</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-atk' href='./../Overviews/Methods.html#atk'>atk</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bbcutbuf' href='./../Overviews/Methods.html#bbcutbuf'>bbcutbuf</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-bbcutbuf' href='./../Overviews/Methods.html#bbcutbuf'>bbcutbuf</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-curve' href='./../Overviews/Methods.html#curve'>curve</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-curve' href='./../Overviews/Methods.html#curve'>curve</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-deviationmult' href='./../Overviews/Methods.html#deviationmult'>deviationmult</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-deviationmult' href='./../Overviews/Methods.html#deviationmult'>deviationmult</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-dutycycle' href='./../Overviews/Methods.html#dutycycle'>dutycycle</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-dutycycle' href='./../Overviews/Methods.html#dutycycle'>dutycycle</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initCutBuf2' href='./../Overviews/Methods.html#initCutBuf2'>initCutBuf2</a> (<span class='argstr'>bcb</span>, <span class='argstr'>off</span>, <span class='argstr'>dm</span>, <span class='argstr'>pt</span>, <span class='argstr'>pstt</span>, <span class='argstr'>pf</span>, <span class='argstr'>dc</span>, <span class='argstr'>ap</span>, <span class='argstr'>rp</span>, <span class='argstr'>c</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-offset' href='./../Overviews/Methods.html#offset'>offset</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-offset' href='./../Overviews/Methods.html#offset'>offset</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pbsfunc' href='./../Overviews/Methods.html#pbsfunc'>pbsfunc</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pbsfunc' href='./../Overviews/Methods.html#pbsfunc'>pbsfunc</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-posttrim' href='./../Overviews/Methods.html#posttrim'>posttrim</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-posttrim' href='./../Overviews/Methods.html#posttrim'>posttrim</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pretrim' href='./../Overviews/Methods.html#pretrim'>pretrim</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-pretrim' href='./../Overviews/Methods.html#pretrim'>pretrim</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-rel' href='./../Overviews/Methods.html#rel'>rel</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-rel' href='./../Overviews/Methods.html#rel'>rel</a> = value</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-renderBlock' href='./../Overviews/Methods.html#renderBlock'>renderBlock</a> (<span class='argstr'>block</span>, <span class='argstr'>clock</span>)</h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setup' href='./../Overviews/Methods.html#setup'>setup</a> </h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>s=Server.default;
//default segmentation into eighth note events applied to the buffer
(
var sf, clock;
clock= ExternalClock(TempoClock(2.1));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf3(sf,0.3), BBCutProc11.new).play(clock);
});
)
//segment into even 16ths, apply swing on event playback, dutycycle manipulation, no enveloping
(
var sf, clock;
clock= ExternalClock(TempoClock(1.8));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8, 0.25); //segment into 16ths so 16th swing works
s.sync; //this forces a wait for the Buffer to load
sf.setgroove; //defaults to UK garage swing
BBCut2(CutBuf3(sf,0.3,0.0,true,true,1.0,1.0,0.0,0.0,0), BBCutProc11.new).play(clock);
});
)
//passing in event positions, event lengths will be taken as distance between event onsets
//demonstrating repitch, keeping all anticipations and postevents with original groove deviation
(
var sf, clock;
clock= ExternalClock(TempoClock(3.1));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break2.aiff",4, [ 0, 16789, 28721, 37166, 41389, 49042, 56783 ]);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf3(sf,0.3,1.0, false, false), BBCutProc11.new).play(clock);
});
)
//preserving time deviations but events realigned to a UK garage swing grid
//also shows interaction with FX unit
(
var sf, clock;
clock= ExternalClock(TempoClock(2.8));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break2.aiff",4, [ 0, 16789, 28721, 37166, 41389, 49042, 56783 ]); //segment into 16ths so 16th swing works
s.sync; //this forces a wait for the Buffer to load
sf.setgroove; //defaults to UK garage swing
BBCut2([CutBuf3(sf,0.3,1.0,false,false,1.0,1.0,0.0,0.0,0),CutComb1.new], ChooseCutProc(1.0,2)).play(clock);
});
)
//use the GUI to find onsets for a loaded sample- use post to output the data array
Segmentation.new //also see the help file for this GUI
//you could substitute your data here, remember to change the sound filename too
(
~data=[ [ 380, 0.21049886621315, 0.005 ], [ 9663, 0.16013605442177, 0.005 ], [ 16725, 0.28975056689342, 0.005 ], [ 29503, 0.085555555555556, 0.005 ], [ 33276, 0.067482993197279, 0.005 ], [ 41243, 0.18616780045351, 0.005 ], [ 49453, 0.29065759637188, 0.005 ], [ 62271, 0.085532879818594, 0.005 ], [ 66043, 0.081360544217687, 0.005 ], [ 74014, 0.18480725623583, 0.005 ], [ 82164, 0.28897959183673, 0.005 ], [ 94908, 0.08421768707483, 0.005 ], [ 98622, 0.096734693877551, 0.005 ], [ 106492, 0.2931746031746, 0.005 ], [ 119421, 0.08562358276644, 0.005 ], [ 123197, 0.0740589569161, 0.005 ] ];
)
//passing in event data in general form
(
var sf, clock;
clock= ExternalClock(TempoClock(2.1));
clock.play;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8, ~data);
s.sync; //this forces a wait for the Buffer to load
BBCut2(CutBuf3(sf,0.3,1.0, false, true), BBCutProc11.new).play(clock);
});
)
/////////////////////////////////////////////////////////////////////
//test code for finding events for wraparound cuts
//default segmentation into eighth note events applied to the buffer
f= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
a=f.findevents(7,8.4).postln;
b=f.trimevents(7,8.4,a,true, true,2);
//////////////////////////////////////////////////////////////////////</pre>
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutBuf3.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutBuf3.schelp</a><br>link::Classes/CutBuf3::<br>sc version: 3.8.0</div></div></body></html>

View file

@ -0,0 +1,75 @@
<!doctype html><html lang='en'><head><title>CutComb1 | 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 = 'CutComb1';
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'>CutComb1:</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='#*new'>new</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>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-dectime'>dectime</a> </li>
<li class='toc3'><a href='#-deltime'>deltime</a> </li>
<li class='toc3'><a href='#-free'>free</a> </li>
<li class='toc3'><a href='#-renderBlock'>renderBlock</a> </li>
<li class='toc3'><a href='#-setup'>setup</a> </li>
</ul></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 (extension)</span>
| <span id='categories'><a href='./../Browse.html#Libraries'>Libraries</a>&#8201;&gt;&#8201;<a href='./../Browse.html#Libraries>BBCut'>BBCut</a></span>
</div><h1>CutComb1<span id='superclasses'> : <a href="../Classes/CutSynth.html">CutSynth</a> : <a href="../Classes/Object.html">Object</a></span>
<div class='extension-indicator-ctr' title='This help file originates from a third-party quark or plugin for SuperCollider.'><img class='extension-indicator-icon' alt='Extension' src='./../images/plugin.png'><span class='extension-indicator-text'>Extension</span></div></h1>
<div id='summary'>BBCut2 comb filter</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/fx/CutComb1.sc' title='/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/fx/CutComb1.sc'>CutComb1.sc</a></div><div id='related'>See also: <a href="./../Overviews/BBCut.html">BBCut</a></div>
</div>
<h2><a class='anchor' name='description'>Description</a></h2>
<p>CutComb1 adds a comb filter to BBCut2.
<p>Both arguments can be constant values, but they can also be anything that responds to .value. In the latter case, .value is called every repeat, with the repeat number as the first argument and the block as the second argument.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='method-code'><span class='method-prefix'>CutComb1.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>deltime: 0.01</span>, <span class='argstr'>dectime: 0.5</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'