docs (scm, schelp, scrbl & html)
20
README.md
|
@ -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
|
@ -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]].
|
32
doc-schelp/Help-3.12.2/BrokenLink.html
Normal 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>
|
52
doc-schelp/Help-3.12.2/Browse.html
Normal 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>
|
94
doc-schelp/Help-3.12.2/Classes/AllpassN.html
Normal 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> > <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>
|
54
doc-schelp/Help-3.12.2/Classes/AnalyseEvents2.html
Normal 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>
|
88
doc-schelp/Help-3.12.2/Classes/AppClock.html
Normal 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> > <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>
|
45
doc-schelp/Help-3.12.2/Classes/ArgNameLabel.html
Normal 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> > <a href='./../Browse.html#Libraries>crucial'>crucial</a> > <a href='./../Browse.html#Libraries>crucial>GUI'>GUI</a> > <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>
|
758
doc-schelp/Help-3.12.2/Classes/Array.html
Normal 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> > <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 > b.size }); // sort by size, big first
|
||||
[1, 2, 3].powerset.sort({ |a, b| a.size > 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>
|
93
doc-schelp/Help-3.12.2/Classes/Astrocade.html
Normal 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> > <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>
|
367
doc-schelp/Help-3.12.2/Classes/BBCut2.html
Normal 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 <<[val.path, val.numChannels, val.numFrames, val.sampleRate, val.bufnum]<<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>
|
117
doc-schelp/Help-3.12.2/Classes/BBCutBuffer.html
Normal 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 << [\length,f.length, \beatlength, f.beatlength, \events, f.eventstarts] << 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 << [\length,val.length, \beatlength, val.beatlength, \events, val.eventstarts] << 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>
|
203
doc-schelp/Help-3.12.2/Classes/BBCutProc11.html
Normal 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>
|
97
doc-schelp/Help-3.12.2/Classes/BBandStop.html
Normal 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> > <a href='./../Browse.html#UGens>Filters'>Filters</a> > <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>
|
182
doc-schelp/Help-3.12.2/Classes/BBlockerProgram.html
Normal 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>
|
69
doc-schelp/Help-3.12.2/Classes/Blip.html
Normal 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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <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>
|
63
doc-schelp/Help-3.12.2/Classes/BrownNoise.html
Normal 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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <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>
|
71
doc-schelp/Help-3.12.2/Classes/Brusselator.html
Normal 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'> </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 > 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 > (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>
|
58
doc-schelp/Help-3.12.2/Classes/BufRateScale.html
Normal 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>
|
880
doc-schelp/Help-3.12.2/Classes/Buffer.html
Normal 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> > <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>
|
365
doc-schelp/Help-3.12.2/Classes/Bus.html
Normal 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>
|
68
doc-schelp/Help-3.12.2/Classes/COsc.html
Normal 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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <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>
|
110
doc-schelp/Help-3.12.2/Classes/CSVFileReader.html
Normal 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>
|
42
doc-schelp/Help-3.12.2/Classes/ChaosGen.html
Normal 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>
|
165
doc-schelp/Help-3.12.2/Classes/Chromagram.html
Normal 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'> </a><a class='anchor' name='kw_pitch%20class'> </a><a class='anchor' name='kw_equal%20temperament'> </a><a class='anchor' name='kw_filter%20bank'> </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>
|
78
doc-schelp/Help-3.12.2/Classes/Clock.html
Normal 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> > <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>
|
81
doc-schelp/Help-3.12.2/Classes/CombN.html
Normal 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> > <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'>… see 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>
|
142
doc-schelp/Help-3.12.2/Classes/Condition.html
Normal 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 < 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>
|
61
doc-schelp/Help-3.12.2/Classes/ControlRate.html
Normal 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> > <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>
|
62
doc-schelp/Help-3.12.2/Classes/CuspL.html
Normal 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>
|
66
doc-schelp/Help-3.12.2/Classes/CuspN.html
Normal 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>
|
80
doc-schelp/Help-3.12.2/Classes/CutBuf1.html
Normal 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>
|
150
doc-schelp/Help-3.12.2/Classes/CutBuf2.html
Normal 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>
|
221
doc-schelp/Help-3.12.2/Classes/CutBuf3.html
Normal 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>
|
75
doc-schelp/Help-3.12.2/Classes/CutComb1.html
Normal 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> > <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'>deltime<td class='argumentdesc'>
|
||||
<p>Delay time.<tr><td class='argumentname'>dectime<td class='argumentdesc'>
|
||||
<p>Decay time.</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='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dectime' href='./../Overviews/Methods.html#dectime'>dectime</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dectime' href='./../Overviews/Methods.html#dectime'>dectime</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-deltime' href='./../Overviews/Methods.html#deltime'>deltime</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-deltime' href='./../Overviews/Methods.html#deltime'>deltime</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-free' href='./../Overviews/Methods.html#free'>free</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-renderBlock' href='./../Overviews/Methods.html#renderBlock'>renderBlock</a>(<span class='argstr'>block</span>, <span class='argstr'>clock</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' 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'>~buf = BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff", 8);
|
||||
|
||||
BBCut2(CutGroup([CutBuf3(~buf, 0.3), CutComb1(0.01, 0.5)]), BBCutProc11()).play(2.5);
|
||||
|
||||
BBCut2(CutGroup([CutBuf3(~buf, 0.3), CutComb1({ exprand(100, 200).reciprocal }, 0.5)]), BBCutProc11()).play(2.5);
|
||||
|
||||
r = Routine({ loop { [48, 55, 62, 65].scramble.midicps.reciprocal.do(_.yield) } });
|
||||
BBCut2(CutGroup([CutBuf3(~buf, 0.3), CutComb1(r, 0.5)]), BBCutProc11()).play(2.5);</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutComb1.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutComb1.schelp</a><br>link::Classes/CutComb1::<br></div></div></body></html>
|
79
doc-schelp/Help-3.12.2/Classes/CutMixer.html
Normal file
|
@ -0,0 +1,79 @@
|
|||
<html><head><title>CutMixer</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>CutMixer</h1>
|
||||
<div id='summary'>BBCut2 volume and panning control</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutMixer.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutMixer.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='#-ampfunc'>ampfunc</a> </li>
|
||||
<li class='toc3'><a href='#-free'>free</a> </li>
|
||||
<li class='toc3'><a href='#-initCutMixer'>initCutMixer</a> </li>
|
||||
<li class='toc3'><a href='#-outbus'>outbus</a> </li>
|
||||
<li class='toc3'><a href='#-panfunc'>panfunc</a> </li>
|
||||
<li class='toc3'><a href='#-renderBlock'>renderBlock</a> </li>
|
||||
<li class='toc3'><a href='#-setup'>setup</a> </li>
|
||||
<li class='toc3'><a href='#-volume'>volume</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 CutMixer organises the final output from a given rendering CutGroup. It defaults to outputting a stereo centred signal at full volume on busses 0 and 1. Whilst the main rendering in bbcut2 is mono, the final output is thus rendered to stereo. A stereo buffer cutup would use a simpler CutMixer where no panning occurs. <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'>outbus: 0</span>, <span class='argstr'>volume: 1</span>, <span class='argstr'>ampfunc: 1</span>, <span class='argstr'>panfunc: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>outbus<td class='argumentdesc'>
|
||||
<p>Bus number for final output. The stereo output will be placed on this bus plus the one above. The default is thus 0 and 1.<tr><td class='argumentname'>volume<td class='argumentdesc'>
|
||||
<p>output volume multiplier. Defaults to 1.0.<tr><td class='argumentname'>ampfunc<td class='argumentdesc'>
|
||||
<p>Something that responds to .value and returns a cut's amplitude. This is called for every repeat in a <a href="./../Classes/BBCutBlock.html">BBCutBlock</a>. The first argument is the repeat number in the block, and the second argument is the block itself. If ampfunc responds to .updateblock, that will also be called every block with the current block passed as an argument.<tr><td class='argumentname'>panfunc<td class='argumentdesc'>
|
||||
<p>Something that responds to .value and returns a cut's pan position. This is called for every repeat in a <a href="./../Classes/BBCutBlock.html">BBCutBlock</a>. The first argument is the repeat number in the block, and the second argument is the block itself. If panfunc responds to .updateblock, that will also be called every block with the current block passed as an argument.</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='-ampfunc' href='./../Overviews/Methods.html#ampfunc'>ampfunc</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-ampfunc' href='./../Overviews/Methods.html#ampfunc'>ampfunc</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='-initCutMixer' href='./../Overviews/Methods.html#initCutMixer'>initCutMixer</a> (<span class='argstr'>ob: 0</span>, <span class='argstr'>vol: 1</span>, <span class='argstr'>af: 1</span>, <span class='argstr'>pf: 0</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-outbus' href='./../Overviews/Methods.html#outbus'>outbus</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-panfunc' href='./../Overviews/Methods.html#panfunc'>panfunc</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-panfunc' href='./../Overviews/Methods.html#panfunc'>panfunc</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>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-volume' href='./../Overviews/Methods.html#volume'>volume</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-volume' href='./../Overviews/Methods.html#volume'>volume</a> = value</h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>TempoClock.default.tempo_(2);
|
||||
|
||||
(
|
||||
BBCut2(CutGroup([CutStream1.new,CutMixer(0,1.0,{1.0.rand},{1.0.rand2})]), ChooseCutProc(0.25,4)).play
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
BBCut2(CutGroup([CutStream1.new,CutMixer(0,1.0,RollAmplitude.new,CutPan1.new)]), WarpCutProc1(0.25,4)).play;
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutMixer.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutMixer.schelp</a><br>link::Classes/CutMixer::<br>sc version: 3.8.0</div></div></body></html>
|
148
doc-schelp/Help-3.12.2/Classes/CutStream1.html
Normal file
|
@ -0,0 +1,148 @@
|
|||
<html><head><title>CutStream1</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>CutStream1</h1>
|
||||
<div id='summary'>BBCut2 with live input</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutStream1.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutStream1.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='#-inbus'>inbus</a> </li>
|
||||
<li class='toc3'><a href='#-initCutStream1'>initCutStream1</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 stream of audio which can be cut-up. The stream can be any bus on the Server, so might be a file streamed off disk, a current audio input or some synthesised data.
|
||||
<p>Each grain may have associated parameters for enveloping and dutycycle (ratio of duration to inter-onset-interval).
|
||||
<p>Note that CutStream1 uses In.ar rather than InFeedback.ar, for reaction speed, so execution order is important. you cannot cut-up a stream created later in the execution order. Change the SynthDefs in the class file to InFeedback if you want no execution order worries, at the expense of an audio block's delay (usually 64 samples). <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'>inbus</span>, <span class='argstr'>bbcutbuf</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><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>inbus<td class='argumentdesc'>
|
||||
<p>Bus on the Server to be cut-up.<tr><td class='argumentname'>bbcutbuf<td class='argumentdesc'>
|
||||
<p>A Server side buffer must exist for the use of the UGen- by default one is allocated for you.<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='-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='-inbus' href='./../Overviews/Methods.html#inbus'>inbus</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-inbus' href='./../Overviews/Methods.html#inbus'>inbus</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initCutStream1' href='./../Overviews/Methods.html#initCutStream1'>initCutStream1</a> (<span class='argstr'>ib</span>, <span class='argstr'>bcb</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='-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;
|
||||
|
||||
|
||||
a=BBCut2(CutStream1.new).play;
|
||||
|
||||
a.end;
|
||||
|
||||
//dutycycle and envelope manipulations of first audio in channel
|
||||
(
|
||||
var buf, clock;
|
||||
|
||||
clock= ExternalClock(TempoClock(2.1));
|
||||
|
||||
clock.play;
|
||||
|
||||
Routine.run({
|
||||
|
||||
buf= BBCutBuffer.alloc(s,44100,1);
|
||||
|
||||
s.sync; //this forces a wait for the Buffer to be allocated
|
||||
|
||||
BBCut2(CutStream1(s.options.numOutputBusChannels, buf, 0.5, 0.001, 0.5, -4), WarpCutProc1.new).play(clock);
|
||||
});
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
//dutycycle and envelope manipulations cutting up a stream being synthesised
|
||||
(
|
||||
var buf, clock, synthgroup, bbcutgroup, synthbus;
|
||||
|
||||
clock= ExternalClock(TempoClock(2.1));
|
||||
|
||||
synthgroup= Group.head(Node.basicNew(s,1));
|
||||
bbcutgroup= Group.after(synthgroup);
|
||||
|
||||
synthbus= Bus.audio(s,1);
|
||||
|
||||
Routine.run({
|
||||
|
||||
SynthDef(\sourcesound,{Out.ar(synthbus.index,Gendy1.ar(1,3,0.2,0.5,LFNoise1.kr(1,100,300),550,0.05,0.07))}).play(synthgroup);
|
||||
buf= BBCutBuffer.alloc(s,44100,1);
|
||||
|
||||
s.sync; //this forces a wait for the Buffer to be allocated
|
||||
|
||||
BBCut2(CutGroup(CutStream1(synthbus.index, buf, 0.75, 0.01, 0.5, -4),bbcutgroup), WarpCutProc1.new).play(clock);
|
||||
});
|
||||
|
||||
clock.play;
|
||||
)
|
||||
|
||||
//source on its own for comparison
|
||||
SynthDef(\sourcesound,{Out.ar(0,Gendy1.ar(1,3,0.2,0.5,LFNoise1.kr(1,100,300),550,0.05,0.07)*0.1)}).play;
|
||||
|
||||
|
||||
|
||||
//cutup of stereo sound- note use of stereo Bus and creation of stereo buffer, CutGroup last argument is numChannels
|
||||
(
|
||||
var buf, clock, synthgroup, bbcutgroup, synthbus;
|
||||
|
||||
clock= ExternalClock(TempoClock(2.1));
|
||||
|
||||
synthgroup= Group.head(Node.basicNew(s,1));
|
||||
bbcutgroup= Group.after(synthgroup);
|
||||
|
||||
synthbus= Bus.audio(s,2);
|
||||
|
||||
Routine.run({
|
||||
|
||||
SynthDef(\sourcesound,{Out.ar(synthbus.index,0.25*Gendy1.ar(1,3,0.2,0.5,LFNoise1.kr([1.1,1.3],100,300),[650,750],0.05,0.07))}).play(synthgroup);
|
||||
buf= BBCutBuffer.alloc(s,44100,2);
|
||||
|
||||
s.sync; //this forces a wait for the Buffer to be allocated
|
||||
|
||||
BBCut2(CutGroup(CutStream1(synthbus.index, buf, 0.75, 0.01, 0.5, -4),bbcutgroup,nil,2), WarpCutProc1.new).play(clock);
|
||||
});
|
||||
|
||||
clock.play;
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutStream1.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutStream1.schelp</a><br>link::Classes/CutStream1::<br>sc version: 3.8.0</div></div></body></html>
|
201
doc-schelp/Help-3.12.2/Classes/CutStream3.html
Normal file
|
@ -0,0 +1,201 @@
|
|||
<html><head><title>CutStream3</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>CutStream3</h1>
|
||||
<div id='summary'>BBCut2 with live input</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutStream3.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/cutsynths/CutStream3.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='#-database'>database</a> </li>
|
||||
<li class='toc3'><a href='#-deviationmult'>deviationmult</a> </li>
|
||||
<li class='toc3'><a href='#-free'>free</a> </li>
|
||||
<li class='toc3'><a href='#-initCutStream3'>initCutStream3</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='#-renderBlock'>renderBlock</a> </li>
|
||||
<li class='toc3'><a href='#-setup'>setup</a> </li>
|
||||
<li class='toc3'><a href='#-swing'>swing</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 stream of audio which can be cut-up, with offsetting relative to the last beat marked by the clock. The stream can be any bus on the Server, so might be a file streamed off disk, a current audio input or some synthesised data.
|
||||
<p>Each grain may have associated parameters for playback speed, enveloping and dutycycle (ratio of duration to inter-onset-interval).
|
||||
<p>Note that CutStream3 uses In.ar rather than InFeedback.ar, for reaction speed, so execution order is important. you cannot cut-up a stream created later in the execution order. Change the SynthDefs in the class file to InFeedback if you want no execution order worries, at the expense of an audio block's delay (usually 64 samples). <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'>aed</span>, <span class='argstr'>offset</span>, <span class='argstr'>swing</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'>aed<td class='argumentdesc'>
|
||||
<p>a running AnalyseEventsDatabase object, using the same ExternalClock as the cutter.<tr><td class='argumentname'>offset<td class='argumentdesc'>
|
||||
<p>value to offset from the last recorded beat of the clock. 0 keeps this reference point, 2 would be a reference start time of three beats ago (last recorded, then back another 2). The default is 1. However, the meaning of this parameter changes when setoffset is applied by certain cut procedures; here it determines the region of offsetting in beats. <tr><td class='argumentname'>swing<td class='argumentdesc'>
|
||||
<p>Number of beats of delay to apply for offbeat semiquavers, ie 0.0 is no swing, 0.08 is UK garage swing. For strict quantisation on-the-fly deviationmult must also be 0.0. <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>Manipulate playback speed, would usually be 1.0. <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. Rated as a proportion of the overall envelope (0.0 to 1.0) <tr><td class='argumentname'>rel<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='-database' href='./../Overviews/Methods.html#database'>database</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-database' href='./../Overviews/Methods.html#database'>database</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='-free' href='./../Overviews/Methods.html#free'>free</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initCutStream3' href='./../Overviews/Methods.html#initCutStream3'>initCutStream3</a> (<span class='argstr'>aed</span>, <span class='argstr'>off</span>, <span class='argstr'>sw</span>, <span class='argstr'>dm</span>, <span class='argstr'>pt</span>, <span class='argstr'>pstt</span>, <span class='argstr'>nb</span>, <span class='argstr'>pbs</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='-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='-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>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-swing' href='./../Overviews/Methods.html#swing'>swing</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-swing' href='./../Overviews/Methods.html#swing'>swing</a> = value</h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>s=Server.default;
|
||||
|
||||
c=ExternalClock(2.3).play;
|
||||
|
||||
e=AnalyseEventsDatabase.new;
|
||||
|
||||
e.analyse(clock:c);
|
||||
|
||||
//must be same clock
|
||||
a=BBCut2(CutStream3(e,1,0.0), ChooseCutProc(0.5,2)).play(c);
|
||||
|
||||
a.end;
|
||||
|
||||
e.stop;
|
||||
|
||||
c.stop;
|
||||
|
||||
|
||||
//sing along to the beat and have the events found in the audio stream in time, auto quantised
|
||||
(
|
||||
var b,buf,e, clock;
|
||||
|
||||
clock= ExternalClock(TempoClock(2.1));
|
||||
|
||||
clock.play;
|
||||
|
||||
e=AnalyseEventsDatabase.new;
|
||||
|
||||
e.analyse(clock:clock);
|
||||
|
||||
Routine.run({
|
||||
|
||||
b=BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
|
||||
|
||||
s.sync; //this forces a wait for the Buffer to be allocated
|
||||
|
||||
//3 beats into the past
|
||||
BBCut2(CutStream3(e,3,0.0,0.0, false, false), ChooseCutProc({[1.5,1.0].choose},2)).play(clock);
|
||||
|
||||
BBCut2(CutBuf1(b), BBCutProc11.new).play(clock);
|
||||
});
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
//beat induction and event capture on an existing track
|
||||
(
|
||||
var trackbus, trackgroup;
|
||||
|
||||
s.latency=0.05;
|
||||
|
||||
//clear any existing OSCresponder
|
||||
OSCresponder.all.do({arg val; if(val.cmdName=='/tr',{OSCresponder.remove(val)}); });
|
||||
|
||||
//run a line at a time
|
||||
~clock= ServerClock.new;
|
||||
|
||||
~clock.play(100,s); //will wait on trigID 100
|
||||
|
||||
~database=AnalyseEventsDatabase.new;
|
||||
|
||||
Routine.run({
|
||||
|
||||
//choose some file you want to track off your hard drive
|
||||
~source=Buffer.read(s,"/Volumes/data/stevebeattrack/samples/100.wav");
|
||||
|
||||
s.sync;
|
||||
|
||||
~trackbus=Bus.audio(s,1);
|
||||
|
||||
trackgroup= Group.before(Node.basicNew(s,1));
|
||||
|
||||
//run a beat tracker on the Server which sends the appropriate OSC message
|
||||
~tracksynth= SynthDef(\help_cutstream3,{arg vol=1.0, beepvol=0.0, lock=0;
|
||||
var trackb,trackh,trackq,tempo;
|
||||
var source, beep;
|
||||
|
||||
source= PlayBuf.ar(1,~source.bufnum,1.0,1,0,1);
|
||||
|
||||
//see AutoTrack help file
|
||||
#trackb,trackh,trackq,tempo=AutoTrack.kr(source, lock);
|
||||
|
||||
beep= SinOsc.ar(1000,0.0,Decay.kr(trackb,0.1));
|
||||
|
||||
Out.ar(~trackbus.index,source);
|
||||
|
||||
Out.ar(0,Pan2.ar((vol*source)+(beepvol*beep),0.0));
|
||||
|
||||
SendTrig.kr(trackb,100,tempo); //sends with ID of 100 matching what clock expects
|
||||
|
||||
}).play(trackgroup);
|
||||
|
||||
//creates at tail of trackgroup
|
||||
~database.analyse(~trackbus.index, 101, trackgroup, 0.34, ~clock); //trigID 101 is default
|
||||
|
||||
});
|
||||
|
||||
)
|
||||
|
||||
//default is add to head of group at Node 1 CutGroup
|
||||
a=BBCut2(CutStream3(~database, 4, 0.0, 0.0,false,false), ChooseCutProc(1,2)).play(~clock);
|
||||
|
||||
b=BBCut2(CutStream3(~database, 4, 0.0, 0.0,false,false), BBCutProc11.new).play(~clock);
|
||||
|
||||
c=BBCut2([CutMod1.new,CutRev1.new,CutStream3(~database, 4, 0.0, 0.0,false,false)], ChooseCutProc(0.5,4)).play(~clock);
|
||||
|
||||
~tracksynth.set(\vol,0.0);
|
||||
|
||||
~tracksynth.set(\beepvol,1.0);
|
||||
|
||||
~database.threshold_(0.1); //make it more event trigger happy
|
||||
|
||||
a.end;
|
||||
b.end;
|
||||
c.end;
|
||||
|
||||
~clock.stop;
|
||||
~database.stop;</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutStream3.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/CutStream3.schelp</a><br>link::Classes/CutStream3::<br>sc version: 3.8.0</div></div></body></html>
|
66
doc-schelp/Help-3.12.2/Classes/DFM1.html
Normal file
|
@ -0,0 +1,66 @@
|
|||
<!doctype html><html lang='en'><head><title>DFM1 | SuperCollider 3.10.0 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 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 = 'DFM1';
|
||||
var scdoc_sc_version = '3.10.0';
|
||||
</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'>DFM1:</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> > <a href='./../Browse.html#UGens>Filters'>Filters</a></span>
|
||||
</div><h1>DFM1<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'>Digitally modelled analog filter</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/TJUGens/TJUGens.sc' title='/Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/TJUGens/TJUGens.sc'>TJUGens.sc</a></div></div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>DFM1 is a digitally modelled analog filter.<a class='footnote anchor' name='footnote_org_1' href='#footnote_1'><sup>1</sup></a> It provides low-pass and high-pass filtering. The filter can be overdriven and will self-oscillate at high resonances.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>DFM1.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in</span>, <span class='argstr'>freq: 1000.0</span>, <span class='argstr'>res: 0.1</span>, <span class='argstr'>inputgain: 1.0</span>, <span class='argstr'>type: 0.0</span>, <span class='argstr'>noiselevel: 0.0003</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>in<td class='argumentdesc'>
|
||||
<p>input signal<tr><td class='argumentname'>freq<td class='argumentdesc'>
|
||||
<p>cutoff frequency<tr><td class='argumentname'>res<td class='argumentdesc'>
|
||||
<p>resonance<tr><td class='argumentname'>inputgain<td class='argumentdesc'>
|
||||
<p>gain applied to the input signal<tr><td class='argumentname'>type<td class='argumentdesc'>
|
||||
<p>set to 0.0 for low-pass or 1.0 for high-pass<tr><td class='argumentname'>noiselevel<td class='argumentdesc'>
|
||||
<p>amplitude of noise added to the model</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'>// Play it with the mouse
|
||||
{DFM1.ar(PinkNoise.ar(mul: 0.5), MouseX.kr(80, 5000, 'exponential'), MouseY.kr(0.1, 1.2))}.play;
|
||||
|
||||
// Throbby bass
|
||||
{DFM1.ar(Pulse.ar(100, mul:0.4) + Pulse.ar(100.1, mul:0.4), SinOsc.kr(SinOsc.kr(0.3).range(0.2, 5)).range(80, 2000), 1.1, inputgain: 2.0, mul:0.7)!2}.play;</textarea>
|
||||
<div class='footnotes'>
|
||||
<a class='anchor' name='footnote_1'/><div class='footnote'>[<a href='#footnote_org_1'>1</a>] - For questions related to the audio code in DFM1 please contact Tony Hardie-Bick <tony@entitysynth.net>
|
||||
<p>For questions regarding the function of DFM1 within SuperCollider contact Jonny Stutters <jstutters@jeremah.co.uk></div></div><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/TJUGens/HelpSource/Classes/DFM1.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/TJUGens/HelpSource/Classes/DFM1.schelp</a><br>link::Classes/DFM1::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
150
doc-schelp/Help-3.12.2/Classes/Date.html
Normal file
|
@ -0,0 +1,150 @@
|
|||
<!doctype html><html lang='en'><head><title>Date | 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 = 'Date';
|
||||
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'>Date:</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='toc3'><a href='#*getDate'>getDate</a> </li>
|
||||
<li class='toc3'><a href='#*localtime'>localtime</a> </li>
|
||||
<li class='toc3'><a href='#*gmtime'>gmtime</a> </li>
|
||||
<li class='toc3'><a href='#*seed'>seed</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='#*fromRawSeconds'>fromRawSeconds</a> </li>
|
||||
<li class='toc3'><a href='#*fromSMPTE'>fromSMPTE</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-localtime'>localtime</a> </li>
|
||||
<li class='toc3'><a href='#-gmtime'>gmtime</a> </li>
|
||||
<li class='toc3'><a href='#-dayStamp'>dayStamp</a> </li>
|
||||
<li class='toc3'><a href='#-hourStamp'>hourStamp</a> </li>
|
||||
<li class='toc3'><a href='#-secStamp'>secStamp</a> </li>
|
||||
<li class='toc3'><a href='#-stamp'>stamp</a> </li>
|
||||
<li class='toc3'><a href='#-asSortableString'>asSortableString</a> </li>
|
||||
<li class='toc3'><a href='#-asctime'>asctime</a> </li>
|
||||
<li class='toc3'><a href='#-asString'>asString</a> </li>
|
||||
<li class='toc3'><a href='#-format'>format</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='#-asSMPTE'>asSMPTE</a> </li>
|
||||
<li class='toc3'><a href='#-day'>day</a> </li>
|
||||
<li class='toc3'><a href='#-dayOfWeek'>dayOfWeek</a> </li>
|
||||
<li class='toc3'><a href='#-hour'>hour</a> </li>
|
||||
<li class='toc3'><a href='#-minute'>minute</a> </li>
|
||||
<li class='toc3'><a href='#-month'>month</a> </li>
|
||||
<li class='toc3'><a href='#-rawSeconds'>rawSeconds</a> </li>
|
||||
<li class='toc3'><a href='#-schedBundle'>schedBundle</a> </li>
|
||||
<li class='toc3'><a href='#-second'>second</a> </li>
|
||||
<li class='toc3'><a href='#-year'>year</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#Control'>Control</a></span>
|
||||
</div><h1>Date<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>an object describing a point in time</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Math/Date.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Math/Date.sc'>Date.sc</a></div></div>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Date.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>year</span>, <span class='argstr'>month</span>, <span class='argstr'>day</span>, <span class='argstr'>hour</span>, <span class='argstr'>minute</span>, <span class='argstr'>second</span>, <span class='argstr'>dayOfWeek</span>, <span class='argstr'>rawSeconds</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Create a new date with the given properties (all numerical values). These arguments are also the names of instance variables of the date object.</div><h3 class='method-code'><span class='method-prefix'>Date.</span><a class='method-name' name='*getDate' href='./../Overviews/Methods.html#getDate'>getDate</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get current date from system and create a date object from it.<textarea class='editor'>(
|
||||
var a = Date.getDate;
|
||||
a.rawSeconds.postln;
|
||||
a.dayOfWeek.postln;
|
||||
a
|
||||
)</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Date.</span><a class='method-name' name='*localtime' href='./../Overviews/Methods.html#localtime'>localtime</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get current localized time from system and create a date object from it.</div><h3 class='method-code'><span class='method-prefix'>Date.</span><a class='method-name' name='*gmtime' href='./../Overviews/Methods.html#gmtime'>gmtime</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get current <strong>Greenwich Mean Time (GMT)</strong> from system and create a date object from it.</div><h3 class='method-code'><span class='method-prefix'>Date.</span><a class='method-name' name='*seed' href='./../Overviews/Methods.html#seed'>seed</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get current date and return a value suitable for seeding a random number generator. See also <a href="./../Reference/randomSeed.html">randomSeed</a>.<textarea class='editor'>(
|
||||
var a = Date.seed;
|
||||
thisThread.randSeed = a;
|
||||
20.do { [1,0].choose.post }; "".postln;
|
||||
thisThread.randSeed = a;
|
||||
25.do { [1,0].choose.post }; "".postln;
|
||||
)</textarea>
|
||||
</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'>Date.</span><a class='method-name' name='*fromRawSeconds' href='./../Overviews/Methods.html#fromRawSeconds'>fromRawSeconds</a>(<span class='argstr'>rawSeconds: 0</span>, <span class='argstr'>daylightSavings: 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/SMPTE/extDate-fromSMPTE.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/SMPTE/extDate-fromSMPTE.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>Date.</span><a class='method-name' name='*fromSMPTE' href='./../Overviews/Methods.html#fromSMPTE'>fromSMPTE</a>(<span class='argstr'>smpte</span>, <span class='argstr'>daylightSavings: 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/SMPTE/extDate-fromSMPTE.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/SMPTE/extDate-fromSMPTE.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='-localtime' href='./../Overviews/Methods.html#localtime'>localtime</a></h3>
|
||||
<div class='method'>
|
||||
<p>Set the receiver's time to current localtime.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-gmtime' href='./../Overviews/Methods.html#gmtime'>gmtime</a></h3>
|
||||
<div class='method'>
|
||||
<p>Set the receiver's time to current <strong>Greenwich Mean Time (GMT)</strong>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dayStamp' href='./../Overviews/Methods.html#dayStamp'>dayStamp</a></h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a string with the year, month and day in the format <strong>YYMMDD</strong>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hourStamp' href='./../Overviews/Methods.html#hourStamp'>hourStamp</a></h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a string in the format <strong>H:M:S</strong>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-secStamp' href='./../Overviews/Methods.html#secStamp'>secStamp</a></h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a string with the seconds.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-stamp' href='./../Overviews/Methods.html#stamp'>stamp</a></h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a string in the format <strong>YYMMDD_HHMMSS</strong>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asSortableString' href='./../Overviews/Methods.html#asSortableString'>asSortableString</a></h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a string in an alphabetically sortable standard database format.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asctime' href='./../Overviews/Methods.html#asctime'>asctime</a></h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a string in the format WeekdayName MonthName Time Year.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asString' href='./../Overviews/Methods.html#asString'>asString</a></h3>
|
||||
<div class='method'>
|
||||
<p>Returns asctime.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-format' href='./../Overviews/Methods.html#format'>format</a>(<span class='argstr'>format</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Obtain a date string with a given format. The character % is replaced by the appropriate value, which is derived from the letter that follows.<textarea class='editor'>Date.getDate.format("Today is %A. It is around %I o'clock (%p), in %B.");
|
||||
Date.getDate.format("%d/%m/%Y %H:%M"); // DD/MM/YYYY hh:mm</textarea>
|
||||
<h4>Discussion:</h4>
|
||||
|
||||
<p>A list of formats can be found here: <a href="http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html">http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html</a><dl>
|
||||
<dt>%a<dd>Replaced by the locale's abbreviated weekday name. [ tm_wday]<dt>%A<dd>Replaced by the locale's full weekday name. [ tm_wday]<dt>%b<dd>Replaced by the locale's abbreviated month name. [ tm_mon]<dt>%B<dd>Replaced by the locale's full month name. [ tm_mon]<dt>%c<dd>Replaced by the locale's appropriate date and time representation.<dt>%C<dd>Replaced by the year divided by 100 and truncated to an integer, as a decimal number [00,99]. [ tm_year]<dt>%d<dd>Replaced by the day of the month as a decimal number [01,31]. [ tm_mday]<dt>%D<dd>Equivalent to %m / %d / %y. [ tm_mon, tm_mday, tm_year]<dt>%e<dd>Replaced by the day of the month as a decimal number [1,31]; a single digit is preceded by a space. [ tm_mday]<dt>%F<dd>Equivalent to %Y - %m - %d (the ISO 8601:2000 standard date format). [ tm_year, tm_mon, tm_mday]<dt>%g<dd>Replaced by the last 2 digits of the week-based year (see below) as a decimal number [00,99]. [ tm_year, tm_wday, tm_yday]<dt>%G<dd>Replaced by the week-based year (see below) as a decimal number (for example, 1977). [ tm_year, tm_wday, tm_yday]<dt>%h<dd>Equivalent to %b. [ tm_mon]<dt>%H<dd>Replaced by the hour (24-hour clock) as a decimal number [00,23]. [ tm_hour]<dt>%I<dd>Replaced by the hour (12-hour clock) as a decimal number [01,12]. [ tm_hour]<dt>%j<dd>Replaced by the day of the year as a decimal number [001,366]. [ tm_yday]<dt>%m<dd>Replaced by the month as a decimal number [01,12]. [ tm_mon]<dt>%M<dd>Replaced by the minute as a decimal number [00,59]. [ tm_min]<dt>%n<dd>Replaced by a <newline>.<dt>%p<dd>Replaced by the locale's equivalent of either a.m. or p.m. [ tm_hour]<dt>%r<dd>Replaced by the time in a.m. and p.m. notation; in the POSIX locale this shall be equivalent to %I :%M :%S%p. [ tm_hour, tm_min, tm_sec]<dt>%R<dd>Replaced by the time in 24-hour notation (%H : %M ). [ tm_hour, tm_min]<dt>%S<dd>Replaced by the second as a decimal number [00,60]. [ tm_sec]<dt>%t<dd>Replaced by a <tab>.<dt>%T<dd>Replaced by the time ( %H : %M : %S ). [ tm_hour, tm_min, tm_sec]<dt>%u<dd>Replaced by the weekday as a decimal number [1,7], with 1 representing Monday. [ tm_wday]<dt>%U<dd>Replaced by the week number of the year as a decimal number [00,53]. The first Sunday of January is the first day of week 1; days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]<dt>%V<dd>Replaced by the week number of the year (Monday as the first day of the week) as a decimal number [01,53]. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday]<dt>%w<dd>Replaced by the weekday as a decimal number [0,6], with 0 representing Sunday. [ tm_wday]<dt>%W<dd>Replaced by the week number of the year as a decimal number [00,53]. The first Monday of January is the first day of week 1; days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]<dt>%x<dd>Replaced by the locale's appropriate date representation.<dt>%X<dd>Replaced by the locale's appropriate time representation.<dt>%y<dd>Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year]<dt>%Y<dd>Replaced by the year as a decimal number (for example, 1997). [ tm_year]<dt>%z<dd>Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ), or by no characters if no timezone is determinable. For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich). If tm_isdst is zero, the standard time offset is used. If tm_isdst is greater than zero, the daylight savings time offset is used. If tm_isdst is negative, no characters are returned. [ tm_isdst]<dt>%Z<dd>Replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. [ tm_isdst]<dt>%%<dd>Replaced by %.</dl>
|
||||
|
||||
<p>If a conversion specification does not correspond to any of the above, the behavior is undefined.</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='-asSMPTE' href='./../Overviews/Methods.html#asSMPTE'>asSMPTE</a>(<span class='argstr'>fps</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/SMPTE/extDate-fromSMPTE.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/SMPTE/extDate-fromSMPTE.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-day' href='./../Overviews/Methods.html#day'>day</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-day' href='./../Overviews/Methods.html#day'>day</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dayOfWeek' href='./../Overviews/Methods.html#dayOfWeek'>dayOfWeek</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dayOfWeek' href='./../Overviews/Methods.html#dayOfWeek'>dayOfWeek</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hour' href='./../Overviews/Methods.html#hour'>hour</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hour' href='./../Overviews/Methods.html#hour'>hour</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-minute' href='./../Overviews/Methods.html#minute'>minute</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-minute' href='./../Overviews/Methods.html#minute'>minute</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-month' href='./../Overviews/Methods.html#month'>month</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-month' href='./../Overviews/Methods.html#month'>month</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-rawSeconds' href='./../Overviews/Methods.html#rawSeconds'>rawSeconds</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-rawSeconds' href='./../Overviews/Methods.html#rawSeconds'>rawSeconds</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-schedBundle' href='./../Overviews/Methods.html#schedBundle'>schedBundle</a>(<span class='argstr'>bundle</span>, <span class='argstr'>server</span>, <span class='argstr'>timeOfRequest</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/schedBundle.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/schedBundle.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-second' href='./../Overviews/Methods.html#second'>second</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-second' href='./../Overviews/Methods.html#second'>second</a> = value</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-year' href='./../Overviews/Methods.html#year'>year</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-year' href='./../Overviews/Methods.html#year'>year</a> = value</h3>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Date.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Date.schelp</a><br>link::Classes/Date::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
69
doc-schelp/Help-3.12.2/Classes/Delay1.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
<!doctype html><html lang='en'><head><title>Delay1 | 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 = 'Delay1';
|
||||
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'>Delay1:</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> > <a href='./../Browse.html#UGens>Delays'>Delays</a></span>
|
||||
</div><h1>Delay1<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'>Single sample delay.</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/Delay2.html">Delay2</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/Delay2.html">Delay2</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Delays the input by 1 audio frame or control period.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Delay1.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in: 0.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Delay1.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>in: 0.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'>in<td class='argumentdesc'>
|
||||
<p>Input signal.<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><h4>Discussion:</h4>
|
||||
|
||||
<p>For audio-rate signals the delay is 1 audio frame, and for control-rate signals the delay is 1 control period.</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'>(
|
||||
plot({
|
||||
var z;
|
||||
z = Dust.ar(1000);
|
||||
[z, z - Delay1.ar(z)] // [ original, subtract delayed from original ]
|
||||
}))</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Delay1.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Delay1.schelp</a><br>link::Classes/Delay1::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
133
doc-schelp/Help-3.12.2/Classes/DiskIn.html
Normal file
|
@ -0,0 +1,133 @@
|
|||
<!doctype html><html lang='en'><head><title>DiskIn | 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 = 'DiskIn';
|
||||
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'>DiskIn:</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'><li class='toc2'><a href='#Normal%20usage%20(with%20Buffer;%20"Object%20Style")'>Normal usage (with Buffer; "Object Style")</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#OSC%20Messaging%20Style'>OSC Messaging Style</a></li>
|
||||
<ul class='toc'></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#UGens'>UGens</a> > <a href='./../Browse.html#UGens>InOut'>InOut</a> | <a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Buffer'>Buffer</a></span>
|
||||
</div><h1>DiskIn<span id='superclasses'> : <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></span>
|
||||
</h1>
|
||||
<div id='summary'>Stream in audio from a file.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/DiskIO.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/DiskIO.sc'>DiskIO.sc</a></div><div id='related'>See also: <a href="./../Classes/PlayBuf.html">PlayBuf</a>, <a href="./../Classes/DiskOut.html">DiskOut</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Continuously play a longer soundfile from disk. This requires a buffer to be preloaded with one buffer size of sound.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>DiskIn.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>numChannels</span>, <span class='argstr'>bufnum</span>, <span class='argstr'>loop: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
|
||||
<p>Number of channels. This must match the number of channels in the buffer.<tr><td class='argumentname'>bufnum<td class='argumentdesc'>
|
||||
<p>Buffer number<div class='note'><span class='notelabel'>NOTE:</span> The Buffer's numFrames must be a power of two and is recommended to be at least 65536 -- preferably 131072 or 262144. Smaller buffer sizes mean more frequent disk access, which can cause glitches.</div><tr><td class='argumentname'>loop<td class='argumentdesc'>
|
||||
<p>If set to 1, the soundfile will loop.<div class='note'><span class='notelabel'>NOTE:</span> If the buffer has a larger number of frames than the sound file there will be a noticeable gap between the first and the following loop iterations. In that case chose a smaller buffer size or use <a href="./../Classes/PlayBuf.html">PlayBuf</a> instead</div></table><h4>Discussion:</h4>
|
||||
|
||||
<p>This UGen will set the <a href="./../Classes/Done.html">'done' flag</a> when finished playing.</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'>s.boot; // start the server
|
||||
|
||||
// examples below will use this synthdef
|
||||
(
|
||||
SynthDef("help-Diskin", { |out, bufnum = 0|
|
||||
Out.ar(out, DiskIn.ar(1, bufnum));
|
||||
}).add
|
||||
)</pre>
|
||||
<h3><a class='anchor' name='Normal%20usage%20(with%20Buffer;%20"Object%20Style")'>Normal usage (with Buffer; "Object Style")</a></h3>
|
||||
<pre class='code prettyprint lang-sc'>b = Buffer.cueSoundFile(s, Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0, 1);
|
||||
|
||||
x = { DiskIn.ar(1, b.bufnum) }.play;
|
||||
|
||||
b.close;
|
||||
|
||||
// again
|
||||
// note the like named instance method, but different arguments
|
||||
b.cueSoundFile(Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0);
|
||||
|
||||
x.free; b.close; b.free;
|
||||
|
||||
|
||||
|
||||
// loop it (for better looping use PlayBuf!)
|
||||
(
|
||||
p = Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff";
|
||||
a = SoundFile.new;
|
||||
a.openRead(p);
|
||||
d = a.numFrames/s.sampleRate; // get the duration
|
||||
a.close; // don't forget
|
||||
b = Buffer.cueSoundFile(s, p, 0, 1);
|
||||
f = { DiskIn.ar(1, b.bufnum) };
|
||||
x = f.play;
|
||||
r = Routine({
|
||||
loop({ d.wait; x.free; x = f.play; b.close( b.cueSoundFileMsg(p, 0)) });
|
||||
}).play; )
|
||||
r.stop; x.free; b.close; b.free; // you need to do all these to properly cleanup
|
||||
|
||||
|
||||
|
||||
// cue and play right away
|
||||
(
|
||||
SynthDef("help-Diskin", { |out, bufnum = 0|
|
||||
Out.ar(out, DiskIn.ar(1, bufnum));
|
||||
}).add;
|
||||
)
|
||||
|
||||
(
|
||||
x = Synth.basicNew("help-Diskin");
|
||||
m = { arg buf; x.addToHeadMsg(nil, [\bufnum, buf.bufnum])};
|
||||
|
||||
b = Buffer.cueSoundFile(s,Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0, 1, completionMessage: m);
|
||||
|
||||
)</pre>
|
||||
<h3><a class='anchor' name='OSC%20Messaging%20Style'>OSC Messaging Style</a></h3>
|
||||
<pre class='code prettyprint lang-sc'>// allocate a disk i/o buffer
|
||||
s.sendMsg("/b_alloc", 0, 65536, 1);
|
||||
|
||||
// open an input file for this buffer, leave it open
|
||||
s.sendMsg("/b_read", 0, Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0, 65536, 0, 1);
|
||||
|
||||
// create a diskin node
|
||||
s.sendMsg("/s_new", "help-Diskin", x = s.nextNodeID, 1, 1);
|
||||
|
||||
s.sendMsg("/b_close", 0); // close the file (very important!)
|
||||
|
||||
|
||||
// again
|
||||
// don't need to reallocate and Synth is still reading
|
||||
s.sendMsg("/b_read", 0, Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0, 0, 0, 1);
|
||||
|
||||
s.sendMsg("/n_free", x); // stop reading
|
||||
|
||||
s.sendMsg("/b_close", 0); // close the file.
|
||||
|
||||
s.sendMsg("/b_free", 0); // frees the buffer</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/DiskIn.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/DiskIn.schelp</a><br>link::Classes/DiskIn::<br></div></div></body></html>
|
118
doc-schelp/Help-3.12.2/Classes/Done.html
Normal file
|
@ -0,0 +1,118 @@
|
|||
<!doctype html><html lang='en'><head><title>Done | 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 = 'Done';
|
||||
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'>Done:</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='#*kr'>kr</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='#*freeAllInGroup'>freeAllInGroup</a> </li>
|
||||
<li class='toc3'><a href='#*freeGroup'>freeGroup</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelf'>freeSelf</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfAndDeepFreeNext'>freeSelfAndDeepFreeNext</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfAndDeepFreePrev'>freeSelfAndDeepFreePrev</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfAndFreeAllInNext'>freeSelfAndFreeAllInNext</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfAndFreeAllInPrev'>freeSelfAndFreeAllInPrev</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfAndNext'>freeSelfAndNext</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfAndPrev'>freeSelfAndPrev</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfPauseNext'>freeSelfPauseNext</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfPausePrev'>freeSelfPausePrev</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfToHead'>freeSelfToHead</a> </li>
|
||||
<li class='toc3'><a href='#*freeSelfToTail'>freeSelfToTail</a> </li>
|
||||
<li class='toc3'><a href='#*none'>none</a> </li>
|
||||
<li class='toc3'><a href='#*pauseSelf'>pauseSelf</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><li class='toc1'><a href='#Actions'>Actions</a></li>
|
||||
<ul class='toc'></ul><li class='toc1'><a href='#Alternatives'>Alternatives</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> > <a href='./../Browse.html#UGens>Synth control'>Synth control</a> | <a href='./../Browse.html#Server'>Server</a> > <a href='./../Browse.html#Server>Nodes'>Nodes</a></span>
|
||||
</div><h1>Done<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'>Monitors another UGen to see when it is finished</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/EnvGen.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/EnvGen.sc'>EnvGen.sc</a></div><div id='related'>See also: <a href="./../Classes/UGen.html">UGen</a>, <a href="./../Classes/FreeSelfWhenDone.html">FreeSelfWhenDone</a>, <a href="./../Classes/PauseSelfWhenDone.html">PauseSelfWhenDone</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Some UGens set a 'done' flag when they are finished playing. This UGen echoes that flag when it is set to track a particular UGen.
|
||||
<p>The UGens trackable by Done are:<ul>
|
||||
<li><a href="./../Classes/PlayBuf.html">PlayBuf</a><li><a href="./../Classes/RecordBuf.html">RecordBuf</a><li><a href="./../Classes/Line.html">Line</a><li><a href="./../Classes/XLine.html">XLine</a><li><a href="./../Classes/EnvGen.html">EnvGen</a><li><a href="./../Classes/Linen.html">Linen</a><li><a href="./../Classes/BufRd.html">BufRd</a><li><a href="./../Classes/BufWr.html">BufWr</a><li><a href="./../Classes/Dbufrd.html">Dbufrd</a><li><a href="./../Classes/Dbufwr.html">Dbufwr</a><li><a href="./../Classes/DiskIn.html">DiskIn</a><li><a href="./../Classes/VDiskIn.html">VDiskIn</a><li><a href="./../Classes/Demand.html">Demand</a></ul>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>src</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>src<td class='argumentdesc'>
|
||||
<p>The UGen to monitor</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'>Done.</span><a class='method-name' name='*freeAllInGroup' href='./../Overviews/Methods.html#freeAllInGroup'>freeAllInGroup</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeGroup' href='./../Overviews/Methods.html#freeGroup'>freeGroup</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelf' href='./../Overviews/Methods.html#freeSelf'>freeSelf</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfAndDeepFreeNext' href='./../Overviews/Methods.html#freeSelfAndDeepFreeNext'>freeSelfAndDeepFreeNext</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfAndDeepFreePrev' href='./../Overviews/Methods.html#freeSelfAndDeepFreePrev'>freeSelfAndDeepFreePrev</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfAndFreeAllInNext' href='./../Overviews/Methods.html#freeSelfAndFreeAllInNext'>freeSelfAndFreeAllInNext</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfAndFreeAllInPrev' href='./../Overviews/Methods.html#freeSelfAndFreeAllInPrev'>freeSelfAndFreeAllInPrev</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfAndNext' href='./../Overviews/Methods.html#freeSelfAndNext'>freeSelfAndNext</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfAndPrev' href='./../Overviews/Methods.html#freeSelfAndPrev'>freeSelfAndPrev</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfPauseNext' href='./../Overviews/Methods.html#freeSelfPauseNext'>freeSelfPauseNext</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfPausePrev' href='./../Overviews/Methods.html#freeSelfPausePrev'>freeSelfPausePrev</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfToHead' href='./../Overviews/Methods.html#freeSelfToHead'>freeSelfToHead</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*freeSelfToTail' href='./../Overviews/Methods.html#freeSelfToTail'>freeSelfToTail</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*none' href='./../Overviews/Methods.html#none'>none</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Done.</span><a class='method-name' name='*pauseSelf' href='./../Overviews/Methods.html#pauseSelf'>pauseSelf</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>
|
||||
|
||||
<p>The 'done' flag can be used to trigger other things in the same synth:<pre class='code prettyprint lang-sc'>(
|
||||
SynthDef("Done-help", { arg out, t_trig;
|
||||
var line, a, b;
|
||||
|
||||
line= Line.kr(1,0,1);
|
||||
|
||||
a= SinOsc.ar(440,0,0.1*line); //sound fading out
|
||||
b= WhiteNoise.ar(Done.kr(line)*0.1); //noise starts at end of line
|
||||
|
||||
Out.ar(out, Pan2.ar(a+b));
|
||||
}).add;
|
||||
)
|
||||
|
||||
Synth("Done-help"); //note that this synth doesn't have it's own doneAction, so you'll need to manually deallocate it</pre>
|
||||
|
||||
<p>The 'done' flag can be used to trigger a delayed freeing of the current synth, which is not possible by using doneActions alone:<pre class='code prettyprint lang-sc'>play {
|
||||
var env = Line.kr(1,0,2);
|
||||
var sig = PinkNoise.ar(env);
|
||||
FreeSelf.kr(TDelay.kr(Done.kr(env),3));
|
||||
GVerb.ar(sig,70,7);
|
||||
}</pre>
|
||||
|
||||
<p><h2><a class='anchor' name='Actions'>Actions</a></h2>
|
||||
|
||||
<p>A number of UGens implement doneActions. These allow one to optionally free or pause the enclosing synth and other related nodes when the UGen is finished. You can use the constants in this class to name doneActions, which can be clearer than using the number codes alone. The available doneActions are as follows:<table>
|
||||
<tr><td>name<td>value<td>description<tr><td>none<td>0<td>do nothing when the UGen is finished<tr><td>pauseSelf<td>1<td>pause the enclosing synth, but do not free it<tr><td>freeSelf<td>2<td>free the enclosing synth<tr><td>freeSelfAndPrev<td>3<td>free both this synth and the preceding node<tr><td>freeSelfAndNext<td>4<td>free both this synth and the following node<tr><td>freeSelfAndFreeAllInPrev<td>5<td>free this synth; if the preceding node is a group then do g_freeAll on it, else free it<tr><td>freeSelfAndFreeAllInNext<td>6<td>free this synth; if the following node is a group then do g_freeAll on it, else free it<tr><td>freeSelfToHead<td>7<td>free this synth and all preceding nodes in this group<tr><td>freeSelfToTail<td>8<td>free this synth and all following nodes in this group<tr><td>freeSelfPausePrev<td>9<td>free this synth and pause the preceding node<tr><td>freeSelfPauseNext<td>10<td>free this synth and pause the following node<tr><td>freeSelfAndDeepFreePrev<td>11<td>free this synth and if the preceding node is a group then do g_deepFree on it, else free it<tr><td>freeSelfAndDeepFreeNext<td>12<td>free this synth and if the following node is a group then do g_deepFree on it, else free it<tr><td>freeAllInGroup<td>13<td>free this synth and all other nodes in this group (before and after)<tr><td>freeGroup<td>14<td>free the enclosing group and all nodes within it (including this synth)</table>
|
||||
|
||||
<p>For information on <code class='code prettyprint lang-sc'>freeAll</code> and <code class='code prettyprint lang-sc'>deepFree</code>, see <a href="./../Classes/Group.html">Group</a> and <a href="./../Reference/Server-Command-Reference.html">Server Command Reference</a>.<h2><a class='anchor' name='Alternatives'>Alternatives</a></h2>
|
||||
|
||||
<p>Another way to free a synth when some UGen is done playing is to use <a href="./../Classes/FreeSelfWhenDone.html">FreeSelfWhenDone</a>, or <a href="./../Classes/FreeSelf.html">FreeSelf</a> in combination with <a href="./../Classes/Done.html">Done</a>. For example, this can be used to delay the freeing to let reverb tails fade out, etc.<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Done.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Done.schelp</a><br>link::Classes/Done::<br></div></div></body></html>
|
114
doc-schelp/Help-3.12.2/Classes/DynKlank.html
Normal file
|
@ -0,0 +1,114 @@
|
|||
<!doctype html><html lang='en'><head><title>DynKlank | 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 = 'DynKlank';
|
||||
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'>DynKlank:</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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a> | <a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Filters'>Filters</a> > <a href='./../Browse.html#UGens>Filters>Linear'>Linear</a></span>
|
||||
</div><h1>DynKlank<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'>Bank of resonators.</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/Klang.html">Klang</a>, <a href="./../Classes/Klank.html">Klank</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>DynKlank is a bank of frequency resonators which can be used to simulate the resonant modes of an object. Each mode is given a ring time, which is the time for the mode to decay by 60 dB.
|
||||
<p>Unlike <a href="./../Classes/Klank.html">Klank</a>, all parameters in DynKlank can be changed in real-time after it has been started.<div class='note'><span class='notelabel'>NOTE:</span> The amplitude of the resulting signal depends on the server's sample rate. See <a href="./../Classes/Ringz.html#Interaction%20with%20sample%20rate">Ringz: Interaction with sample rate</a> for details.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>DynKlank.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>specificationsArrayRef</span>, <span class='argstr'>input</span>, <span class='argstr'>freqscale: 1</span>, <span class='argstr'>freqoffset: 0</span>, <span class='argstr'>decayscale: 1</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>DynKlank.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>specificationsArrayRef</span>, <span class='argstr'>input</span>, <span class='argstr'>freqscale: 1</span>, <span class='argstr'>freqoffset: 0</span>, <span class='argstr'>decayscale: 1</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>specificationsArrayRef<td class='argumentdesc'>
|
||||
<p>A Ref to an Array of three Arrays: <code class='code prettyprint lang-sc'>[frequencies, amplitudes, ringtimes]</code><dl>
|
||||
<dt>frequencies:<dd>An Array of filter frequencies.<dt>amplitudes:<dd>An Array of filter amplitudes, or nil. If nil, then amplitudes default to 1.0.<dt>ring times:<dd>An Array of 60 dB decay times for the filters.</dl>
|
||||
|
||||
<p>All subarrays, if not nil, should have the same length.<tr><td class='argumentname'>input<td class='argumentdesc'>
|
||||
<p>The excitation input to the resonant filter bank.<tr><td class='argumentname'>freqscale<td class='argumentdesc'>
|
||||
<p>A scale factor multiplied by all frequencies at initialization time.<tr><td class='argumentname'>freqoffset<td class='argumentdesc'>
|
||||
<p>An offset added to all frequencies at initialization time.<tr><td class='argumentname'>decayscale<td class='argumentdesc'>
|
||||
<p>A scale factor multiplied by all ring times at initialization time.</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>Four resonators each at maximum amplitude of 1.0 and ring times of 1 second, different exciters and no scaling:<div class='note'><span class='notelabel'>NOTE:</span> Watch the ` before the opening bracket of the parameter array! Also see <a href="./../Guides/Multichannel-Expansion.html">Multichannel Expansion</a></div>
|
||||
<p><pre class='code prettyprint lang-sc'>{ DynKlank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;
|
||||
|
||||
{ DynKlank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], Dust.ar(8, 0.1)) }.play;
|
||||
|
||||
{ DynKlank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], PinkNoise.ar(0.007)) }.play;
|
||||
|
||||
{ DynKlank.ar(`[[200, 671, 1153, 1723], nil, [1, 1, 1, 1]], PinkNoise.ar([0.007, 0.007])) }.play;</pre>
|
||||
|
||||
<p>Changing parameters in realtime:<pre class='code prettyprint lang-sc'>(
|
||||
// change freqs and ringtimes with mouse
|
||||
{ var freqs, ringtimes;
|
||||
freqs = [800, 1071, 1153, 1723] * MouseX.kr(0.5, 2, 1);
|
||||
ringtimes = [1, 1, 1, 1] * MouseY.kr(0.1, 10, 1);
|
||||
DynKlank.ar(`[freqs, nil, ringtimes ], Impulse.ar(2, 0, 0.1))
|
||||
}.play;
|
||||
)
|
||||
|
||||
(
|
||||
// set them from outside later:
|
||||
SynthDef('help-dynKlank', { |out|
|
||||
var freqs, ringtimes, signal;
|
||||
freqs = Control.names([\freqs]).kr([800, 1071, 1153, 1723]);
|
||||
ringtimes = Control.names([\ringtimes]).kr([1, 1, 1, 1]);
|
||||
signal = DynKlank.ar(`[freqs, nil, ringtimes ], Impulse.ar(2, 0, 0.1));
|
||||
Out.ar(out, signal);
|
||||
}).add;
|
||||
)
|
||||
|
||||
a = Synth('help-dynKlank');
|
||||
|
||||
a.setn(\freqs, Array.rand(4, 500, 2000));
|
||||
a.setn(\ringtimes, Array.rand(4, 0.2, 4) );
|
||||
a.setn(\ringtimes, Array.rand(4, 0.02, 0.4) );
|
||||
|
||||
// create multichannel controls directly with literal arrays:
|
||||
(
|
||||
SynthDef('help-dynKlank', { |out,
|
||||
freqs (#[100, 200, 300, 400]),
|
||||
amps (#[1, 0.3, 0.2, 0.05]),
|
||||
rings (#[1, 1, 1, 2])|
|
||||
|
||||
Out.ar(out, DynKlank.ar(`[freqs, amps, rings], WhiteNoise.ar * 0.001))
|
||||
}).add
|
||||
)
|
||||
|
||||
a = Synth('help-dynKlank');
|
||||
|
||||
a.setn(\freqs, Array.rand(4, 500, 2000));
|
||||
a.setn(\amps, Array.exprand(4, 0.01, 1));
|
||||
|
||||
{ Out.kr(102, MouseX.kr(1, 2) * Array.rand(4, 500, 2000)) }.play;
|
||||
a.mapn(\freqs, 102, 4);</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/DynKlank.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/DynKlank.schelp</a><br>link::Classes/DynKlank::<br></div></div></body></html>
|
150
doc-schelp/Help-3.12.2/Classes/EZGui.html
Normal file
|
@ -0,0 +1,150 @@
|
|||
<html><head><title>EZGui</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#GUI>EZ-GUI'>GUI>EZ-GUI</a></div>
|
||||
<h1>EZGui</h1>
|
||||
<div id='summary'>An abstract superclass for EZ widget wrappers</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/EZgui.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/EZgui.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='subclasses'>Subclasses: <a href="../Classes/EZControlSpecEditor.html">EZControlSpecEditor</a>, <a href="../Classes/EZKnob.html">EZKnob</a>, <a href="../Classes/EZLists.html">EZLists</a>, <a href="../Classes/EZNumber.html">EZNumber</a>, <a href="../Classes/EZRanger.html">EZRanger</a>, <a href="../Classes/EZSlider.html">EZSlider</a>, <a href="../Classes/EZText.html">EZText</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/EZListView.html">EZListView</a>, <a href="./../Classes/EZPopUpMenu.html">EZPopUpMenu</a>, <a href="./../Classes/EZSlider.html">EZSlider</a>, <a href="./../Classes/EZNumber.html">EZNumber</a>, <a href="./../Classes/EZRanger.html">EZRanger</a>, <a href="./../Classes/EZKnob.html">EZKnob</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='#Accessing%20Instance%20Variables'>Accessing Instance Variables</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-view'>view</a> </li>
|
||||
<li class='toc3'><a href='#-bounds'>bounds</a> </li>
|
||||
<li class='toc3'><a href='#-label'>label</a> </li>
|
||||
<li class='toc3'><a href='#-window'>window</a> </li>
|
||||
</ul><li class='toc2'><a href='#Accessing%20GUI%20options'>Accessing GUI options</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-alwaysOnTop'>alwaysOnTop</a> </li>
|
||||
<li class='toc3'><a href='#-visible'>visible</a> </li>
|
||||
<li class='toc3'><a href='#-enabled'>enabled</a> </li>
|
||||
<li class='toc3'><a href='#-onClose'>onClose</a> </li>
|
||||
<li class='toc3'><a href='#-font'>font</a> </li>
|
||||
</ul><li class='toc2'><a href='#Subclassing'>Subclassing</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-widget'>widget</a> </li>
|
||||
<li class='toc3'><a href='#-action'>action</a> </li>
|
||||
<li class='toc3'><a href='#-value'>value</a> </li>
|
||||
<li class='toc3'><a href='#-valueAction'>valueAction</a> </li>
|
||||
<li class='toc3'><a href='#-doAction'>doAction</a> </li>
|
||||
</ul><li class='toc2'><a href='#Internal%20Utilities'>Internal Utilities</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-prSubViewBounds'>prSubViewBounds</a> </li>
|
||||
<li class='toc3'><a href='#-prMakeView'>prMakeView</a> </li>
|
||||
<li class='toc3'><a href='#-prSetViewParams'>prSetViewParams</a> </li>
|
||||
<li class='toc3'><a href='#-prMakeMarginGap'>prMakeMarginGap</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='#-labelView'>labelView</a> </li>
|
||||
<li class='toc3'><a href='#-layout'>layout</a> </li>
|
||||
<li class='toc3'><a href='#-remove'>remove</a> </li>
|
||||
<li class='toc3'><a href='#-valueActionIfChanged'>valueActionIfChanged</a> </li>
|
||||
</ul></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Users will not normally directly create instances of EZGui, but only use it through its subclasses. It provides the basic mechanisms for various EZ widget wrappers. It also provides a standard for EZ GUI Classes, and new EZ Classes should subclass EZGUI to help keep a consistent user interface.<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='Accessing%20Instance%20Variables'>Accessing Instance Variables</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-view' href='./../Overviews/Methods.html#view'>view</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the enclosing <a href="./../Classes/CompositeView.html">CompositeView</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-bounds' href='./../Overviews/Methods.html#bounds'>bounds</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the bounds of the enclosing <a href="./../Classes/CompositeView.html">CompositeView</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-label' href='./../Overviews/Methods.html#label'>label</a>: METHOD NOT FOUND!</h3>
|
||||
<div class='method'>
|
||||
<p>Sets/gets it the label. Will add the label view if none was initially created.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>string<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/String.html">String</a>.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-window' href='./../Overviews/Methods.html#window'>window</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the window if you used the popUp window function.</div><h3><a class='anchor' name='Accessing%20GUI%20options'>Accessing GUI options</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-alwaysOnTop' href='./../Overviews/Methods.html#alwaysOnTop'>alwaysOnTop</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-alwaysOnTop' href='./../Overviews/Methods.html#alwaysOnTop'>alwaysOnTop</a> = <span class='argstr'>bool</span></h3>
|
||||
<div class='method'>
|
||||
<p>Makes the popup window always on top, if there is one.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>bool<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/Boolean.html">Boolean</a>. Default is false.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-visible' href='./../Overviews/Methods.html#visible'>visible</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-visible' href='./../Overviews/Methods.html#visible'>visible</a> = <span class='argstr'>bool</span></h3>
|
||||
<div class='method'>
|
||||
<p>Sets/gets it the component views are visible.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>bool<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/Boolean.html">Boolean</a>. Default is true.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-enabled' href='./../Overviews/Methods.html#enabled'>enabled</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-enabled' href='./../Overviews/Methods.html#enabled'>enabled</a> = <span class='argstr'>bool</span></h3>
|
||||
<div class='method'>
|
||||
<p>Sets/gets if the list is enabled.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>bool<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/Boolean.html">Boolean</a>. Default is true.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-onClose' href='./../Overviews/Methods.html#onClose'>onClose</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-onClose' href='./../Overviews/Methods.html#onClose'>onClose</a> = <span class='argstr'>func</span></h3>
|
||||
<div class='method'>
|
||||
<p>Sets/gets the onClose function of either <code class='code prettyprint lang-sc'>view</code> or <code class='code prettyprint lang-sc'>window</code>, depending on whether the EZ view used a popup window.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/Function.html">Function</a> or <a href="./../Classes/FunctionList.html">FunctionList</a>.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-font' href='./../Overviews/Methods.html#font'>font</a> = <span class='argstr'>font</span></h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>font<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Font.html">Font</a>.</table></div><h3><a class='anchor' name='Subclassing'>Subclassing</a></h3>
|
||||
|
||||
<p>EZGui provides a standard and basic tools for most EZ classes. If you make a new EZ class, then subclass EZGui, and override the necessary methods. If your class only has a label and a widget, chances are, you need to override nothing, but only need to write the new and init class methods. See existing subclasses of EZGui for examples of this. You may also want to override the following:<h3 class='imethodname'><span class='methprefix'>-</span><a name='-widget' href='./../Overviews/Methods.html#widget'>widget</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the active widget. Subclasses will typically refer to it or ignore it, e.g.:<pre class='code prettyprint lang-sc'>MyEZClass{
|
||||
myOtherMethods{}
|
||||
....
|
||||
listView{ ^widget }
|
||||
}</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-action' href='./../Overviews/Methods.html#action'>action</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-action' href='./../Overviews/Methods.html#action'>action</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>Gets/sets the action of the EZ class instance.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>(func)<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/Function.html">Function</a> or <a href="./../Classes/FunctionList.html">FunctionList</a>.</table></div><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'>val</span></h3>
|
||||
<div class='method'>
|
||||
<p>Gets/sets the value of the <code class='code prettyprint lang-sc'>widget</code>. Does not perform the action.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>val<td class='argumentdesc'>
|
||||
<p>An integer.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-valueAction' href='./../Overviews/Methods.html#valueAction'>valueAction</a> = <span class='argstr'>val</span></h3>
|
||||
<div class='method'>
|
||||
<p>Gets/sets the value of the widget. Performs do action.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>val<td class='argumentdesc'>
|
||||
<p>An integer.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-doAction' href='./../Overviews/Methods.html#doAction'>doAction</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Performs <code class='code prettyprint lang-sc'>this.action.value(this)</code>.</div><h3><a class='anchor' name='Internal%20Utilities'>Internal Utilities</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-prSubViewBounds' href='./../Overviews/Methods.html#prSubViewBounds'>prSubViewBounds</a> (<span class='argstr'>rect</span>, <span class='argstr'>hasLabel</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>This calculates the bounds of the subviews and the gaps. It returns an array of Rects, which depends on how many subview there are. Subclasses override this if they have more than one widget.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-prMakeView' href='./../Overviews/Methods.html#prMakeView'>prMakeView</a> (<span class='argstr'>parentView</span>, <span class='argstr'>bounds</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Called by init. Returns <code class='code prettyprint lang-sc'>[view, bounds]</code>. The container is either the enclosing Container, or a pop up window with a container.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-prSetViewParams' href='./../Overviews/Methods.html#prSetViewParams'>prSetViewParams</a>: METHOD NOT FOUND!</h3>
|
||||
<div class='method'>
|
||||
<p>Only defined by some subclasses. Sets the <code class='code prettyprint lang-sc'>resize</code> and <code class='code prettyprint lang-sc'>align</code> of all the views, according to the state of <code class='code prettyprint lang-sc'>layout</code>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-prMakeMarginGap' href='./../Overviews/Methods.html#prMakeMarginGap'>prMakeMarginGap</a> (<span class='argstr'>parentView</span>, <span class='argstr'>argMargin</span>, <span class='argstr'>argGap</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Called in the init method of all subclasses. Sets the margin and gap of <code class='code prettyprint lang-sc'>view</code>. By default, it tries to get its parent's gap, otherwise it defaults to <code class='code prettyprint lang-sc'>2@2</code>. Setting <code class='code prettyprint lang-sc'>argGap</code> overrides these.</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='-labelView' href='./../Overviews/Methods.html#labelView'>labelView</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-labelView' href='./../Overviews/Methods.html#labelView'>labelView</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-layout' href='./../Overviews/Methods.html#layout'>layout</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-remove' href='./../Overviews/Methods.html#remove'>remove</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-valueActionIfChanged' href='./../Overviews/Methods.html#valueActionIfChanged'>valueActionIfChanged</a> = <span class='argstr'>val</span></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/extValueActionIfChanged.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/extValueActionIfChanged.sc</a></div>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EZGui.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EZGui.schelp</a><br>link::Classes/EZGui::<br>sc version: 3.8.0</div></div></body></html>
|
215
doc-schelp/Help-3.12.2/Classes/EZPopUpMenu.html
Normal file
|
@ -0,0 +1,215 @@
|
|||
<html><head><title>EZPopUpMenu</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#GUI>EZ-GUI'>GUI>EZ-GUI</a></div>
|
||||
<h1>EZPopUpMenu</h1>
|
||||
<div id='summary'>A wrapper class for a label plus a popUpMenu with per item actions</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/EZPopUpMenu.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/EZPopUpMenu.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/EZLists.html">EZLists</a> : <a href="../Classes/EZGui.html">EZGui</a> : <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/PopUpMenu.html">PopUpMenu</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Some%20Important%20Issues%20Regarding%20EZPopUpMenu'>Some Important Issues Regarding EZPopUpMenu</a></li>
|
||||
<ul class='toc'></ul></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='#Changing%20Appearance'>Changing Appearance</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-setColors'>setColors</a> </li>
|
||||
<li class='toc3'><a href='#-font'>font</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='#-initViews'>initViews</a> </li>
|
||||
<li class='toc3'><a href='#-menu'>menu</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>EZPopUpMenu is wrapper class which creates an (optional) label and a popUpMenu. It includes per item actions as well as a global action which are both evaluated upon selection of an item. Convenience methods for inserting and deleting menu items are also included . If the parent is nil, then EZPopUpMenu will create its own window.See <a href="./../Classes/EZGui.html">EZGui</a> and <a href="./../Classes/EZLists.html">EZLists</a> for all of the options.<h3><a class='anchor' name='Some%20Important%20Issues%20Regarding%20EZPopUpMenu'>Some Important Issues Regarding EZPopUpMenu</a></h3>
|
||||
|
||||
<p>The convenience methods for EZPopUpMenu require that the items array is an array of associations of labels and functions, not like in <a href="./../Classes/PopUpMenu.html">PopUpMenu</a>, where items is simply an array of strings. If <code class='code prettyprint lang-sc'>label</code> is <code class='code prettyprint lang-sc'>nil</code>, then no staticText is created.<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'>parentView</span>, <span class='argstr'>bounds</span>, <span class='argstr'>label</span>, <span class='argstr'>items</span>, <span class='argstr'>globalAction</span>, <span class='argstr'>initVal: 0</span>, <span class='argstr'>initAction: false</span>, <span class='argstr'>labelWidth</span>, <span class='argstr'>labelHeight: 20</span>, <span class='argstr'>layout</span>, <span class='argstr'>gap</span>, <span class='argstr'>margin</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZLists.html'>EZLists</a></div>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>parentView<td class='argumentdesc'>
|
||||
<p>The parent view or window. If the parent is nil, then EZPopUpMenu will create its own <a href="./../Classes/Window.html">Window</a>, and place it conveniently on the screen if the bounds are a <a href="./../Classes/Point.html">Point</a>. If the bounds are a <a href="./../Classes/Rect.html">Rect</a>, then the <a href="./../Classes/Rect.html">Rect</a> determines the window bounds.<tr><td class='argumentname'>bounds<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Rect.html">Rect</a> or <a href="./../Classes/Point.html">Point</a>. Default value is <code class='code prettyprint lang-sc'>160@22</code>.<tr><td class='argumentname'>label<td class='argumentdesc'>
|
||||
<p>The label. Default value is <code class='code prettyprint lang-sc'>nil</code>. If <code class='code prettyprint lang-sc'>nil</code>, then no <a href="./../Classes/StaticText.html">StaticText</a> is created.<tr><td class='argumentname'>items<td class='argumentdesc'>
|
||||
<p>Default value is <code class='code prettyprint lang-sc'>nil</code>. An <a href="./../Classes/Array.html">Array</a> of <a href="./../Classes/Association.html">Association</a>s <code class='code prettyprint lang-sc'>['label' -> { arg menuObj; value }, ]</code>. Or and <a href="./../Classes/Array.html">Array</a> <a href="./../Classes/Symbol.html">Symbol</a>s (if you are only using <code class='code prettyprint lang-sc'>globalAction</code>).<tr><td class='argumentname'>globalAction<td class='argumentdesc'>
|
||||
<p>A global function to be performed in addition to the item functions <code class='code prettyprint lang-sc'>{ arg menuObj; value }</code>.<tr><td class='argumentname'>initVal<td class='argumentdesc'>
|
||||
<p>Initial value of the menu, i.e. the index selected. Default value is 0.<tr><td class='argumentname'>initAction<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Boolean.html">Boolean</a>. Performs the action at <code class='code prettyprint lang-sc'>initVal</code> on creation of the menu, plus the <code class='code prettyprint lang-sc'>globalAction</code>. Default value is <code class='code prettyprint lang-sc'>false</code>.<tr><td class='argumentname'>labelWidth<td class='argumentdesc'>
|
||||
<p>Default value is 80.<tr><td class='argumentname'>labelHeight<td class='argumentdesc'>
|
||||
<p>Default value is 20. Not used if layout is <code class='code prettyprint lang-sc'>\horz</code>.<tr><td class='argumentname'>layout<td class='argumentdesc'>
|
||||
<p><code class='code prettyprint lang-sc'>\vert</code> or <code class='code prettyprint lang-sc'>\horz</code>. default is <code class='code prettyprint lang-sc'>\horz</code>.<tr><td class='argumentname'>gap<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Point.html">Point</a>. By default, the view tries to get its parent's <code class='code prettyprint lang-sc'>gap</code>, otherwise it defaults to <code class='code prettyprint lang-sc'>2@2</code>. Setting it overrides these.<tr><td class='argumentname'>margin<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Point.html">Point</a>. This will inset the bounds occupied by the subviews of view.</table><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>(
|
||||
w = Window.new.front;
|
||||
w.view.decorator = FlowLayout(w.view.bounds);
|
||||
g = EZPopUpMenu.new(
|
||||
w,
|
||||
230@22,
|
||||
"A PopUpMenu: ",
|
||||
[
|
||||
\item0 ->{|a| ("this is item 0 of " ++ a).postln},
|
||||
\item1 ->{|a| ("this is item 1 of " ++ a).postln},
|
||||
\item2 ->{|a| ("this is item 2 of " ++ a).postln},
|
||||
],
|
||||
globalAction: {|a| ("this is a global action of "++a.asString ).postln},
|
||||
initVal: 1,
|
||||
initAction: true,
|
||||
labelWidth: 120,
|
||||
labelHeight: 20,
|
||||
layout: \horz,
|
||||
gap: 2@2
|
||||
);
|
||||
)
|
||||
|
||||
// or a more simple syntax:
|
||||
(
|
||||
w = Window.new.front;
|
||||
w.view.decorator = FlowLayout(w.view.bounds);
|
||||
g = EZPopUpMenu.new(w, 200@22, "Menu: ");
|
||||
g.addItem(\item0, { |a| ("this is item 0 of " ++ a).postln });
|
||||
g.addItem(\item1, { |a| ("this is item 1 of " ++ a).postln });
|
||||
g.addItem(\item2, { |a| ("this is item 2 of " ++ a).postln });
|
||||
g.value = 0;
|
||||
)</pre>
|
||||
</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='Changing%20Appearance'>Changing Appearance</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setColors' href='./../Overviews/Methods.html#setColors'>setColors</a> (<span class='argstr'>stringBackground</span>, <span class='argstr'>stringColor</span>, <span class='argstr'>menuBackground</span>, <span class='argstr'>menuStringColor</span>, <span class='argstr'>background</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>stringBackground<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>background</code> of the label and unit views.<tr><td class='argumentname'>stringColor<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>stringColor</code> of the label and unit views.<tr><td class='argumentname'>menuBackground<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>background</code> of the menu.<tr><td class='argumentname'>menuStringColor<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>stringColor</code> of the menu.<tr><td class='argumentname'>background<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>background</code> of the list view.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-font' href='./../Overviews/Methods.html#font'>font</a> = <span class='argstr'>font</span></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZGui.html'>EZGui</a></div>
|
||||
<div class='method'>
|
||||
<p>Set the <a href="./../Classes/Font.html">Font</a> used by all the views.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>font<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Font.html">Font</a>.</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='-initViews' href='./../Overviews/Methods.html#initViews'>initViews</a> (<span class='argstr'>parentView</span>, <span class='argstr'>bounds</span>, <span class='argstr'>label</span>, <span class='argstr'>labelWidth</span>, <span class='argstr'>labelHeight</span>, <span class='argstr'>arglayout</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-menu' href='./../Overviews/Methods.html#menu'>menu</a> </h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>// try several examples together
|
||||
(
|
||||
|
||||
// many menus
|
||||
// inherits the parent's decorator gap
|
||||
|
||||
(
|
||||
w=Window.new("oscillators", Rect(200,500,200,160)).front;
|
||||
w.view.decorator = FlowLayout(w.view.bounds).gap_(2@2);
|
||||
5.do{|i|
|
||||
g = EZPopUpMenu.new(w,190@22, "Oscillator % : ".format(i+1));
|
||||
g.addItem(\off, {"off". postln});
|
||||
g.addItem(\sine, {"sine". postln});
|
||||
g.addItem(\saw, {"saw". postln});
|
||||
g.addItem(\pulse, {"pulse". postln});
|
||||
g.setColors(Color.grey,Color.white);
|
||||
g.value=0;
|
||||
};
|
||||
w.bounds=w.bounds.moveBy(300,60);
|
||||
);
|
||||
|
||||
|
||||
// Creates its own window if parentView is nil:
|
||||
(
|
||||
g = EZPopUpMenu.new(nil,250@22 ," Select : ");
|
||||
g.addItem(\item0, {"this is item 0". postln});
|
||||
g.addItem(\item1, {"this is item 1". postln});
|
||||
g.addItem(\item2, {"this is item 2". postln});
|
||||
g.setColors(Color.grey,Color.white);
|
||||
g.value=0;
|
||||
|
||||
);
|
||||
|
||||
// layout vertical:
|
||||
(
|
||||
g = EZPopUpMenu.new(nil,200@42, " Choose",layout:\vert);
|
||||
g.addItem(\item0, {"this is item 0". postln});
|
||||
g.addItem(\item1, {"this is item 1". postln});
|
||||
g.addItem(\item2, {"this is item 2". postln});
|
||||
g.setColors(Color.grey,Color.white);
|
||||
g.window.bounds=g.window.bounds.moveBy(300,-200);
|
||||
g.value=0;
|
||||
);
|
||||
|
||||
// No labelView created, so set the window title;
|
||||
(
|
||||
g = EZPopUpMenu.new(bounds:180@22); // no label
|
||||
g.addItem(\item0, {"this is item 0". postln});
|
||||
g.addItem(\item1, {"this is item 1". postln});
|
||||
g.addItem(\item2, {"this is item 2". postln});
|
||||
g.value=0;
|
||||
g.window.name=" choose item";
|
||||
g.window.bounds=g.window.bounds.moveBy(0,-200);
|
||||
);
|
||||
)
|
||||
// insertItem;
|
||||
|
||||
(
|
||||
g = EZPopUpMenu.new(nil,200@22, "Menu:");
|
||||
g.addItem(\item0, {"this is item 0". postln});
|
||||
g.addItem(\item1, {"this is item 1". postln});
|
||||
g.addItem(\item2, {"this is item 2". postln});
|
||||
g.addItem(\item4, {"this is item 4". postln});
|
||||
g.value=0;
|
||||
);
|
||||
|
||||
g.insertItem(3, \item3, {"this is item 3". postln});
|
||||
|
||||
|
||||
// remove Item ;
|
||||
|
||||
(
|
||||
w=Window.new.front;
|
||||
w.view.decorator = FlowLayout(w.view.bounds);
|
||||
g = EZPopUpMenu.new(w,200@22, "Menu:");
|
||||
g.addItem(\item0, {"this is item 0". postln});
|
||||
g.addItem(\item1, {"this is item 1". postln});
|
||||
g.addItem(\item2, {"this is item 2". postln});
|
||||
g.addItem(\item4, {"this is item 4". postln});
|
||||
g.insertItem(3, \item3, {"this is item 3". postln});
|
||||
g.value=0;
|
||||
)
|
||||
|
||||
g. removeItemAt(0);
|
||||
|
||||
|
||||
|
||||
// replace item;
|
||||
(
|
||||
g = EZPopUpMenu.new(nil,200@22, "List:");
|
||||
g.addItem(\item0, {"this is item 0". postln});
|
||||
g.addItem(\item1, {"this is item 1". postln});
|
||||
g.addItem(\item2, {"this is item 2". postln});
|
||||
g.addItem(\item3, {"this is item 3". postln});
|
||||
)
|
||||
|
||||
g.replaceItemAt(2, \item2_replaced, {"this is item 2 replaced". postln});</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EZPopUpMenu.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EZPopUpMenu.schelp</a><br>link::Classes/EZPopUpMenu::<br>sc version: 3.8.0</div></div></body></html>
|
229
doc-schelp/Help-3.12.2/Classes/EZText.html
Normal file
|
@ -0,0 +1,229 @@
|
|||
<html><head><title>EZText</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#GUI>EZ-GUI'>GUI>EZ-GUI</a></div>
|
||||
<h1>EZText</h1>
|
||||
<div id='summary'>Wrapper class for a label, a text field and a value</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/EZText.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/Base/EZText.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/EZGui.html">EZGui</a> : <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/StaticText.html">StaticText</a>, <a href="./../Classes/TextField.html">TextField</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Some%20Important%20Issues%20Regarding%20EZText'>Some Important Issues Regarding EZText</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%20/%20Class%20Methods'>Creation / Class Methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*new'>new</a> </li>
|
||||
</ul><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='#-textField'>textField</a> </li>
|
||||
<li class='toc3'><a href='#-action'>action</a> </li>
|
||||
<li class='toc3'><a href='#-value'>value</a> </li>
|
||||
<li class='toc3'><a href='#-valueAction'>valueAction</a> </li>
|
||||
<li class='toc3'><a href='#-doAction'>doAction</a> </li>
|
||||
<li class='toc3'><a href='#-enabled'>enabled</a> </li>
|
||||
<li class='toc2'><a href='#Changing%20Appearance'>Changing Appearance</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-setColors'>setColors</a> </li>
|
||||
<li class='toc3'><a href='#-font'>font</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='#-prSetViewParams'>prSetViewParams</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>EZText is a wrapper class which creates an (optional) <a href="./../Classes/StaticText.html">StaticText</a>, and a <a href="./../Classes/TextField.html">TextField</a>. The value is displayed as a compileString in the text field for editing.<h3><a class='anchor' name='Some%20Important%20Issues%20Regarding%20EZText'>Some Important Issues Regarding EZText</a></h3>
|
||||
|
||||
<p>If the parent is <code class='code prettyprint lang-sc'>nil</code>, then EZText will create its own <a href="./../Classes/Window.html">Window</a>. See <a href="./../Classes/EZGui.html">EZGui</a> for more options.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3><a class='anchor' name='Creation%20/%20Class%20Methods'>Creation / Class Methods</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>parent</span>, <span class='argstr'>bounds</span>, <span class='argstr'>label</span>, <span class='argstr'>action</span>, <span class='argstr'>initVal</span>, <span class='argstr'>initAction: false</span>, <span class='argstr'>labelWidth: 60</span>, <span class='argstr'>textWidth</span>, <span class='argstr'>labelHeight: 20</span>, <span class='argstr'>layout: 'horz'</span>, <span class='argstr'>gap</span>, <span class='argstr'>margin</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>parent<td class='argumentdesc'>
|
||||
<p>The parent view or window. If the parent is nil, then EZText will create its own <a href="./../Classes/Window.html">Window</a>, and place it conveniently on the screen if the bounds are a <a href="./../Classes/Point.html">Point</a>. If the bounds are a <a href="./../Classes/Rect.html">Rect</a>, then the <a href="./../Classes/Rect.html">Rect</a> determines the window bounds.<tr><td class='argumentname'>bounds<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Rect.html">Rect</a> or <a href="./../Classes/Point.html">Point</a>. Default value is <code class='code prettyprint lang-sc'>160@20</code>.<tr><td class='argumentname'>label<td class='argumentdesc'>
|
||||
<p>The label. Default value is <code class='code prettyprint lang-sc'>nil</code>. If <code class='code prettyprint lang-sc'>nil</code>, then no <a href="./../Classes/StaticText.html">StaticText</a> is created.<tr><td class='argumentname'>action<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Function.html">Function</a> called when the value changes. The function is passed the EZText instance as its argument.<tr><td class='argumentname'>initVal<td class='argumentdesc'>
|
||||
<p>The value to initialize the EZText with.<tr><td class='argumentname'>initAction<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Boolean.html">Boolean</a> indicating whether the action function should be called when setting the initial value. The default is false.<tr><td class='argumentname'>labelWidth<td class='argumentdesc'>
|
||||
<p>Number of pixels width for the label. The default is 60. In the <code class='code prettyprint lang-sc'>\horz</code> layout, if you specify the <code class='code prettyprint lang-sc'>textWidth</code>, then the <code class='code prettyprint lang-sc'>labelWidth</code> is ignored and is set to the <code class='code prettyprint lang-sc'>bounds.width - textWidth</code>.<tr><td class='argumentname'>textWidth<td class='argumentdesc'>
|
||||
<p>Number of pixels width for the number box. The default is 45. In <code class='code prettyprint lang-sc'>\vert</code> layout, <code class='code prettyprint lang-sc'>textWidth</code> defaults to the <code class='code prettyprint lang-sc'>bounds.width</code>.<tr><td class='argumentname'>labelHeight<td class='argumentdesc'>
|
||||
<p>Default is 20.<tr><td class='argumentname'>layout<td class='argumentdesc'>
|
||||
<p><code class='code prettyprint lang-sc'>\vert</code>, or <code class='code prettyprint lang-sc'>\horz</code>. The default is <code class='code prettyprint lang-sc'>\horz</code>; <code class='code prettyprint lang-sc'>\vert</code> is a two line version.<tr><td class='argumentname'>gap<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Point.html">Point</a>. By default, the view tries to get its parent's gap, otherwise it defaults to <code class='code prettyprint lang-sc'>2@2</code>. Setting it overrides these.<tr><td class='argumentname'>margin<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Point.html">Point</a>. This will inset the bounds occupied by the subviews of view.</table><h4>Discussion:</h4>
|
||||
|
||||
<p>Example:<pre class='code prettyprint lang-sc'>(
|
||||
w = Window("EZText", Rect(300, 300, 260, 60)).front;
|
||||
g = EZText( w, // parent
|
||||
250@50, // bounds
|
||||
"testing", // label
|
||||
{ |ez| (ez.value.asString ++" is the value of " ++ ez).postln }, // action
|
||||
[1, 2, 3], // initValue
|
||||
true // initAction
|
||||
);
|
||||
g.setColors(Color.grey,Color.white);
|
||||
);
|
||||
|
||||
// Simplest version, no parent view, so a window is created
|
||||
(
|
||||
g = EZText(label:" test ");
|
||||
g.action_({ |ez| (ez.value.asString ++" is the value of " ++ ez).postln });
|
||||
);
|
||||
|
||||
(
|
||||
g = EZText(bounds: Rect( 100, 200, 150, 50), label:" test ", layout: \vert);
|
||||
g.action_({ |ez| (ez.value.asString ++" is the value of " ++ ez).postln });
|
||||
);</pre>
|
||||
|
||||
<p>The contained views can be accessed via the EZText instance variables: <code class='code prettyprint lang-sc'>labelView</code>, <code class='code prettyprint lang-sc'>textField</code>.</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='-textField' href='./../Overviews/Methods.html#textField'>textField</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the textField.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-action' href='./../Overviews/Methods.html#action'>action</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-action' href='./../Overviews/Methods.html#action'>action</a> = value</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZGui.html'>EZGui</a></div>
|
||||
<div class='method'>
|
||||
<p>A <a href="./../Classes/Function.html">Function</a> to be evaluated when the value changes. Typical use is to type in a new value, and interpret it by hitting the evaluation shortcut. The first argument to the function will be the EZText.</div><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'>inval</span></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZGui.html'>EZGui</a></div>
|
||||
<div class='method'>
|
||||
<p>Gets/sets the value of the ezText. Does not perform the action.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>inval<td class='argumentdesc'>
|
||||
<p>Any object.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-valueAction' href='./../Overviews/Methods.html#valueAction'>valueAction</a> = <span class='argstr'>val</span></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZGui.html'>EZGui</a></div>
|
||||
<div class='method'>
|
||||
<p>Sets the value and performs the action.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>val<td class='argumentdesc'>
|
||||
<p>Any object.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-doAction' href='./../Overviews/Methods.html#doAction'>doAction</a> </h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZGui.html'>EZGui</a></div>
|
||||
<div class='method'>
|
||||
<p>Performs the action.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-enabled' href='./../Overviews/Methods.html#enabled'>enabled</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-enabled' href='./../Overviews/Methods.html#enabled'>enabled</a> = <span class='argstr'>bool</span></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/EZGui.html'>EZGui</a></div>
|
||||
<div class='method'>
|
||||
<p>Sets/gets whether the textfield is enabled.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>bool<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Boolean.html">Boolean</a>. Default is <code class='code prettyprint lang-sc'>true</code>.</table></div><h3><a class='anchor' name='Changing%20Appearance'>Changing Appearance</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-setColors' href='./../Overviews/Methods.html#setColors'>setColors</a> (<span class='argstr'>stringBackground</span>, <span class='argstr'>stringColor</span>, <span class='argstr'>textBackground</span>, <span class='argstr'>textStringColor</span>, <span class='argstr'>textNormalColor</span>, <span class='argstr'>textTypingColor</span>, <span class='argstr'>background</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>stringBackground<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>background</code> of the label and unit views.<tr><td class='argumentname'>stringColor<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>stringColor</code> of the label and unit views.<tr><td class='argumentname'>textBackground<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>background</code> of the textField.<tr><td class='argumentname'>textStringColor<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>stringColor</code> of the textField.<tr><td class='argumentname'>textNormalColor<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>normalColor</code> of the textField.<tr><td class='argumentname'>textTypingColor<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>typingColor</code> of the textField.<tr><td class='argumentname'>background<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Color.html">Color</a>. The <code class='code prettyprint lang-sc'>background</code> of the enclosing view.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-font' href='./../Overviews/Methods.html#font'>font</a> = <span class='argstr'>font</span></h3>
|
||||
<div class='method'>
|
||||
<p>Set the Font used by all the views.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>font<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Font.html">Font</a>.</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='-prSetViewParams' href='./../Overviews/Methods.html#prSetViewParams'>prSetViewParams</a> </h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>// Simplest version
|
||||
( // basic use
|
||||
w=Window("ez", Rect(300, 300, 300, 50)).front;
|
||||
g=EZText(w, 290@40," test ", textWidth: 220,layout:\horz);
|
||||
g.setColors(Color.grey,Color.white);
|
||||
);
|
||||
|
||||
|
||||
// lots of textFields on one window
|
||||
(
|
||||
w=Window.new.front;
|
||||
w.view.decorator=FlowLayout(w.view.bounds);
|
||||
w.view.decorator.gap=2@2;
|
||||
|
||||
40.do{
|
||||
g=EZText(w, 170@16," test ", textWidth: 120,layout:\horz);
|
||||
g.setColors(Color.grey, Color.white, Color.grey(0.8));
|
||||
};
|
||||
);
|
||||
|
||||
|
||||
// click these parentheses to see three variants
|
||||
(
|
||||
|
||||
m=nil;
|
||||
m=2@2; //comment for no margin
|
||||
|
||||
/////////////////
|
||||
/// Layout \horz
|
||||
|
||||
( // with label
|
||||
g=EZText(nil, 170@20," freq ", textWidth:120,layout:\horz,margin:m);
|
||||
g.setColors(Color.grey,Color.white,background: Color.grey(0.7));
|
||||
g.window.bounds = g.window.bounds.moveBy(-180,50);
|
||||
);
|
||||
|
||||
( // no label. use window name as label
|
||||
g=EZText(nil, 120@20, layout:\horz,margin:m);
|
||||
g.setColors(Color.grey,Color.white,background: Color.grey(0.7));
|
||||
g.window.bounds = g.window.bounds.moveBy(-180, -90);
|
||||
g.window.name="Freq";
|
||||
);
|
||||
|
||||
/////////////////
|
||||
/// Layout \vert
|
||||
|
||||
( // all features
|
||||
g=EZText(nil, 120@60," freq ", textWidth: 120,layout: \vert, margin:m);
|
||||
g.setColors(Color.grey,Color.white,background: Color.grey(0.7));
|
||||
g.window.bounds = g.window.bounds.moveBy(100,50);
|
||||
);
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
// Simplest sound example
|
||||
(
|
||||
Tdef(\text).set(\note, [0, 2, 7], \dur, { [0.1, 0.2].choose });
|
||||
|
||||
w = Window("EZTexts", Rect(200, 400, 304, 120)).front;
|
||||
w.addFlowLayout;
|
||||
|
||||
TdefGui(Tdef(\text), 0, w);
|
||||
Tdef(\text).envir.keysValuesDo { |k, v|
|
||||
EZText(w, Rect(0,0,300,40), k, { |ez|
|
||||
Tdef(\text).envir.put(*[k, ez.value].postcs);
|
||||
}, v);
|
||||
};
|
||||
|
||||
Tdef(\text, { |ev|
|
||||
var mydur;
|
||||
loop {
|
||||
mydur = ev.dur;
|
||||
(note: ev.note, dur: mydur).postln.play;
|
||||
mydur.wait;
|
||||
}
|
||||
}).play;
|
||||
)
|
||||
|
||||
// type these or similar functions into dur and note fields and evaluate:
|
||||
|
||||
{ [0.1, 0.2, 0.3].choose }
|
||||
{ [ 0, 2, 7, 10 ].scramble.keep(rrand(0, 4)) }</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EZText.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EZText.schelp</a><br>link::Classes/EZText::<br>sc version: 3.8.0</div></div></body></html>
|
705
doc-schelp/Help-3.12.2/Classes/Env.html
Normal file
|
@ -0,0 +1,705 @@
|
|||
<!doctype html><html lang='en'><head><title>Env | 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 = 'Env';
|
||||
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'>Env:</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='#*shapeNames'>shapeNames</a> </li>
|
||||
<li class='toc3'><a href='#*shapeNumber'>shapeNumber</a> </li>
|
||||
<li class='toc2'><a href='#Standard%20Shape%20Envelope%20Creation%20Methods'>Standard Shape Envelope Creation Methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*linen'>linen</a> </li>
|
||||
<li class='toc3'><a href='#*triangle'>triangle</a> </li>
|
||||
<li class='toc3'><a href='#*sine'>sine</a> </li>
|
||||
<li class='toc3'><a href='#*perc'>perc</a> </li>
|
||||
<li class='toc3'><a href='#*pairs'>pairs</a> </li>
|
||||
<li class='toc3'><a href='#*xyc'>xyc</a> </li>
|
||||
</ul><li class='toc2'><a href='#Sustained%20Envelope%20Creation%20Methods'>Sustained Envelope Creation Methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*step'>step</a> </li>
|
||||
<li class='toc3'><a href='#*adsr'>adsr</a> </li>
|
||||
<li class='toc3'><a href='#*dadsr'>dadsr</a> </li>
|
||||
<li class='toc3'><a href='#*asr'>asr</a> </li>
|
||||
<li class='toc3'><a href='#*cutoff'>cutoff</a> </li>
|
||||
<li class='toc3'><a href='#*circle'>circle</a> </li>
|
||||
</ul><li class='toc2'><a href='#Multichannel%20expansion'>Multichannel expansion</a></li>
|
||||
<ul class='toc'></ul><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='#-ar'>ar</a> <a href='#-kr'>kr</a> </li>
|
||||
<li class='toc3'><a href='#-blend'>blend</a> </li>
|
||||
<li class='toc3'><a href='#-delay'>delay</a> </li>
|
||||
<li class='toc3'><a href='#-duration'>duration</a> </li>
|
||||
<li class='toc3'><a href='#-totalDuration'>totalDuration</a> </li>
|
||||
<li class='toc3'><a href='#-circle'>circle</a> </li>
|
||||
<li class='toc3'><a href='#-test'>test</a> </li>
|
||||
<li class='toc3'><a href='#-plot'>plot</a> </li>
|
||||
<li class='toc3'><a href='#-asSignal'>asSignal</a> </li>
|
||||
<li class='toc3'><a href='#-asArray'>asArray</a> </li>
|
||||
<li class='toc3'><a href='#-asMultichannelArray'>asMultichannelArray</a> </li>
|
||||
<li class='toc3'><a href='#-isSustained'>isSustained</a> </li>
|
||||
<li class='toc3'><a href='#-range'>range</a> <a href='#-exprange'>exprange</a> <a href='#-curverange'>curverange</a> </li>
|
||||
<li class='toc2'><a href='#Client-side%20Access%20and%20Stream%20Support'>Client-side Access and Stream Support</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-at'>at</a> </li>
|
||||
<li class='toc3'><a href='#-embedInStream'>embedInStream</a> </li>
|
||||
<li class='toc3'><a href='#-asStream'>asStream</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='#-array'>array</a> </li>
|
||||
<li class='toc3'><a href='#-asArrayForInterpolation'>asArrayForInterpolation</a> </li>
|
||||
<li class='toc3'><a href='#-asControlInput'>asControlInput</a> </li>
|
||||
<li class='toc3'><a href='#-asMultichannelSignal'>asMultichannelSignal</a> </li>
|
||||
<li class='toc3'><a href='#-asOSCArgEmbeddedArray'>asOSCArgEmbeddedArray</a> </li>
|
||||
<li class='toc3'><a href='#-asPseg'>asPseg</a> </li>
|
||||
<li class='toc3'><a href='#-curveValue'>curveValue</a> </li>
|
||||
<li class='toc3'><a href='#-curves'>curves</a> </li>
|
||||
<li class='toc3'><a href='#-discretize'>discretize</a> </li>
|
||||
<li class='toc3'><a href='#-hash'>hash</a> </li>
|
||||
<li class='toc3'><a href='#-levels'>levels</a> </li>
|
||||
<li class='toc3'><a href='#-loopNode'>loopNode</a> </li>
|
||||
<li class='toc3'><a href='#-offset'>offset</a> </li>
|
||||
<li class='toc3'><a href='#-releaseNode'>releaseNode</a> </li>
|
||||
<li class='toc3'><a href='#-releaseTime'>releaseTime</a> </li>
|
||||
<li class='toc3'><a href='#-times'>times</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#blend'>blend</a></li>
|
||||
<ul class='toc'></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#Control'>Control</a> | <a href='./../Browse.html#Envelopes'>Envelopes</a></span>
|
||||
</div><h1>Env<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>Specification for a segmented envelope</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Env.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Env.sc'>Env.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/Penv.html">Penv</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/EnvGen.html">EnvGen</a>, <a href="./../Classes/IEnvGen.html">IEnvGen</a>, <a href="./../Classes/Pseg.html">Pseg</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>An Env is a specification for a segmented envelope. Envs can be used both server-side, by an <a href="./../Classes/EnvGen.html">EnvGen</a> or an <a href="./../Classes/IEnvGen.html">IEnvGen</a> within a <a href="./../Classes/SynthDef.html">SynthDef</a>, and clientside, with methods such as <a href="#-at">-at</a> and <a href="#-asStream">-asStream</a>, below.
|
||||
<p>An Env can have any number of segments which can stop at a particular value or loop several segments when sustaining. It can have several shapes for its segments.
|
||||
<p>The envelope is conceived as a sequence of <em>nodes</em> (not to be confused with a synthesis-Node) : the first node gives the initial level of the envelope, and the following have three parameters: a target level, a time duration from the previous node, and a shape. The three parameters for each node are kept in separate arrays as explained below.<textarea class='editor'>Env.new(levels: [0, 1, 0.9, 0], times: [0.1, 0.5, 1], curve: [-5, 0, -5]).plot;</textarea>
|
||||
|
||||
<p>In this envelope, there are four <em>nodes</em> :<ul>
|
||||
<li>the first <em>node</em> is the initial level of the envelope : 0 <li>the second <em>node</em> has level 1 and is reached in 0.1 second<li>the third <em>nodes</em> has level 0.9 and is reached in 0.5 second<li>the fourth <em>nodes</em> has level 0 and is reached in 1 second</ul>
|
||||
|
||||
<p>Close attention must be paid when retriggering envelopes. Starting from their value at the moment of retrigger, envelopes will cycle through all of their nodes, with the exception of the first. The first node is an envelope's initial value and is only output prior to the initial trigger.<textarea class='editor'>(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env(
|
||||
levels: [0, 0.1, 0.2, 0.3],
|
||||
times: [0.1, 0.1, 0.1],
|
||||
curve: 8
|
||||
),
|
||||
gate: Impulse.kr(3)
|
||||
);
|
||||
}.plot(duration: 1);
|
||||
)</textarea>
|
||||
|
||||
<p>In the above example, the initial level (0) is never repeated. When retriggered, the envelope moves from its current value (0.3), to the value of the second node (0.1), and so forth.<div class='note'><span class='notelabel'>NOTE:</span> In some situations we deal with control points or breakpoints. If these control points have associated x positions (say in an envelope GUI, see <a href="./../Classes/EnvelopeView.html">EnvelopeView</a>) they must be converted to time differences between points to be used as nodes in a Env object. The methods <a href="#*xyc">*xyc</a> and <a href="#*pairs">*pairs</a> can be used to specify an envelope in terms of points.</div><textarea class='editor'>// an envelope in a synth
|
||||
(
|
||||
{
|
||||
var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);
|
||||
SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)
|
||||
}.play
|
||||
)
|
||||
// an envelope to control a parameter in a pattern
|
||||
(
|
||||
Pbind(
|
||||
\note, Env([0, 12, 6, 13, 0], [1, 5, 2, 10]),
|
||||
\dur, 0.1
|
||||
).play
|
||||
)</textarea>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>levels: [ 0, 1, 0 ]</span>, <span class='argstr'>times: [ 1, 1 ]</span>, <span class='argstr'>curve: 'lin'</span>, <span class='argstr'>releaseNode</span>, <span class='argstr'>loopNode</span>, <span class='argstr'>offset: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Create a new envelope specification.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>levels<td class='argumentdesc'>
|
||||
<p>an array of levels. The first value is the initial level of the envelope. When the envelope is used with an EnvGen, levels can be any UGen (new level values are updated only when the envelope has reached that point). When the array of levels contains itself an array, the envelope returns a multichannel output (for a discussion, see <a href="#Multichannel%20expansion">Multichannel expansion</a>)<tr><td class='argumentname'>times<td class='argumentdesc'>
|
||||
<p>an array of durations of segments in seconds. There should be one fewer duration than there are levels, but if shorter, the array is extended by wrapping around the given values.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>a <a href="./../Classes/Symbol.html">Symbol</a>, <a href="./../Classes/Float.html">Float</a>, or an <a href="./../Classes/Array.html">Array</a> of those. Determines the shape of the envelope segments.
|
||||
<p>The possible values are:<table>
|
||||
<tr><td><code>\step</code><td><td>flat segments (immediately jumps to final value)<tr><td><code>\hold</code><td><td>flat segments (holds initial value, jump to final value at the end of the segment)<tr><td><code>\linear</code><td><code>\lin</code><td>linear segments, the default<tr><td><code>\exponential</code><td><code>\exp</code><td>natural exponential growth and decay. In this case, the levels must all be nonzero and have the same sign.<tr><td><code>\sine</code><td><code>\sin</code><td>sinusoidal S shaped segments.<tr><td><code>\welch</code><td><code>\wel</code><td>sinusoidal segments shaped like the sides of a Welch window.<tr><td><code>\squared</code><td><code>\sqr</code><td>squared segment<tr><td><code>\cubed</code><td><code>\cub</code><td>cubed segment<tr><td>a <a href="./../Classes/Float.html">Float</a><td><td>a curvature value for all segments. 0 means linear, positive and negative numbers curve the segment up and down.<tr><td>an <a href="./../Classes/Array.html">Array</a> of symbols or floats<td><td>curvature values for each segment.</table>
|
||||
<tr><td class='argumentname'>releaseNode<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a> or nil. The envelope will sustain at the releaseNode until released.<textarea class='editor'>(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env.new(
|
||||
levels: [0, 1, 0.5, 0],
|
||||
times: [0.01, 0.01, 0.01],
|
||||
releaseNode: 2 // sustains at level 0.5 until gate is closed
|
||||
),
|
||||
gate: Trig.kr(Impulse.kr(3), dur: 0.3)
|
||||
);
|
||||
}.plot(duration: 1);
|
||||
)</textarea>
|
||||
|
||||
<p>In the above example, the release node is set to the third node, which means it will sustain at the level of 0.5 until it is released. The envelope will then continue on until its last node is reached.<tr><td class='argumentname'>loopNode<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a> or nil. Creates a segment of looping nodes. You must specify a releaseNode in order for loopNode to have any effect. The loopNode is the initial node of the loop and is never repeated. Upon reaching the releaseNode, the envelope will move back to the node that immediately follows loopNode. The envelope will loop until its gate is closed. When released, a looping envelope will move from its current position to the node that immediately follows releaseNode and continue until the end.<textarea class='editor'>(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env([0, 1, 0, 0.2, 0, 0.5, 0.8, 0], [0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01], releaseNode: 5, loopNode: 1),
|
||||
gate: Trig.kr(1, 0.9)
|
||||
);
|
||||
}.plot(duration: 1)
|
||||
)</textarea>
|
||||
|
||||
<p>In this example :<ul>
|
||||
<li>the starting level of the envelope is 0<li>the loop goes from nodes[5] (value : 0.5) to the nodes[1+1] (value : 0)<li>at time = 0.9, the loop is released, so the envelope goes to nodes[5+1] (value : 0.8)</ul>
|
||||
<tr><td class='argumentname'>offset<td class='argumentdesc'>
|
||||
<p>an offset to all time values (only applies in <a href="./../Classes/IEnvGen.html">IEnvGen</a>).</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>(
|
||||
{
|
||||
var env = Env([0.0, 0.5, 0.0, 1.0, 0.9, 0.0], [0.05, 0.1, 0.01, 1.0, 1.5], -4);
|
||||
var envgen = EnvGen.ar(env, doneAction: Done.freeSelf);
|
||||
SinOsc.ar(
|
||||
envgen * 1000 + 440
|
||||
) * envgen * 0.1
|
||||
}.play
|
||||
);</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*newClear' href='./../Overviews/Methods.html#newClear'>newClear</a>(<span class='argstr'>numSegments: 8</span>, <span class='argstr'>numChannels: 1</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification with <strong>numSegments</strong> and <strong>numChannels</strong> for filling in later.<h4>Discussion:</h4>
|
||||
|
||||
<p>This can be useful when passing Env parameters as args to a <a href="./../Classes/Synth.html">Synth</a>. Note that the maximum number of segments is fixed and cannot be changed once embedded in a <a href="./../Classes/SynthDef.html">SynthDef</a>. Trying to set an Env with more segments than then this may result in other args being unexpectedly set.<textarea class='editor'>(
|
||||
SynthDef(\help_Env_newClear, { |out = 0, gate = 1|
|
||||
var env, envctl;
|
||||
// make an empty 4 segment envelope
|
||||
env = Env.newClear(4);
|
||||
// create a control argument array
|
||||
envctl = \env.kr(env.asArray);
|
||||
Out.ar(out, SinOsc.ar(EnvGen.kr(envctl, gate), 0) * -12.dbamp);
|
||||
}).add;
|
||||
)
|
||||
|
||||
Synth(\help_Env_newClear, [\env, Env([700,900,900,800], [1,1,1], \exp)]); // 3 segments
|
||||
|
||||
// reset then play again:
|
||||
Synth(\help_Env_newClear, [ \env, Env({ rrand(60, 70).midicps } ! 4, [1,1,1], \exp)]);
|
||||
|
||||
// the same written as an event:
|
||||
(instrument: \help_Env_newClear, env: Env({ rrand(60, 70).midicps } ! 4, [1,1,1], \exp)).play;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*shapeNames' href='./../Overviews/Methods.html#shapeNames'>shapeNames</a></h3>
|
||||
<div class='method'>
|
||||
<p>returns the dictionary containing the available shapes for the envelopes' curves</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*shapeNumber' href='./../Overviews/Methods.html#shapeNumber'>shapeNumber</a>(<span class='argstr'>shapeName</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>returns the index in the dictionary of the given curve shape<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>shapeName<td class='argumentdesc'>
|
||||
<p>name of the shape. e.g. \lin, \cub ...</table></div><h3><a class='anchor' name='Standard%20Shape%20Envelope%20Creation%20Methods'>Standard Shape Envelope Creation Methods</a></h3>
|
||||
|
||||
<p>The following class methods create some frequently used envelope shapes based on supplied durations.<h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*linen' href='./../Overviews/Methods.html#linen'>linen</a>(<span class='argstr'>attackTime: 0.01</span>, <span class='argstr'>sustainTime: 1.0</span>, <span class='argstr'>releaseTime: 1.0</span>, <span class='argstr'>level: 1.0</span>, <span class='argstr'>curve: 'lin'</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which has a trapezoidal shape.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>attackTime<td class='argumentdesc'>
|
||||
<p>the duration of the attack portion.<tr><td class='argumentname'>sustainTime<td class='argumentdesc'>
|
||||
<p>the duration of the sustain portion.<tr><td class='argumentname'>releaseTime<td class='argumentdesc'>
|
||||
<p>the duration of the release portion.<tr><td class='argumentname'>level<td class='argumentdesc'>
|
||||
<p>the level of the sustain portion.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>the curvature of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.linen(0.1, 0.2, 0.1, 0.6).test.plot;
|
||||
Env.linen(1, 2, 3, 0.6).test.plot;
|
||||
Env.linen(1, 2, 3, 0.6, \sine).test.plot;
|
||||
Env.linen(1, 2, 3, 0.6, \welch).test.plot;
|
||||
Env.linen(1, 2, 3, 0.6, -3).test.plot;
|
||||
Env.linen(1, 2, 3, 0.6, -3).test.plot;
|
||||
Env.linen(1, 2, 3, 0.6, [[\sine, \welch, \lin, \exp]]).plot;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*triangle' href='./../Overviews/Methods.html#triangle'>triangle</a>(<span class='argstr'>dur: 1.0</span>, <span class='argstr'>level: 1.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which has a triangle shape.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>dur<td class='argumentdesc'>
|
||||
<p>the duration of the envelope.<tr><td class='argumentname'>level<td class='argumentdesc'>
|
||||
<p>the peak level of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.triangle(1, 1).test.plot;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*sine' href='./../Overviews/Methods.html#sine'>sine</a>(<span class='argstr'>dur: 1.0</span>, <span class='argstr'>level: 1.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which has a hanning window shape.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>dur<td class='argumentdesc'>
|
||||
<p>the duration of the envelope.<tr><td class='argumentname'>level<td class='argumentdesc'>
|
||||
<p>the peak level of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.sine(1, 1).test.plot;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*perc' href='./../Overviews/Methods.html#perc'>perc</a>(<span class='argstr'>attackTime: 0.01</span>, <span class='argstr'>releaseTime: 1.0</span>, <span class='argstr'>level: 1.0</span>, <span class='argstr'>curve: -4.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which (usually) has a percussive shape.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>attackTime<td class='argumentdesc'>
|
||||
<p>the duration of the attack portion.<tr><td class='argumentname'>releaseTime<td class='argumentdesc'>
|
||||
<p>the duration of the release portion.<tr><td class='argumentname'>level<td class='argumentdesc'>
|
||||
<p>the peak level of the envelope.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>the curvature of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.perc(0.05, 1, 1, -4).test.plot;
|
||||
Env.perc(0.001, 1, 1, -4).test.plot; // sharper attack
|
||||
Env.perc(0.001, 1, 1, -8).test.plot; // change curvature
|
||||
Env.perc(1, 0.01, 1, 4).test.plot; // reverse envelope</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*pairs' href='./../Overviews/Methods.html#pairs'>pairs</a>(<span class='argstr'>pairs</span>, <span class='argstr'>curve</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification from coordinates / control points<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>pairs<td class='argumentdesc'>
|
||||
<p>an array of pairs [[time, level], ...]
|
||||
<p>if possible, pairs are sorted regarding their point in time<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>the curvature of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.pairs([[0, 1], [2.1, 0.5], [3, 1.4]], \exp).plot;
|
||||
Env.pairs([[0, 1], [3, 1.4], [2.1, 0.5], [3, 4]], \exp).plot; // *if possible*, pairs are sorted according to time
|
||||
Env.pairs({ { 1.0.rand } ! 2 } ! 16, \exp).plot;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*xyc' href='./../Overviews/Methods.html#xyc'>xyc</a>(<span class='argstr'>xyc</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification from coordinates / control points with curvature.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>xyc<td class='argumentdesc'>
|
||||
<p>an array of triplets [[time, level, curve], ...]
|
||||
<p>if possible, pairs are sorted regarding their point in time</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.xyc([[0, 1, \sin], [2.1, 0.5, \lin], [3, 1.4, \lin]]).plot;
|
||||
Env.xyc([[2.1, 0.5, \lin], [0, 1, \sin], [3, 1.4, \lin]]).plot; // *if possible*, pairs are sorted according to time
|
||||
Env.xyc({ [1.0.rand, 10.0.rand, -4.rand2] } ! 16, \exp).plot;
|
||||
Env.xyc([[0, 1], [2.1, 0.5], [3, 1.4]]).plot; // if not specified, curve defaults to \lin</textarea>
|
||||
</div><h3><a class='anchor' name='Sustained%20Envelope%20Creation%20Methods'>Sustained Envelope Creation Methods</a></h3>
|
||||
|
||||
<p>The following methods create some frequently used envelope shapes which have a sustain segment. They are typically used in SynthDefs in situations where at the time of starting the synth it is not known when it will end. Typical cases are external interfaces, midi input, or quickly varying TempoClock.<textarea class='editor'>(
|
||||
SynthDef(\env_help, { |out, gate = 1, amp = 0.1, release = 0.1|
|
||||
var env = Env.adsr(0.02, release, amp);
|
||||
var gen = EnvGen.kr(env, gate, doneAction: Done.freeSelf);
|
||||
Out.ar(out, PinkNoise.ar(1 ! 2) * gen)
|
||||
}).add
|
||||
);
|
||||
|
||||
a = Synth(\env_help);
|
||||
b = Synth(\env_help, [\release, 2]);
|
||||
a.set(\gate, 0); // alternatively, you can write a.release;
|
||||
b.set(\gate, 0);</textarea>
|
||||
<h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*step' href='./../Overviews/Methods.html#step'>step</a>(<span class='argstr'>levels: [ 0, 1 ]</span>, <span class='argstr'>times: [ 1, 1 ]</span>, <span class='argstr'>releaseNode</span>, <span class='argstr'>loopNode</span>, <span class='argstr'>offset: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification where all the segments are horizontal lines. Given n values of times only n levels need to be provided, corresponding to the fixed value of each segment.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>levels<td class='argumentdesc'>
|
||||
<p>an array of levels. Levels can be any UGen (new level values are updated only when the envelope has reached that point). When the array of levels contains itself an array, the envelope returns a multichannel output (for a discussion, see <a href="#Multichannel%20expansion">Multichannel expansion</a>)<tr><td class='argumentname'>times<td class='argumentdesc'>
|
||||
<p>an array of durations of segments in seconds. It should be the same size as the levels array.<tr><td class='argumentname'>releaseNode<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a> or nil. The envelope will sustain at the release node until released.<tr><td class='argumentname'>loopNode<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a> or nil. If not nil the output will loop through those nodes starting at the loop node to the node immediately preceding the release node, before back to the loop node, and so on. Note that the envelope only transitions to the release node when released. Examples are below. The loop is escaped when a gate signal is sent, when the output transitions to the release node, as described below.<tr><td class='argumentname'>offset<td class='argumentdesc'>
|
||||
<p>an offset to all time values (only applies in <a href="./../Classes/IEnvGen.html">IEnvGen</a>).</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>(
|
||||
{
|
||||
var env = Env.step([0, 3, 5, 2, 7, 3, 0, 3, 4, 0], [0.5, 0.1, 0.2, 1.0, 1.5, 2, 0.2, 0.1, 0.2, 0.1]);
|
||||
var envgen = EnvGen.kr(env);
|
||||
var freq = (envgen + 60).midicps;
|
||||
SinOsc.ar(freq) * 0.1
|
||||
}.play
|
||||
);</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*adsr' href='./../Overviews/Methods.html#adsr'>adsr</a>(<span class='argstr'>attackTime: 0.01</span>, <span class='argstr'>decayTime: 0.3</span>, <span class='argstr'>sustainLevel: 0.5</span>, <span class='argstr'>releaseTime: 1.0</span>, <span class='argstr'>peakLevel: 1.0</span>, <span class='argstr'>curve: -4.0</span>, <span class='argstr'>bias: 0.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which is shaped like traditional analog attack-decay-sustain-release (adsr) envelopes.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>attackTime<td class='argumentdesc'>
|
||||
<p>the duration of the attack portion.<tr><td class='argumentname'>decayTime<td class='argumentdesc'>
|
||||
<p>the duration of the decay portion.<tr><td class='argumentname'>sustainLevel<td class='argumentdesc'>
|
||||
<p>the level of the sustain portion as a ratio of the peak level.<tr><td class='argumentname'>releaseTime<td class='argumentdesc'>
|
||||
<p>the duration of the release portion.<tr><td class='argumentname'>peakLevel<td class='argumentdesc'>
|
||||
<p>the peak level of the envelope.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>the curvature of the envelope.<tr><td class='argumentname'>bias<td class='argumentdesc'>
|
||||
<p>offset</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.adsr(0.02, 0.2, 0.25, 1, 1, -4).test(2).plot;
|
||||
Env.adsr(0.001, 0.2, 0.25, 1, 1, -4).test(2).plot;
|
||||
Env.adsr(0.001, 0.2, 0.25, 1, 1, -4).test(0.45).plot; // release after 0.45 sec</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*dadsr' href='./../Overviews/Methods.html#dadsr'>dadsr</a>(<span class='argstr'>delayTime: 0.1</span>, <span class='argstr'>attackTime: 0.01</span>, <span class='argstr'>decayTime: 0.3</span>, <span class='argstr'>sustainLevel: 0.5</span>, <span class='argstr'>releaseTime: 1.0</span>, <span class='argstr'>peakLevel: 1.0</span>, <span class='argstr'>curve: -4.0</span>, <span class='argstr'>bias: 0.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>As <a href="#*adsr">*adsr</a> above, but with its onset delayed by <strong>delayTime</strong> in seconds. The default delay is 0.1.</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*asr' href='./../Overviews/Methods.html#asr'>asr</a>(<span class='argstr'>attackTime: 0.01</span>, <span class='argstr'>sustainLevel: 1.0</span>, <span class='argstr'>releaseTime: 1.0</span>, <span class='argstr'>curve: -4.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which is shaped like traditional analog attack-sustain-release (asr) envelopes.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>attackTime<td class='argumentdesc'>
|
||||
<p>the duration of the attack portion.<tr><td class='argumentname'>sustainLevel<td class='argumentdesc'>
|
||||
<p>the level of the sustain portion as a ratio of the peak level.<tr><td class='argumentname'>releaseTime<td class='argumentdesc'>
|
||||
<p>the duration of the release portion.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>the curvature of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.asr(0.02, 0.5, 1, -4).test(2).plot;
|
||||
Env.asr(0.001, 0.5, 1, -4).test(2).plot; // sharper attack
|
||||
Env.asr(0.02, 0.5, 1, 'linear').test(2).plot; // linear segments</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*cutoff' href='./../Overviews/Methods.html#cutoff'>cutoff</a>(<span class='argstr'>releaseTime: 0.1</span>, <span class='argstr'>level: 1.0</span>, <span class='argstr'>curve: 'lin'</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which has no attack segment. It simply sustains at the peak level until released. Useful if you only need a fadeout, and more versatile than <a href="./../Classes/Line.html">Line</a>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>releaseTime<td class='argumentdesc'>
|
||||
<p>the duration of the release portion.<tr><td class='argumentname'>level<td class='argumentdesc'>
|
||||
<p>the peak level of the envelope.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>the curvature of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>Env.cutoff(1, 1).test(2).plot;
|
||||
Env.cutoff(1, 1, 4).test(2).plot;
|
||||
Env.cutoff(1, 1, \sine).test(2).plot;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Env.</span><a class='method-name' name='*circle' href='./../Overviews/Methods.html#circle'>circle</a>(<span class='argstr'>levels</span>, <span class='argstr'>times</span>, <span class='argstr'>curve: 'lin'</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a new envelope specification which cycles through its values. For making a given envelope cyclic, you can use the instance method <a href="#-circle">-circle</a><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>levels<td class='argumentdesc'>
|
||||
<p>The levels through which the envelope passes.<tr><td class='argumentname'>times<td class='argumentdesc'>
|
||||
<p>The time between subsequent points in the envelope, which may be a single value (number), or an array of them. If too short, the array is extended. In difference to the *new method, the size of the times array is the same as that of the levels, because it includes the loop time.<tr><td class='argumentname'>curve<td class='argumentdesc'>
|
||||
<p>The curvature of the envelope, which may be a single value (number or symbol), or an array of them. If too short, the array is extended. In difference to the *new method, the size of the curve array is the same as that of the levels, because it includes the loop time.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>{ SinOsc.ar(EnvGen.kr(Env.circle([0, 1, 0], [0.01, 0.5, 0.2])) * 440 + 200) * 0.2 }.play;
|
||||
{ SinOsc.ar(EnvGen.kr(Env.circle([0, 1, 0, 2, 0, 1, 0], [0.01, 0.3])) * 440 + 200) * 0.2 }.play;
|
||||
{ SinOsc.ar(EnvGen.kr(Env.circle([0, 1, 0, (2..4), 0, (1..3), 0], [0.01, 0.3])) * 440 + 200).sum * 0.2 }.play; // multichannel expanded levels</textarea>
|
||||
</div><h3><a class='anchor' name='Multichannel%20expansion'>Multichannel expansion</a></h3>
|
||||
|
||||
<p>If one of the values within either levels, times, or curves is itself an array, the envelope expands to multiple channels wherever appropriate. This means that when such an envelope is passed to an EnvGen, this EnvGen will expand, and when the envelope is queried via the methods <a href="#-at">-at</a> or <a href="#-asSignal">-asSignal</a>, it will return an array of values.<textarea class='editor'>(
|
||||
{
|
||||
var env = Env([0.0, 0.5, 0.0, [1.0, 1.25, 1.5], 0.9, 0.0], [0.05, 0.1, 0.01, 1.0, 1.5], -4);
|
||||
var envgen = EnvGen.ar(env, doneAction: Done.freeSelf);
|
||||
SinOsc.ar(
|
||||
envgen * 1000 + 440
|
||||
) * envgen * 0.1
|
||||
}.play
|
||||
);
|
||||
|
||||
(
|
||||
{
|
||||
var env = Env([1, [1, 2, 3], 0.5, 0.5, [3, 2, 1], 2], [1, 1, 0.5, 1], [[\exp, \sin]]);
|
||||
env.plot;
|
||||
Splay.ar(SinOsc.ar(EnvGen.kr(env) * 400 + 600)) * 0.1
|
||||
}.play;
|
||||
);
|
||||
|
||||
|
||||
(
|
||||
{
|
||||
var levels = (1..30);
|
||||
var env = Env([1, levels, 0.5, levels / 2.5, 2], [1, 0.15, 1, 0.25, 0.1], \exp);
|
||||
Splay.ar(SinOsc.ar(EnvGen.kr(env) * 400 + 600)) * 0.1
|
||||
}.play;
|
||||
);
|
||||
|
||||
|
||||
// accessing the envelope by indexing
|
||||
|
||||
e = Env([1, [1, 2, 3], 1], [1, 1], \exp);
|
||||
e.at(0.5);
|
||||
e.at(1.8);
|
||||
e.at(2);
|
||||
|
||||
e = Env([1, 1, 1], [1, [1, 2, 3]], \exp);
|
||||
e.at(0.5);
|
||||
e.at(2);
|
||||
|
||||
|
||||
// multichannel levels
|
||||
|
||||
Env([0.1, 1, 0.1], [1, [1, 2, 3]], \exp).plot;
|
||||
Env([0.1, 1, 0.1], [1, [1, 2, 3]], [\lin, [\lin, \exp, \sin]]).plot;
|
||||
|
||||
Env([1, 1, 0.5, 3, 2], [1, 0.5, 1, 0.25], \exp).plot;
|
||||
Env([0, 1, 0, 2, 0] * [[1, 2, 3]], [1, 0.5, 1, 0.25], \lin).plot;
|
||||
|
||||
|
||||
// multichannel curves
|
||||
|
||||
Env([0.01, 5, 1, 0.5] + 1, [1, 0.5, 1, 0.25], [[\lin, \sqr]]).plot;
|
||||
|
||||
Env([0.01, 5, 1, 0.5, 0.001] + 1, [1, 0.5, 1, 0.25, 1], [[\lin, \cub, \sin, \cubed, \welch, \step, \exp]]).plot(bounds: Rect(30, 100, 500, 700));
|
||||
|
||||
Env([0.01, 5, 1, 0.5, 0.001] + 1, [1, 0.5, 1, 0.25, 1], [(-4..4)]).plot(bounds: Rect(30, 100, 500, 700));
|
||||
Env([0.01, 5, 1, 0.5] + 1, [1, 0.5, 1, 0.25], [(-4..4)]).plot(bounds: Rect(30, 100, 500, 700));
|
||||
|
||||
|
||||
Env([[0, 0.01], 1, 0], [0.5, 0.5], [[\lin, \exp], \step]).plot;
|
||||
Env([[0, 0.01], 1, [0, 0.01]], [0.5, 1], [[\lin, \exp]]).plot;
|
||||
|
||||
// multichannel times
|
||||
|
||||
Env([[2, 1], 0], [[1, 2]], \lin).plot;
|
||||
Env([0, 1], [1/(1..5)], [(-4..4)]).plot(bounds: Rect(30, 100, 300, 700));
|
||||
Env([0, 1], [1/(1..5)], \lin).plot(bounds: Rect(30, 100, 300, 700));
|
||||
|
||||
|
||||
// mixed expansions
|
||||
|
||||
Env([1, [ 1, 2, 3, 4, 5 ], 0.5, [3, 2, 1], 2], [1, 0.5, 1, 0.25], [[\exp, \lin]]).plot;
|
||||
Env([1, [ 1, 2, 3, 4, 5 ], 0.5, 4, 2], [1, 0.5, 1, 0.25], \exp).plot;
|
||||
|
||||
|
||||
// expanding control point envelopes
|
||||
|
||||
Env.xyc([[2, 0.5, [\lin, \exp]], [0, 1, \lin], [3, 1.4, \lin]]).plot;
|
||||
Env.xyc({ [1.0.rand, 1.0.rand, {[\lin, \exp, \step].choose} ! 3] } ! 8).plot
|
||||
|
||||
Env.xyc([[[2.0, 2.3], 0.5, \lin], [0, 1, \lin], [3, 1.4, \lin]]).plot; // multiple times</textarea>
|
||||
<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='-ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>doneAction: 0</span>, <span class='argstr'>gate: 1.0</span>, <span class='argstr'>timeScale: 1.0</span>, <span class='argstr'>levelScale: 1.0</span>, <span class='argstr'>levelBias: 0.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>doneAction: 0</span>, <span class='argstr'>gate: 1.0</span>, <span class='argstr'>timeScale: 1.0</span>, <span class='argstr'>levelScale: 1.0</span>, <span class='argstr'>levelBias: 0.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Instead of using an <a href="./../Classes/EnvGen.html">EnvGen</a> inside a UGen graph, this message does the same implicitly for convenience. Its argument order corresponds to the most common arguments.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>doneAction<td class='argumentdesc'>
|
||||
<p>An integer representing an action to be executed when the env is finished playing. This can be used to free the enclosing synth, etc. See <a href="./../Classes/Done.html">Done</a> for more detail.<tr><td class='argumentname'>gate<td class='argumentdesc'>
|
||||
<p>This triggers the envelope and holds it open while > 0. If the Env is fixed-length (e.g. Env.linen, Env.perc), the gate argument is used as a simple trigger. If it is an sustaining envelope (e.g. Env.adsr, Env.asr), the envelope is held open until the gate becomes 0, at which point is released.
|
||||
<p>If <strong>gate</strong> < 0, force release with time <code>-1.0 - gate</code>. See <a href="./../Classes/EnvGen.html#Forced%20release">EnvGen: Forced release</a> example.<tr><td class='argumentname'>timeScale<td class='argumentdesc'>
|
||||
<p>The durations of the segments are multiplied by this value. This value can be modulated, but is only sampled at the start of a new envelope segment.<tr><td class='argumentname'>levelScale<td class='argumentdesc'>
|
||||
<p>The levels of the breakpoints are multiplied by this value. This value can be modulated, but is only sampled at the start of a new envelope segment.<tr><td class='argumentname'>levelBias<td class='argumentdesc'>
|
||||
<p>This value is added as an offset to the levels of the breakpoints. This value can be modulated, but is only sampled at the start of a new envelope segment.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>{ Blip.ar(50, 200, Env.perc(1, 0.1, 0.2).kr(2)) }.play;
|
||||
(
|
||||
{
|
||||
Blip.ar(
|
||||
Env({ exprand(3, 2000.0) } ! 18, 0.2, \exp).kr,
|
||||
200,
|
||||
Env({ rrand(0.1, 0.2) } ! 18 ++ 0, 0.2).kr(2))
|
||||
}.play;
|
||||
)</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-blend' href='./../Overviews/Methods.html#blend'>blend</a>(<span class='argstr'>argAnotherEnv</span>, <span class='argstr'>argBlendFrac: 0.5</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Blend two envelopes. Returns a new Env. See <a href="#blend">blend</a> example below.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>argAnotherEnv<td class='argumentdesc'>
|
||||
<p>an Env.<tr><td class='argumentname'>argBlendFrac<td class='argumentdesc'>
|
||||
<p>a number from zero to one.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-delay' href='./../Overviews/Methods.html#delay'>delay</a>(<span class='argstr'>delay</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns a new Env based on the receiver in which the start value will be held for <strong>delay</strong> number of seconds.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>delay<td class='argumentdesc'>
|
||||
<p>The amount of time to delay the start of the envelope.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>a = Env.perc(0.05, 1, 1, -4);
|
||||
b = a.delay(2);
|
||||
a.test.plot;
|
||||
b.test.plot;
|
||||
|
||||
a = Env([0.5, 1, 0], [1, 1]).plot;
|
||||
a.delay(1).plot;</textarea>
|
||||
</div><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='-duration' href='./../Overviews/Methods.html#duration'>duration</a> = <span class='argstr'>dur</span></h3>
|
||||
<div class='method'>
|
||||
<p>Set the total duration of times, by stretching them.<h4>Discussion:</h4>
|
||||
<textarea class='editor'>e = Env([0, 1, 0], [1, 2]);
|
||||
e.duration;
|
||||
e.duration = 2;
|
||||
e.duration;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-totalDuration' href='./../Overviews/Methods.html#totalDuration'>totalDuration</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the total duration of the envelope. In multi-channel envelopes, this is the duration of the longest one.<h4>Discussion:</h4>
|
||||
<textarea class='editor'>e = Env([0, 1, 0], [[1, 2], 2]);
|
||||
e.duration;
|
||||
e.totalDuration;</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-circle' href='./../Overviews/Methods.html#circle'>circle</a>(<span class='argstr'>timeFromLastToFirst: 0.0</span>, <span class='argstr'>curve: 'lin'</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>circle from end to beginning over the time specified, with the curve specified. See also the class method <a href="#*circle">*circle</a><h4>Discussion:</h4>
|
||||
<textarea class='editor'>(
|
||||
{ SinOsc.ar(
|
||||
EnvGen.kr(
|
||||
Env([6000, 700, 100], [1, 1], ['exp', 'lin']).circle.postcs)
|
||||
) * 0.1
|
||||
+ Impulse.ar(1) }.play;
|
||||
)
|
||||
|
||||
(
|
||||
{ SinOsc.ar(
|
||||
EnvGen.kr(
|
||||
Env([6000, 700, 100], [1, 1], ['exp', 'lin']).circle(1).postcs,
|
||||
MouseX.kr > 0.5)
|
||||
) * 0.1
|
||||
+ Impulse.ar(1) }.play;
|
||||
)</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-test' href='./../Overviews/Methods.html#test'>test</a>(<span class='argstr'>releaseTime: 3.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Test the envelope on the default <a href="./../Classes/Server.html">Server</a> with a <a href="./../Classes/SinOsc.html">SinOsc</a>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>releaseTime<td class='argumentdesc'>
|
||||
<p>If this is a sustaining envelope, it will be released after this much time in seconds. The default is 3 seconds.</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'>size: 400</span>, <span class='argstr'>bounds</span>, <span class='argstr'>minval</span>, <span class='argstr'>maxval</span>, <span class='argstr'>name</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 this envelope's shape in a window.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>size<td class='argumentdesc'>
|
||||
<p>The size of the plot. The default is 400.<tr><td class='argumentname'>bounds<td class='argumentdesc'>
|
||||
<p>the size of the plot window.<tr><td class='argumentname'>minval<td class='argumentdesc'>
|
||||
<p>the minimum value in the plot. Defaults to the lowest value in the data.<tr><td class='argumentname'>maxval<td class='argumentdesc'>
|
||||
<p>the maximum value in the plot. Defaults to the highest value in the data.<tr><td class='argumentname'>name<td class='argumentdesc'>
|
||||
<p>the plot window's label name. If nil, a name will be created for you.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asSignal' href='./../Overviews/Methods.html#asSignal'>asSignal</a>(<span class='argstr'>length: 400</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns a <a href="./../Classes/Signal.html">Signal</a> of size <strong>length</strong> created by sampling this Env at <strong>length</strong> number of intervals. If the envelope has multiple channels (see <a href="#Multichannel%20expansion">Multichannel expansion</a>), this method returns an array of signals.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asArray' href='./../Overviews/Methods.html#asArray'>asArray</a></h3>
|
||||
<div class='method'>
|
||||
<p>Converts the Env to an <a href="./../Classes/Array.html">Array</a> in a specially ordered format. This allows for Env parameters to be settable arguments in a SynthDef. See example under <a href="#*newClear">*newClear</a>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asMultichannelArray' href='./../Overviews/Methods.html#asMultichannelArray'>asMultichannelArray</a></h3>
|
||||
<div class='method'>
|
||||
<p>Converts the Env to an <a href="./../Classes/Array.html">Array</a> in a specially ordered format, like <a href="#-asArray">-asArray</a>, however it always returns an array of these data sets, corresponding to the number of channels of the envelope.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isSustained' href='./../Overviews/Methods.html#isSustained'>isSustained</a></h3>
|
||||
<div class='method'>
|
||||
<p>Returns true if this is a sustaining envelope, false otherwise.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-range' href='./../Overviews/Methods.html#range'>range</a>(<span class='argstr'>lo: 0.0</span>, <span class='argstr'>hi: 1.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-exprange' href='./../Overviews/Methods.html#exprange'>exprange</a>(<span class='argstr'>lo: 0.01</span>, <span class='argstr'>hi: 1.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-curverange' href='./../Overviews/Methods.html#curverange'>curverange</a>(<span class='argstr'>lo: 0.0</span>, <span class='argstr'>hi: 1.0</span>, <span class='argstr'>curve: -4</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns a copy of the Env whose levels have been mapped onto the given linear, exponential or curve range.<h4>Discussion:</h4>
|
||||
<textarea class='editor'>a = Env.adsr;
|
||||
a.levels;
|
||||
a.range(42, 45).levels;
|
||||
a.exprange(42, 45).levels;
|
||||
a.curverange(42, 45, -4).levels;
|
||||
|
||||
(
|
||||
// Mapping an Env to an exponential frequency range:
|
||||
{
|
||||
SinOsc.ar(EnvGen.ar(Env.perc(0.01, 0.7).exprange(40, 10000), doneAction: Done.freeSelf)) * 0.2;
|
||||
}.play
|
||||
)</textarea>
|
||||
</div><h3><a class='anchor' name='Client-side%20Access%20and%20Stream%20Support'>Client-side Access and Stream Support</a></h3>
|
||||
|
||||
<p>Sustain and loop settings have no effect in the methods below.<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'>time</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns the value of the Env at <strong>time</strong>. If the envelope has multiple channels, this method returns an array of levels.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>time<td class='argumentdesc'>
|
||||
<p>A number or an array of numbers to specify a cut in the envelope. If time is an array, it returns the corresponding levels of each time value, and if the envelope has multiple channels, it returns an array of values. A combination of both returns a two-dimensional array.</table><h4>Discussion:</h4>
|
||||
<textarea class='editor'>e = Env.triangle(1, 1);
|
||||
e.at(0.5);
|
||||
e.at([0.5, 0.7]);
|
||||
|
||||
e = Env([1, [1, 2, 3], 1], [1, 1], \exp);
|
||||
e.at(0.5);
|
||||
e.at(1.8);
|
||||
e.at(2);
|
||||
e.at([0.5, 1.2]);
|
||||
|
||||
e = Env([1, 100, 1], [1, [1, 2, 3]], \exp);
|
||||
e.at(0.5);
|
||||
e.at(2);
|
||||
e.at([1, 2, 4]);</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-embedInStream' href='./../Overviews/Methods.html#embedInStream'>embedInStream</a>(<span class='argstr'>inval</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Embeds this Env within an enclosing <a href="./../Classes/Stream.html">Stream</a>. Timing is derived from <code>thisThread.beats</code>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asStream' href='./../Overviews/Methods.html#asStream'>asStream</a></h3>
|
||||
<div class='method'>
|
||||
<p>Creates a Routine and embeds the Env in it. This allows the Env to function as a <a href="./../Classes/Stream.html">Stream</a>.<h4>Discussion:</h4>
|
||||
<textarea class='editor'>(
|
||||
{
|
||||
e = Env.sine.asStream;
|
||||
5.do({
|
||||
e.next.postln;
|
||||
0.25.wait;
|
||||
})}.fork
|
||||
)</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='-==' href='./../Overviews/Methods.html#=='>==</a>(<span class='argstr'>that</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-array' href='./../Overviews/Methods.html#array'>array</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asArrayForInterpolation' href='./../Overviews/Methods.html#asArrayForInterpolation'>asArrayForInterpolation</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>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extConvertToOSC.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extConvertToOSC.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asMultichannelSignal' href='./../Overviews/Methods.html#asMultichannelSignal'>asMultichannelSignal</a>(<span class='argstr'>length: 400</span>, <span class='argstr'>class</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asOSCArgEmbeddedArray' href='./../Overviews/Methods.html#asOSCArgEmbeddedArray'>asOSCArgEmbeddedArray</a>(<span class='argstr'>array</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extConvertToOSC.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extConvertToOSC.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asPseg' href='./../Overviews/Methods.html#asPseg'>asPseg</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-curveValue' href='./../Overviews/Methods.html#curveValue'>curveValue</a>(<span class='argstr'>curve</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-curves' href='./../Overviews/Methods.html#curves'>curves</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-curves' href='./../Overviews/Methods.html#curves'>curves</a> = <span class='argstr'>z</span></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-discretize' href='./../Overviews/Methods.html#discretize'>discretize</a>(<span class='argstr'>n: 1024</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hash' href='./../Overviews/Methods.html#hash'>hash</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-levels' href='./../Overviews/Methods.html#levels'>levels</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-levels' href='./../Overviews/Methods.html#levels'>levels</a> = <span class='argstr'>z</span></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-loopNode' href='./../Overviews/Methods.html#loopNode'>loopNode</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-loopNode' href='./../Overviews/Methods.html#loopNode'>loopNode</a> = <span class='argstr'>z</span></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-offset' href='./../Overviews/Methods.html#offset'>offset</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-offset' href='./../Overviews/Methods.html#offset'>offset</a> = <span class='argstr'>z</span></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-releaseNode' href='./../Overviews/Methods.html#releaseNode'>releaseNode</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-releaseNode' href='./../Overviews/Methods.html#releaseNode'>releaseNode</a> = <span class='argstr'>z</span></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-releaseTime' href='./../Overviews/Methods.html#releaseTime'>releaseTime</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-times' href='./../Overviews/Methods.html#times'>times</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-times' href='./../Overviews/Methods.html#times'>times</a> = <span class='argstr'>z</span></h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<textarea class='editor'>s.boot; //.test below will run a synthesis example
|
||||
// to demonstrate the envelope, so the Server must be on
|
||||
|
||||
// different shaped segments: .plot graphs the Env
|
||||
Env.new([0,1, 0.3, 0.8, 0], [2, 3, 1, 4],'linear').test.plot;
|
||||
Env.new([0.001, 1, 0.3, 0.8, 0.001], [2, 3, 1, 4],'exponential').test.plot;
|
||||
Env.new([0, 1, 0.3, 0.8, 0], [2, 3, 1, 4],\sine).test.plot;
|
||||
Env.new([0.001, 1, 0.3, 0.8, 0.001],[2,3,1,4],\welch).test.plot;
|
||||
Env.new([0, 1, 0.3, 0.8, 0], [2, 3, 1, 4],'step').test.plot;
|
||||
Env.new([0, 1, 0.3, 0.8, 0], [2, 3, 1, 4], -2).test.plot;
|
||||
Env.new([0, 1, 0.3, 0.8, 0], [2, 3, 1, 4], 2).test.plot;
|
||||
Env.new([0, 1, 0.3, 0.8, 0], [2, 3, 1, 4], [0, 3, -3, -1]).test.plot;</textarea>
|
||||
|
||||
<p>If a release node is given, and the gate input of the EnvGen is set to zero, it outputs the nodes after the release node:<textarea class='editor'>// release node is node 1; takes 0.5 seconds to go from 0 to 1,
|
||||
// sustains at level of 1, then released after three seconds
|
||||
// (test causes the release after three seconds, given the argument 3),
|
||||
// taking 2 seconds to finish
|
||||
Env.new([0,1,0],[0.5,2],'linear',1).test(3).plot
|
||||
|
||||
// more complex examples
|
||||
// release node is node 2; releases after 5 sec
|
||||
Env.new([0.001,1,0.3,0.8,0.001],[2,3,1,4] * 0.2, 2, 2).test(5).plot;
|
||||
Env.new([0.001,1,0.3,0.8,0.5,0.8,0],[2,3,1,2,2,1] * 0.2, 2, 2).test(5).plot;
|
||||
|
||||
// early release: goes straight onto the release node after 0.1 seconds
|
||||
Env.new([0.001,1,0.3,0.8,0.5,0.8,0],[2,3,1,2,2,1] * 0.2, 2, 2).test(0.1).plot;</textarea>
|
||||
|
||||
<p>If a loop node is given, the EnvGen outputs the nodes between the loop node and the release node (not including the release node itself) until it is released:<textarea class='editor'>// release node is node 2, loop node is node 0: so loops around nodes 0 (lvl 1, dur 0.5)
|
||||
// and 1 (lvl 0.1, dur 0.5) //until released after 3.5 seconds
|
||||
Env.new([0,1,0.1,0],[0.5,0.5,2], 'lin', 2, 0).test(3.5).plot;
|
||||
|
||||
// this just sustains at node 0, because there is no other node to loop around!
|
||||
Env.new([0,1,0],[0.5,2], 'lin', 1, 0).test(3.5).plot;
|
||||
|
||||
// more complex example: release node is node 3, loop node is node 1
|
||||
Env.new([0.001,1,0.3,0.8,0.5,0.8,0],[2,1,1,2,3,1] * 0.1, 'lin', 3, 1).test(3).plot;
|
||||
|
||||
// this is the resulting graph:
|
||||
(
|
||||
e = Env.new([0.001,1,0.3,0.8,0.5,0.8,0],[2,1,1,2,3,1] * 0.001, 'lin', 3, 1);
|
||||
e.plot;{ EnvGen.ar(e, Trig.ar(Impulse.ar(0), 10*0.001)) }.plot(0.02);
|
||||
)</textarea>
|
||||
<div class='note'><span class='notelabel'>NOTE:</span> The starting level for an envelope segment is always the level you are at right now. For example when the gate is released and you jump to the release segment, the level does not jump to the level at the beginning of the release segment, it changes from whatever the current level is to the goal level of the release segment over the specified duration of the release segment.
|
||||
<p>There is an extra level at the beginning of the envelope to set the initial level. After that each node is a goal level and a duration, so node zero has duration equal to times[0] and goal level equal to levels[1].
|
||||
<p>The loop jumps back to the loop node. The endpoint of that segment is the goal level for that segment and the duration of that segment will be the time over which the level changed from the current level to the goal level.</div><h3><a class='anchor' name='blend'>blend</a></h3>
|
||||
<textarea class='editor'>a = Env([0, 0.2, 1, 0.2, 0.2, 0], [0.5, 0.01, 0.01, 0.3, 0.2]);
|
||||
a.test.plot;
|
||||
|
||||
b = Env([0, 0.4, 1, 0.2, 0.5, 0], [0.05, 0.4, [0.01, 0.1], 0.1, 0.4]);
|
||||
b.test.plot;
|
||||
|
||||
(
|
||||
Task({
|
||||
f = (0, 0.2 .. 1);
|
||||
f.do { |u|
|
||||
blend(a, b, u).test.plot;
|
||||
2.wait;
|
||||
Window.allWindows.pop.close; // close last opened window
|
||||
}
|
||||
}).play(AppClock);
|
||||
)
|
||||
|
||||
// blend in a SynthDef
|
||||
(
|
||||
SynthDef(\help_EnvBlend, { | out, factor = 0 |
|
||||
Out.ar(out, EnvGen.kr(blend(Env.perc, Env.sine, factor), 1.0, doneAction: Done.freeSelf)
|
||||
* SinOsc.ar(440,0,0.1)
|
||||
)
|
||||
}).add
|
||||
);
|
||||
|
||||
(
|
||||
{
|
||||
var factors = (0, 0.1..1);
|
||||
factors.do {|f| Synth(\help_EnvBlend, [\factor, f.postln]); 1.wait };
|
||||
}.fork
|
||||
);</textarea>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Env.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Env.schelp</a><br>link::Classes/Env::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
73
doc-schelp/Help-3.12.2/Classes/EnvGate.html
Normal file
|
@ -0,0 +1,73 @@
|
|||
<!doctype html><html lang='en'><head><title>EnvGate | 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 = 'EnvGate';
|
||||
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'>EnvGate:</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>
|
||||
</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#Libraries'>Libraries</a> > <a href='./../Browse.html#Libraries>JITLib'>JITLib</a> > <a href='./../Browse.html#Libraries>JITLib>NodeProxy'>NodeProxy</a></span>
|
||||
</div><h1>EnvGate<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>singleton fade envelope</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/GraphBuilder.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/GraphBuilder.sc'>GraphBuilder.sc</a></div><div id='related'>See also: <a href="./../Classes/EnvGen.html">EnvGen</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Convenience class for an envelope generator combining fadeTime and gate arguments.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>EnvGate.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>i_level: 1</span>, <span class='argstr'>gate</span>, <span class='argstr'>fadeTime</span>, <span class='argstr'>doneAction: 2</span>, <span class='argstr'>curve: 'sin'</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns an <a href="./../Classes/EnvGen.html">EnvGen</a>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>i_level<td class='argumentdesc'>
|
||||
<p>initial level of envelope (if set to 1, it starts open)<tr><td class='argumentname'>gate<td class='argumentdesc'>
|
||||
<p>a gate input. if nil, EnvGate creates a <a href="./../Classes/NamedControl.html">NamedControl</a> named 'gate'<tr><td class='argumentname'>fadeTime<td class='argumentdesc'>
|
||||
<p>an input for both attack and decay time. if nil, EnvGate creates a <a href="./../Classes/NamedControl.html">NamedControl</a> named 'fadeTime' (default time: 0.02)<tr><td class='argumentname'>doneAction<td class='argumentdesc'>
|
||||
<p>doneAction of the <a href="./../Classes/EnvGen.html">EnvGen</a><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><h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>a = { LPF.ar(Saw.ar(200), 600) * EnvGate.new }.play;
|
||||
a.set(\fadeTime, 2);
|
||||
a.release;
|
||||
|
||||
// the same as:
|
||||
a.set(\gate, 0);
|
||||
|
||||
// several env gates can coexist in one synth def.
|
||||
(
|
||||
a = {
|
||||
var sound1 = LPF.ar(Saw.ar(80), 600) * EnvGate.new;
|
||||
var sound2 = RLPF.ar(Saw.ar(200) * 0.5, 6000 * EnvGate.new + 60, 0.1) * EnvGate.new;
|
||||
sound1 + sound2
|
||||
}.play;
|
||||
)
|
||||
a.set(\fadeTime, 5);
|
||||
a.release;</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EnvGate.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EnvGate.schelp</a><br>link::Classes/EnvGate::<br></div></div></body></html>
|
302
doc-schelp/Help-3.12.2/Classes/EnvGen.html
Normal file
|
@ -0,0 +1,302 @@
|
|||
<!doctype html><html lang='en'><head><title>EnvGen | 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 = 'EnvGen';
|
||||
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'>EnvGen:</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>
|
||||
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-canFreeSynth'>canFreeSynth</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Specifying%20an%20envelope%20for%20each%20new%20synth'>Specifying an envelope for each new synth</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Forced%20release'>Forced release</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Fast%20triggering%20tests'>Fast triggering tests</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Modulating%20the%20levelScale'>Modulating the levelScale</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#More%20examples'>More examples</a></li>
|
||||
<ul class='toc'></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#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Envelopes'>Envelopes</a></span>
|
||||
</div><h1>EnvGen<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'>Envelope generator</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/EnvGen.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/EnvGen.sc'>EnvGen.sc</a></div><div id='related'>See also: <a href="./../Classes/Linen.html">Linen</a>, <a href="./../Classes/Env.html">Env</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Plays back break point envelopes. The envelopes are instances of the <a href="./../Classes/Env.html">Env</a> class. The envelope and the arguments for <code>levelScale</code>, <code>levelBias</code>, and <code>timeScale</code> are polled when the EnvGen is triggered, and at the start of a new envelope segment. All values remain constant for the duration of each segment.<textarea class='editor'>{ PinkNoise.ar(EnvGen.kr(Env.perc, doneAction: Done.freeSelf)) }.play</textarea>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>EnvGen.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>envelope</span>, <span class='argstr'>gate: 1.0</span>, <span class='argstr'>levelScale: 1.0</span>, <span class='argstr'>levelBias: 0.0</span>, <span class='argstr'>timeScale: 1.0</span>, <span class='argstr'>doneAction: 0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>EnvGen.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>envelope</span>, <span class='argstr'>gate: 1.0</span>, <span class='argstr'>levelScale: 1.0</span>, <span class='argstr'>levelBias: 0.0</span>, <span class='argstr'>timeScale: 1.0</span>, <span class='argstr'>doneAction: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>envelope<td class='argumentdesc'>
|
||||
<p>An <a href="./../Classes/Env.html">Env</a> instance, or an Array of Controls. (See <a href="./../Classes/Control.html">Control</a> and the example below for how to use this.)
|
||||
<p>The envelope is polled when the EnvGen is triggered, and at the start of a new envelope segment. The Env inputs can be other UGens.<tr><td class='argumentname'>gate<td class='argumentdesc'>
|
||||
<p>This triggers the envelope and holds it open while > 0. If the Env is fixed-length (e.g. Env.linen, Env.perc), the gate argument is used as a simple trigger. If it is an sustaining envelope (e.g. Env.adsr, Env.asr), the envelope is held open until the gate becomes 0, at which point is released.
|
||||
<p>If <strong>gate</strong> < 0, force release with time <code>-1.0 - gate</code>. See <a href="#Forced%20release">Forced release</a> below.<tr><td class='argumentname'>levelScale<td class='argumentdesc'>
|
||||
<p>The levels of the breakpoints are multiplied by this value. This value can be modulated, but is only sampled at the start of a new envelope segment.<tr><td class='argumentname'>levelBias<td class='argumentdesc'>
|
||||
<p>This value is added as an offset to the levels of the breakpoints. This value can be modulated, but is only sampled at the start of a new envelope segment.<tr><td class='argumentname'>timeScale<td class='argumentdesc'>
|
||||
<p>The durations of the segments are multiplied by this value. This value can be modulated, but is only sampled at the start of a new envelope segment.<tr><td class='argumentname'>doneAction<td class='argumentdesc'>
|
||||
<p>An integer representing an action to be executed when the env is finished playing. This can be used to free the enclosing synth, etc. See <a href="./../Classes/Done.html">Done</a> for more detail.</table><h4>Discussion:</h4>
|
||||
<div class='note'><span class='notelabel'>NOTE:</span> The actual minimum duration of a segment is not zero, but one sample step for audio rate and one block for control rate. This may result in asynchronicity when in two envelopes of different number of levels, the envelope times add up to the same total duration. Similarly, when modulating times, the new time is only updated at the end of the current segment - this may lead to asynchronicity of two envelopes with modulated times.</div><textarea class='editor'>// as amplitude envelope
|
||||
(
|
||||
{
|
||||
var env = Env([0, 1, 0.5, 1, 0], [0.01, 0.5, 0.02, 0.5]);
|
||||
SinOsc.ar(470) * EnvGen.kr(env, doneAction: Done.freeSelf)
|
||||
}.play
|
||||
)
|
||||
|
||||
// as amplitude and modulation envelope
|
||||
(
|
||||
{
|
||||
var env = Env([0, 1, 0.5, 0.8, 0, 1.2, 0], [0.01, 0.5, 0.02, 0.5, 0.2, 0.5]);
|
||||
var gate = Impulse.kr(MouseX.kr(0.2, 3), 0.5);
|
||||
var gen = EnvGen.kr(env, gate);
|
||||
SinOsc.ar(270, SinOsc.ar(gen * 473)) * gen * 0.2
|
||||
}.play
|
||||
)
|
||||
// EnvGen multichannel expands when passed a multichannel envelope
|
||||
(
|
||||
{
|
||||
SinOsc.ar(
|
||||
EnvGen.kr(
|
||||
Env.circle([0, 1, 0, (2..4), 0, LFNoise1.kr(0.1 ! 5) * 10, 0], [0.01, 0.6])
|
||||
)
|
||||
* 240 + 300
|
||||
).sum * 0.2
|
||||
}.play;
|
||||
)</textarea>
|
||||
</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='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-canFreeSynth' href='./../Overviews/Methods.html#canFreeSynth'>canFreeSynth</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/canFreeSynth.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/canFreeSynth.sc</a></div>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<textarea class='editor'>// retriggered envelope by Dust
|
||||
(
|
||||
{
|
||||
var env = Env([0.0, 0.5, 0.0, 1.0, 0.9, 0.0], [0.05, 0.1, 0.01, 1.0, 1.5], -4);
|
||||
var envgen = EnvGen.ar(env, Dust.ar(1));
|
||||
SinOsc.ar(
|
||||
envgen * 1000 + 440
|
||||
) * envgen * 0.1
|
||||
}.play
|
||||
);
|
||||
|
||||
// two channels
|
||||
(
|
||||
{
|
||||
var env = Env([0.0, [-0.2, 0.5], 0.0, 1.0, [-0.4, 0.9], 0.0], [0.05, 0.1, 0.01, 1.0, 1.5], -4);
|
||||
var envgen = EnvGen.ar(env, Dust.ar([1, 1]));
|
||||
SinOsc.ar(
|
||||
envgen * 440 + 550
|
||||
) * envgen * 0.1
|
||||
}.play
|
||||
);
|
||||
|
||||
// an envelope in a SynthDef can be used to limit the synth's lifetime (doneAction: Done.freeSelf)
|
||||
|
||||
(
|
||||
SynthDef(\env_help, { | out, gate = 0, freq = 440 |
|
||||
var z;
|
||||
z = EnvGen.kr(Env.perc, doneAction: Done.freeSelf) * SinOsc.ar(freq, 0, 0.1);
|
||||
Out.ar(out, z)
|
||||
}).add;
|
||||
)
|
||||
|
||||
(
|
||||
fork {
|
||||
10.do {
|
||||
Synth(\env_help);
|
||||
0.2.rand.wait;
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// using a gated envelope to gate a sound:
|
||||
(
|
||||
SynthDef(\env_help, { | out, gate = 0, freq = 440, doneAction = 0 |
|
||||
var z = EnvGen.kr(Env.adsr, gate, doneAction: doneAction) * SinOsc.ar(freq, 0, 0.1);
|
||||
Out.ar(out, z)
|
||||
}).add;
|
||||
)
|
||||
|
||||
a = Synth(\env_help);
|
||||
|
||||
|
||||
// turn on
|
||||
a.set(\gate, 1);
|
||||
|
||||
// turn off
|
||||
a.set(\gate, 0);
|
||||
|
||||
// it does not matter to what value the gate is set, as long as it is > 0
|
||||
a.set(\gate, 2);
|
||||
|
||||
a.set(\doneAction, 2, \gate, 0); // set doneAction to two to let the synth free itself
|
||||
|
||||
a.free; // alternatively, free it directly.</textarea>
|
||||
<h3><a class='anchor' name='Specifying%20an%20envelope%20for%20each%20new%20synth'>Specifying an envelope for each new synth</a></h3>
|
||||
<textarea class='editor'>(
|
||||
SynthDef(\help_Env_newClear, { |out = 0|
|
||||
var env, envctl;
|
||||
// make an empty 4 segment envelope
|
||||
env = Env.newClear(4);
|
||||
// create a control argument array
|
||||
envctl = \env.kr(env.asArray);
|
||||
Out.ar(out,
|
||||
SinOsc.ar(EnvGen.kr(envctl, \gate.tr), 0, 0.3) // the gate control is a trigger
|
||||
);
|
||||
}).add;
|
||||
)
|
||||
|
||||
Synth(\help_Env_newClear, [\gate, 1, \env, Env([700,900,900,800], [1,1,1], \exp)]); // 3 segments
|
||||
|
||||
// reset then play again:
|
||||
Synth(\help_Env_newClear, [\gate, 1, \env, Env({ rrand(60, 70).midicps } ! 4, [1,1,1], \exp)]);
|
||||
|
||||
// the same written as an event:
|
||||
(instrument: \help_Env_newClear, gate: 1, env: Env({ rrand(60, 70).midicps } ! 4, [1,1,1], \exp)).play;</textarea>
|
||||
<h3><a class='anchor' name='Forced%20release'>Forced release</a></h3>
|
||||
|
||||
<p>If the gate of an EnvGen is set to -1 or below, then the envelope will cutoff immediately. The time for it to cutoff is the amount less than -1, with -1 being as fast as possible, -1.5 being a cutoff in 0.5 seconds, etc. The cutoff shape and final value are read from the Env's last node.<textarea class='editor'>(
|
||||
SynthDef(\stealMe, { |out, gate = 1|
|
||||
Out.ar(out, {BrownNoise.ar}.dup * EnvGen.kr(Env.asr, gate, doneAction: Done.freeSelf))
|
||||
}).add;
|
||||
)
|
||||
|
||||
a = Synth(\stealMe);
|
||||
a.release(3); // // cutoff in 3 seconds
|
||||
|
||||
// this is how the OSC data looks like:
|
||||
s.sendMsg(\s_new, \stealMe, 1001, 1, 0);
|
||||
s.sendMsg(\n_set, 1001, \gate, -1.1); // cutoff in 0.1 seconds</textarea>
|
||||
|
||||
<p>If the synthDef has an arg named "gate", the convenience method of Node can be used: <code>node.release(releaseTime)</code><textarea class='editor'>d = { arg gate=1; {BrownNoise.ar}.dup * EnvGen.kr(Env.asr, gate, doneAction: Done.freeSelf) }.play;
|
||||
d.release(3);</textarea>
|
||||
|
||||
<p>Forced release ignores multi-node release stages, always performing a one-node release, reading curve and end value from the Env's last node, and overwriting its duration.<textarea class='editor'>(
|
||||
// a Synth with a multi-node release stage
|
||||
d = { arg gate=1;
|
||||
var env = Env([0,1,0,0.5,0],0.5,-4,releaseNode:1);
|
||||
{BrownNoise.ar}.dup * EnvGen.kr(env, gate, doneAction: Done.freeSelf)
|
||||
}.play;
|
||||
)
|
||||
// forced release in 2 seconds:
|
||||
// end value (0) and shape (-4) are read from the env's last node, nodes 2 and 3 are skipped
|
||||
d.release(2);
|
||||
|
||||
// without releaseTime: normal release stage, as defined in env (3 nodes)
|
||||
d.release();</textarea>
|
||||
<h3><a class='anchor' name='Fast%20triggering%20tests'>Fast triggering tests</a></h3>
|
||||
<textarea class='editor'>(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env.new([ 0.001, 1, 0.5, 0 ], [ 0.01, 0.3, 1 ], -4, 2, nil),
|
||||
Impulse.kr(10)
|
||||
) * SinOsc.ar(440, 0, 0.1)
|
||||
}.play;
|
||||
)
|
||||
|
||||
(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env.perc( 0.1, 0.0, 0.5, 1, \welch ),
|
||||
Impulse.kr(100),
|
||||
timeScale: 0.1
|
||||
) * SinOsc.ar(440, 0, 0.3)
|
||||
}.play;
|
||||
)</textarea>
|
||||
<h3><a class='anchor' name='Modulating%20the%20levelScale'>Modulating the levelScale</a></h3>
|
||||
<textarea class='editor'>// no, it doesn't take a ugen in ...
|
||||
(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env.asr( 0.1, 1.0, 0.5, \welch ),
|
||||
1.0,
|
||||
FSinOsc.ar(1.0).range(0.0, 1.0),
|
||||
timeScale: 0.1
|
||||
) * SinOsc.ar(440, 0, 0.3)
|
||||
}.play;
|
||||
)
|
||||
|
||||
// ...but an .ir rate input, a float or an ir rate ugen like Rand would work
|
||||
(
|
||||
{
|
||||
EnvGen.kr(
|
||||
Env.asr( 0.1, 1.0, 0.5, \welch ),
|
||||
1.0,
|
||||
Rand(0.1, 1.0),
|
||||
timeScale: 0.1
|
||||
) * SinOsc.ar(440, 0, 0.3)
|
||||
}.play;
|
||||
)</textarea>
|
||||
<h3><a class='anchor' name='More%20examples'>More examples</a></h3>
|
||||
|
||||
<p>For more information about the <em>control bus mapping</em> used in the line <code>a = Synth(\sine, [freq: f.asMap]);</code>, see <a href="./../Classes/Node.html#-map">Node: -map</a> and <a href="./../Classes/Bus.html#-asMap">Bus: -asMap</a>.<textarea class='editor'>// Changing an Env while playing
|
||||
(
|
||||
SynthDef(\env, { arg i_outbus=0;
|
||||
var env, envctl;
|
||||
|
||||
// make a dummy 8 segment envelope
|
||||
env = Env.newClear(8);
|
||||
|
||||
// create a control argument array
|
||||
envctl = \env.kr( env.asArray );
|
||||
|
||||
ReplaceOut.kr(i_outbus, EnvGen.kr(envctl, doneAction: Done.freeSelf));
|
||||
}).add;
|
||||
)
|
||||
|
||||
(
|
||||
SynthDef(\sine, { |out, freq = 440|
|
||||
Out.ar(out, SinOsc.ar(freq, 0, 0.2));
|
||||
}).add;
|
||||
)
|
||||
|
||||
f = Bus.control(s, 1);
|
||||
f.set(800);
|
||||
|
||||
// use f's control bus value for frequency
|
||||
// i.e. *map* the control to read from the bus
|
||||
a = Synth(\sine, [freq: f.asMap]);
|
||||
|
||||
Synth(\env, [i_outbus: f, env: Env([700, 900, 900, 800], [1, 1, 1]*0.4, \exp)]);
|
||||
|
||||
Synth(\env, [i_outbus: f, env: Env([1000, 1000, 800, 1000, 900, 1000], [1, 1, 1, 1, 1]*0.3, \step)]);
|
||||
|
||||
a.free;
|
||||
f.free;</textarea>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EnvGen.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/EnvGen.schelp</a><br>link::Classes/EnvGen::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
BIN
doc-schelp/Help-3.12.2/Classes/Event-default-note.png
Normal file
After Width: | Height: | Size: 81 KiB |
456
doc-schelp/Help-3.12.2/Classes/Event.html
Normal file
|
@ -0,0 +1,456 @@
|
|||
<html><head><title>Event</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#Collections>Unordered'>Collections>Unordered</a>, <a href='./../Browse.html#Streams-Patterns-Events>Events'>Streams-Patterns-Events>Events</a></div>
|
||||
<h1>Event</h1>
|
||||
<div id='summary'>an environment that represents an action</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/Event.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/Event.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Environment.html">Environment</a> : <a href="../Classes/IdentityDictionary.html">IdentityDictionary</a> : <a href="../Classes/Dictionary.html">Dictionary</a> : <a href="../Classes/Set.html">Set</a> : <a href="../Classes/Collection.html">Collection</a> : <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/Pattern.html">Pattern</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='#Class%20variables'>Class variables</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*parentEvents'>parentEvents</a> </li>
|
||||
<li class='toc3'><a href='#*partialEvents'>partialEvents</a> </li>
|
||||
</ul><li class='toc2'><a href='#Creation%20methods'>Creation methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*new'>new</a> </li>
|
||||
<li class='toc3'><a href='#*default'>default</a> </li>
|
||||
<li class='toc3'><a href='#*silent'>silent</a> </li>
|
||||
<li class='toc3'><a href='#*addEventType'>addEventType</a> </li>
|
||||
<li class='toc3'><a href='#*makeDefaultSynthDef'>makeDefaultSynthDef</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='#*checkIDs'>checkIDs</a> </li>
|
||||
<li class='toc3'><a href='#*makeParentEvents'>makeParentEvents</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-play'>play</a> </li>
|
||||
<li class='toc3'><a href='#-delta'>delta</a> </li>
|
||||
<li class='toc3'><a href='#-next'>next</a> </li>
|
||||
<li class='toc3'><a href='#-embedInStream'>embedInStream</a> </li>
|
||||
<li class='toc3'><a href='#-playAndDelta'>playAndDelta</a> </li>
|
||||
<li class='toc3'><a href='#-isRest'>isRest</a> </li>
|
||||
<li class='toc3'><a href='#-asUGenInput'>asUGenInput</a> </li>
|
||||
<li class='toc3'><a href='#-asControlInput'>asControlInput</a> </li>
|
||||
<li class='toc2'><a href='#Methods%20that%20allow%20Events%20to%20provide%20user%20control%20for%20Synths%20on%20Groups'>Methods that allow Events to provide user control for Synths on Groups</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-synth'>synth</a> </li>
|
||||
<li class='toc3'><a href='#-group'>group</a> </li>
|
||||
<li class='toc3'><a href='#-stop'>stop</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='#-release'>release</a> </li>
|
||||
<li class='toc3'><a href='#-set'>set</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='#-asEvent'>asEvent</a> </li>
|
||||
<li class='toc3'><a href='#-asEventStreamPlayer'>asEventStreamPlayer</a> </li>
|
||||
<li class='toc3'><a href='#-asGroup'>asGroup</a> </li>
|
||||
<li class='toc3'><a href='#-asOSC'>asOSC</a> </li>
|
||||
<li class='toc3'><a href='#-buildForProxy'>buildForProxy</a> </li>
|
||||
<li class='toc3'><a href='#-free'>free</a> </li>
|
||||
<li class='toc3'><a href='#-isPlaying'>isPlaying</a> </li>
|
||||
<li class='toc3'><a href='#-isRunning'>isRunning</a> </li>
|
||||
<li class='toc3'><a href='#-nodeID'>nodeID</a> </li>
|
||||
<li class='toc3'><a href='#-proxyControlClass'>proxyControlClass</a> </li>
|
||||
<li class='toc3'><a href='#-sendOSC'>sendOSC</a> </li>
|
||||
<li class='toc3'><a href='#-split'>split</a> </li>
|
||||
<li class='toc3'><a href='#-synchWithQuant'>synchWithQuant</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#Basic%20Usage'>Basic Usage</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Event%20as%20a%20name%20space%20for%20keeping%20objects'>Event as a name space for keeping objects</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Event%20for%20specifying%20different%20things%20to%20happen'>Event for specifying different things to happen</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Events%20and%20SynthDefs'>Events and SynthDefs</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Multi-channel%20Expansion'>Multi-channel Expansion</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Arrayed%20Arguments'>Arrayed Arguments</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Events%20and%20Patterns'>Events and Patterns</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Event's%20play%20method'>Event's play method</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Timing%20control%20with%20Event's%20delta%20method'>Timing control with Event's delta method</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#The%20structure%20of%20defaultParentEvent'>The structure of defaultParentEvent</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#.defaultParentEvent'>defaultParentEvent</a> </li>
|
||||
</ul><li class='toc2'><a href='#Useful%20keys%20for%20notes'>Useful keys for notes</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Event%20types'>Event types</a></li>
|
||||
<ul class='toc'></ul></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>An Event is an Environment that specifies an action to be taken in response to a <a href="#-play">-play</a> message. The key/value pairs within the Event specify the parameters of that action. Most methods, Event inherits from its superclasses, especially from <a href="./../Classes/Dictionary.html">Dictionary</a>.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3><a class='anchor' name='Class%20variables'>Class variables</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*parentEvents' href='./../Overviews/Methods.html#parentEvents'>parentEvents</a> </h3>
|
||||
<div class='method'>
|
||||
<p>An IdentityDictionary of useful parent events.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*partialEvents' href='./../Overviews/Methods.html#partialEvents'>partialEvents</a> </h3>
|
||||
<div class='method'>
|
||||
<p>An IdentityDictionary of Events that define the default values and functions for different aspects of note generation (timing, volume, pitch, server to use, etc).</div><h3><a class='anchor' name='Creation%20methods'>Creation methods</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>n: 8</span>, <span class='argstr'>proto</span>, <span class='argstr'>parent</span>, <span class='argstr'>know: true</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>create an event with initial size <strong>n</strong>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>n<td class='argumentdesc'>
|
||||
<p>Initial size.<tr><td class='argumentname'>proto<td class='argumentdesc'>
|
||||
<p>May be provided as another event which is used to override keys in the event.<tr><td class='argumentname'>parent<td class='argumentdesc'>
|
||||
<p>May be provided as another event which is used to provide default keys for the event without modifying it.<tr><td class='argumentname'>know<td class='argumentdesc'>
|
||||
<p>If <strong>know</strong> is set to <a href="./../Classes/True.html">True</a>, the event will respond to appropriate message calls. See <a href="./../Classes/Environment.html">Environment</a> for more details.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*default' href='./../Overviews/Methods.html#default'>default</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns an empty event with <a href="#.defaultParentEvent">.defaultParentEvent</a> as parent.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*silent' href='./../Overviews/Methods.html#silent'>silent</a> (<span class='argstr'>dur: 1</span>, <span class='argstr'>inEvent</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns an event that describes a pause of <strong>dur</strong> duration.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*addEventType' href='./../Overviews/Methods.html#addEventType'>addEventType</a> (<span class='argstr'>type</span>, <span class='argstr'>func</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Event types define alternate play functions that are selected by the value of <strong>~type</strong>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>type<td class='argumentdesc'>
|
||||
<p>A name (usually a symbol) for the event type, which can be used to select it<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>A function which optionally takes the server as a first argument<pre class='code prettyprint lang-sc'>Event.addEventType(\happyEvent, { ("I am so happy to be silent sometimes, says" + ~who).postln; });
|
||||
Pbind(\type, \happyEvent, \who, Prand(["Alice", "Bob", "Eve"], inf), \dur, Pwhite(0.1, 1.0, inf)).play;
|
||||
|
||||
// To a certain degree, it is possible to reuse some of another event type's functionality:
|
||||
(
|
||||
Event.addEventType(\happyEvent, { |server|
|
||||
~octave = [5, 6, 7]; // always play three octaves
|
||||
~detune = 10.0.rand2; // always play a bit out of tune
|
||||
~type = \note; // now set type to a different one
|
||||
currentEnvironment.play;
|
||||
});
|
||||
Pbind(\type, \happyEvent, \degree, Pseq([0, 1, 2, 3, 4, 4, 5, 5, 5, 5, 4, 2, 3, 2, 3, 1], inf), \dur, Pwhite(0.1, 1.0, inf)).play;
|
||||
);</pre>
|
||||
</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*makeDefaultSynthDef' href='./../Overviews/Methods.html#makeDefaultSynthDef'>makeDefaultSynthDef</a> </h3>
|
||||
<div class='method'>
|
||||
<p>This method is called in order to build the default SynthDef, which is stored under the key <strong>\default</strong><pre class='code prettyprint lang-sc'>SynthDef(\default, { Out.ar(0, Line.kr(0.3, 0, 0.5) * SinOsc.ar(Rand(300, 500.0)) ) }).add; // overwrite default
|
||||
(freq: 600).play;
|
||||
Event.makeDefaultSynthDef; // reset default
|
||||
(freq: 600).play;</pre>
|
||||
</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='*checkIDs' href='./../Overviews/Methods.html#checkIDs'>checkIDs</a> (<span class='argstr'>id</span>, <span class='argstr'>server</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*makeParentEvents' href='./../Overviews/Methods.html#makeParentEvents'>makeParentEvents</a> </h3>
|
||||
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-play' href='./../Overviews/Methods.html#play'>play</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Play the event. This evaluates the function at <strong>\play</strong>.<pre class='code prettyprint lang-sc'>(freq: 800).play;
|
||||
(play: { "I rather do something else: ".post; ~x.postln; }, x: 800.rand).play;</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-delta' href='./../Overviews/Methods.html#delta'>delta</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the inter onset time - the time delay until the next event in a sequence. This usually depends on <strong>\dur</strong> and <strong>\stretch</strong>, but may be overridden by specifying <strong>\delta</strong> directly.<pre class='code prettyprint lang-sc'>Pn((dur: 2, freq:8000)).play;</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-next' href='./../Overviews/Methods.html#next'>next</a> (<span class='argstr'>inval</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Combines an event given in the argument with the current event. This is used to enable events to be composed.<pre class='code prettyprint lang-sc'>(a: 6, b: 7).next((c: 100));</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-embedInStream' href='./../Overviews/Methods.html#embedInStream'>embedInStream</a> (<span class='argstr'>event</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/Dictionary.html'>Dictionary</a></div>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>event<td class='argumentdesc'>
|
||||
<p>The inval, usually in an event stream. See also <a href="./../Classes/Event.html">Event</a>.
|
||||
<p>If the event is not nil, yields a copy, adding all the elements of the receiver event (this leaves the receiver unchanged). If it is nil, return the receiver.<pre class='code prettyprint lang-sc'>a = (note: 2);
|
||||
b = (note: [3, 5]);
|
||||
Pseq([a, b]).play;</pre>
|
||||
|
||||
<p>If a key "embedInStream" is given, use this function instead. The behaviour of the event can be configured easily this way.
|
||||
<p>The arguments event (the receiver) and inevent (the inevent) are passed to the function.<div class='note'><span class='notelabel'>NOTE:</span> In infinite patterns, you <strong>must</strong> call yield or embedInStream in the function, otherwise it will loop forever.</div><pre class='code prettyprint lang-sc'>(
|
||||
a = (
|
||||
pattern: Pbind(\note, Pgeom(1, 1.1, { 20.rand }), \dur, 0.05),
|
||||
embedInStream: { |event, inevent| event[\pattern].embedInStream(inevent) }
|
||||
);
|
||||
b = (note: [3, 5]);
|
||||
c = (freq: 402, dur: 0.3);
|
||||
Prand([a, b, c], inf).trace.play;
|
||||
)
|
||||
|
||||
// change the events while playing
|
||||
c[\freq] = [900, 1002, 1102];
|
||||
c[\freq] = [200, 101, 1102];</pre>
|
||||
|
||||
<p>A generator for dictionaries:<pre class='code prettyprint lang-sc'>(
|
||||
d = (
|
||||
a: 5, b: 7, c: 1,
|
||||
rout: Routine { |inval|
|
||||
inf.do { |i|
|
||||
var event = d.copy.put(\count, i);
|
||||
inval = event.embedInStream(inval);
|
||||
}
|
||||
}
|
||||
);
|
||||
)
|
||||
|
||||
// draw new values
|
||||
d.rout.((z:999));
|
||||
d.rout.((z:1, a:0));
|
||||
d.rout.(());</pre>
|
||||
</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-playAndDelta' href='./../Overviews/Methods.html#playAndDelta'>playAndDelta</a> (<span class='argstr'>cleanup</span>, <span class='argstr'>mute</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Used by <a href="./../Classes/EventStreamPlayer.html">EventStreamPlayer</a> to play Events and obtain a time increment.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-isRest' href='./../Overviews/Methods.html#isRest'>isRest</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns <strong>true</strong> if the event will be played as a rest, and <strong>false</strong> otherwise. See <a href="./../Classes/Rest.html">Rest</a> for a more complete discussion of rests in event patterns.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-asUGenInput' href='./../Overviews/Methods.html#asUGenInput'>asUGenInput</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Calls <a href="#-asControlInput">-asControlInput</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-asControlInput' href='./../Overviews/Methods.html#asControlInput'>asControlInput</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Enables events to represent the server resources they created in an Event.</div><h3><a class='anchor' name='Methods%20that%20allow%20Events%20to%20provide%20user%20control%20for%20Synths%20on%20Groups'>Methods that allow Events to provide user control for Synths on Groups</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-synth' href='./../Overviews/Methods.html#synth'>synth</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Makes the event a control interface to the resultant <a href="./../Classes/Synth.html">Synth</a> when played.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-group' href='./../Overviews/Methods.html#group'>group</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Makes the event a control interface to the resultant <a href="./../Classes/Group.html">Group</a> when played. This is experimental, does not work consistently yet.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-stop' href='./../Overviews/Methods.html#stop'>stop</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Free the <a href="./../Classes/Synth.html">Synth</a> or <a href="./../Classes/Group.html">Group</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-pause' href='./../Overviews/Methods.html#pause'>pause</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Pause the <a href="./../Classes/Synth.html">Synth</a> or <a href="./../Classes/Group.html">Group</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-resume' href='./../Overviews/Methods.html#resume'>resume</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Resume the <a href="./../Classes/Synth.html">Synth</a> or <a href="./../Classes/Group.html">Group</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-release' href='./../Overviews/Methods.html#release'>release</a> (<span class='argstr'>releaseTime</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Release the <a href="./../Classes/Synth.html">Synth</a> or <a href="./../Classes/Group.html">Group</a>.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-set' href='./../Overviews/Methods.html#set'>set</a> ( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Set a control value in the <a href="./../Classes/Synth.html">Synth</a> or <a href="./../Classes/Group.html">Group</a>. (key1, val1, ....)<pre class='code prettyprint lang-sc'>a = (note: 2).play;
|
||||
a.set(\freq, 700);
|
||||
a.release;</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='-asEvent' href='./../Overviews/Methods.html#asEvent'>asEvent</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/Rest.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/Rest.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-asEventStreamPlayer' href='./../Overviews/Methods.html#asEventStreamPlayer'>asEventStreamPlayer</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-asGroup' href='./../Overviews/Methods.html#asGroup'>asGroup</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-asOSC' href='./../Overviews/Methods.html#asOSC'>asOSC</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asScore/asScore.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asScore/asScore.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a 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='imethodname'><span class='methprefix'>-</span><a name='-free' href='./../Overviews/Methods.html#free'>free</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-isPlaying' href='./../Overviews/Methods.html#isPlaying'>isPlaying</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-isPlaying' href='./../Overviews/Methods.html#isPlaying'>isPlaying</a> = <span class='argstr'>val</span></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-isRunning' href='./../Overviews/Methods.html#isRunning'>isRunning</a> = <span class='argstr'>val</span></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-nodeID' href='./../Overviews/Methods.html#nodeID'>nodeID</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a 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='imethodname'><span class='methprefix'>-</span><a name='-sendOSC' href='./../Overviews/Methods.html#sendOSC'>sendOSC</a> (<span class='argstr'>msg</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-split' href='./../Overviews/Methods.html#split'>split</a> (<span class='argstr'>key: 'id'</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Streams/NodeEvents.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-synchWithQuant' href='./../Overviews/Methods.html#synchWithQuant'>synchWithQuant</a> (<span class='argstr'>quant</span>)</h3>
|
||||
<h2><a class='anchor' name='Basic%20Usage'>Basic Usage</a></h2>
|
||||
|
||||
<p>Events can be written as a series of key value pairs enclosed in parentheses. Empty parentheses will create an empty event. They may be also used for object prototyping - see <a href="./../Classes/Environment.html">Environment</a> for more details.<h3><a class='anchor' name='Event%20as%20a%20name%20space%20for%20keeping%20objects'>Event as a name space for keeping objects</a></h3>
|
||||
|
||||
<p>Because of this simple syntax, Events are often used as name space for keeping objects:<pre class='code prettyprint lang-sc'>// using an event to store values
|
||||
q = (n: 10, x: [1, 2, 3]);
|
||||
q[\y] = q[\x] * q[\n]; // similar to ~y = ~x * ~n, but in a separate name space
|
||||
q.y = q.x * q.n; // shorter way to do the same (pseudo-methods)
|
||||
q.y; // [ 100, 200, 300 ]</pre>
|
||||
<h3><a class='anchor' name='Event%20for%20specifying%20different%20things%20to%20happen'>Event for specifying different things to happen</a></h3>
|
||||
|
||||
<p>Event provides a <a href="#.defaultParentEvent">.defaultParentEvent</a> that defines a variety of different event types and provides a complete set of default key/value pairs for each type. The type is determined by the value of the key <strong>\type</strong> which defaults to <strong>\note</strong>. Note events create synths on the server.<pre class='code prettyprint lang-sc'>( ).play; // the default note
|
||||
(freq: 500, pan: -1) .play; // 500 Hz, panned left
|
||||
(play: { ~what.postln }, what: "hello happening").play; // something else</pre>
|
||||
|
||||
<p>Per default, the play message derives its behaviour from the <a href="#.defaultParentEvent">.defaultParentEvent</a>, which provides many default values, such as default instrument (\default), note (0), legato (0.8) and so on. Depending on the event type, these may differ completely and need not even represent a sound.<h3><a class='anchor' name='Events%20and%20SynthDefs'>Events and SynthDefs</a></h3>
|
||||
|
||||
<p>The key used to select what synthdef is to be played is <strong>\instrument</strong>. In order to use a <a href="./../Classes/SynthDef.html">SynthDef</a> with an Event, send it an <strong>add</strong> message. This creates a description of the SynthDef that the event can consult to determine its control names. The values of these names in the event are used when the event is played. (See <a href="./../Classes/SynthDesc.html">SynthDesc</a> for details.)<pre class='code prettyprint lang-sc'>(
|
||||
SynthDef(\pm, { |out=0, freq=440, amp=0.1, pan=0, gate=1, ratio = 1, index = 1, ar = 0.1, dr = 0.1|
|
||||
var z;
|
||||
z = LPF.ar(
|
||||
PMOsc.ar(freq, freq * ratio, Linen.kr(gate, ar,index, dr), 0, 0.3),
|
||||
XLine.kr(Rand(4000, 5000), Rand(2500, 3200), 1)
|
||||
) * Linen.kr(gate, 0.01, 0.7, dr, 2);
|
||||
OffsetOut.ar(out, Pan2.ar(z, pan, amp));
|
||||
}).add;
|
||||
);
|
||||
|
||||
(instrument: \pm).play;
|
||||
|
||||
(instrument: \pm, ratio: 3.42, index: 12, freq: 150, ar: 8, dr: 3, sustain: 10).play;</pre>
|
||||
<div class='note'><span class='notelabel'>NOTE:</span> The use of <a href="./../Classes/OffsetOut.html">OffsetOut</a> in the SynthDef prevents irregularities that can result from the interaction of the timing of a sequence of notes and the control rate of the Server.</div><h3><a class='anchor' name='Multi-channel%20Expansion'>Multi-channel Expansion</a></h3>
|
||||
|
||||
<p>If a key relevant to the action is assigned an <a href="./../Classes/Array.html">Array</a>, the action is repeated on each element of the array:<pre class='code prettyprint lang-sc'>(degree: (0..12)).play; // a diatonic cluster</pre>
|
||||
|
||||
<p>If several keys are assigned arrays, the action is repeated for each element of the largest array. Smaller arrays are rotated through repeatedly. Here are some examples:<pre class='code prettyprint lang-sc'>// every other note of the diatonic cluster: stacked thirds
|
||||
(degree: (0..12), amp: [0, 0.1]).play;
|
||||
|
||||
// every other note of the semitone cluster: a wholetone cluster again
|
||||
(note: (0..12), amp: [0, 0.1]).play;
|
||||
|
||||
// every third note of the semitone cluster: a diminished chord
|
||||
(note: (0..12), amp: [0, 0, 0.1]).play;
|
||||
|
||||
// the same with different sustain times
|
||||
(note: (0..12), amp: [0, 0, 0.1], sustain:[0.1, 0.3, 1.3, 2.5]).play;
|
||||
|
||||
// timingOffset gives a tempo-relative offset time to each synth
|
||||
(instrument: \pm, ratio: [2.3, 4.5, 1.7], timingOffset: [0, 1.2, 3], sustain: [0.2, 2, 1]).play;</pre>
|
||||
|
||||
<p>In the \note event, all keys multichannel expand apart from: \instrument, \dur, \delta, \strum.<h3><a class='anchor' name='Arrayed%20Arguments'>Arrayed Arguments</a></h3>
|
||||
|
||||
<p>It is possible to assign an array to one of a <a href="./../Classes/SynthDef.html">SynthDef</a>'s control names. For example:<pre class='code prettyprint lang-sc'>(
|
||||
SynthDef(\test, { | out = 0, amp = 0.01, freq = #[300,400,400], pan, gate = 1 |
|
||||
var audio, env;
|
||||
audio = Mix.ar(Pulse.ar(freq, 0.5)); // this is a mixture of three oscillators
|
||||
env = Linen.kr(gate, susLevel: amp , doneAction: 2); // envelope deletes the synt when done
|
||||
audio = audio * env;
|
||||
OffsetOut.ar(0, audio );
|
||||
}).add;
|
||||
)</pre>
|
||||
|
||||
<p>Within an event, arrayed arguments of this sort must be enclosed within an additional array to distinguish them from arguments intended for multi-channel expansion.<pre class='code prettyprint lang-sc'>// one synth, use enclosing array to prevent multi-channel expansion
|
||||
(instrument: \test, note: [[0, 2, 4]]).play;
|
||||
|
||||
// two synths
|
||||
(instrument: \test, note: [[0, 2, 4], [6, 8, 10]]).play;</pre>
|
||||
<h3><a class='anchor' name='Events%20and%20Patterns'>Events and Patterns</a></h3>
|
||||
|
||||
<p>Events are closely integrated with the Patterns library. Different patterns can be bound to different keys (or collections of keys) to specify the resultant music. See the help files <a href="./../Classes/Pattern.html">Pattern</a> and <a href="./../Classes/Pbind.html">Pbind</a> and the tutorials <a href="./../Tutorials/Streams-Patterns-Events4.html">Understanding Streams, Patterns and Events - Part 4</a> and <a href="./../Tutorials/Streams-Patterns-Events5.html">Understanding Streams, Patterns and Events - Part 5</a> for more details on Patterns.
|
||||
<p>Patterns that return events may be played on a clock: dur specifies the time between two subsequent events.<pre class='code prettyprint lang-sc'>// Pseq returns one item in the list after the other
|
||||
(
|
||||
Pseq([
|
||||
(note: 2, sustain: 1, dur: 1.5),
|
||||
(note: [5, 7], sustain: 0.5, dur: 0.8),
|
||||
(note: [2, 6], sustain: 1, dur: 0.8)
|
||||
]).play;
|
||||
)
|
||||
|
||||
// Pbind binds parameters to events:
|
||||
(
|
||||
Pbind(
|
||||
\note, Pseq([2, [5, 7], [2, 6]]),
|
||||
\sustain, Pseq([1, 0.5, 1]),
|
||||
\dur, Pseq([1.5, 0.8, 0.8])
|
||||
).play;
|
||||
)
|
||||
|
||||
// per-event timing may be specified:
|
||||
(
|
||||
Pbind(
|
||||
\note, Pseq([[0, 9], [5, 7], [2, 6]], inf),
|
||||
\sustain, Pseq([1, 0.5, 1], inf),
|
||||
\dur, Pseq([1.5, 0.8, 0.8], inf),
|
||||
\timingOffset, Pseq([[0, 0.3], [0, 0.01]], inf)
|
||||
).play;
|
||||
)</pre>
|
||||
|
||||
<p>Here is an example that illustrates some more of the keys defined by the <a href="#.defaultParentEvent">.defaultParentEvent</a>. Note that it is equivalent to write <code class='code prettyprint lang-sc'>Pbind(\key, val, ...)</code> and <code class='code prettyprint lang-sc'>Pbind(*[key: val, ...])</code>.<pre class='code prettyprint lang-sc'>(
|
||||
Pbind(*[
|
||||
stepsPerOctave: Pstep(Pseq((2..12).mirror, inf),12), // 3 - 12 tone e.t. scales
|
||||
note: Pseq((0..12).mirror, inf), // play full notes up and down
|
||||
ctranspose: Pwhite(-0.2, 0.2), // detune up to +-20 cents
|
||||
detune: Pwhite(-1.0, 1.0), // detune up to 1 Hz
|
||||
sustain: Prand([0.2, 0.2, 0.2, 4], inf), // notes last 0.2 or 4 seconds
|
||||
// 1 in 6 chance waits 0.8 seconds:
|
||||
dur: Prand([0.2, 0.2, 0.2, 0.2, 0.2, 0.8], inf),
|
||||
db: Pstep(Pseq([-15, -25, -20, -25], inf), 0.8)// 4 beat accent structure
|
||||
]).play;
|
||||
)</pre>
|
||||
<h3><a class='anchor' name='Event's%20play%20method'>Event's play method</a></h3>
|
||||
|
||||
<p>When an Event (or any other <a href="./../Classes/Environment.html">Environment</a>) receives a <code class='code prettyprint lang-sc'>use(function)</code> message, it sets itself to be currentEnvironment, evaluates the function, and restores the original value of currentEnvironment. This allows the function to access and alter the contents of the event using the following shortcuts: <code class='code prettyprint lang-sc'>~keyName</code> which is equivalent to <code class='code prettyprint lang-sc'>currentEnvironment.at(keyName)</code> and <code class='code prettyprint lang-sc'>~keyName = value</code> which is equivalent to <code class='code prettyprint lang-sc'>currentEnvironment.put(keyName, value)</code>.
|
||||
<p>We will write <code class='code prettyprint lang-sc'>~keyName</code> whenever referring to the value stored at the key keyName in the event.
|
||||
<p>Here is the definition of Event's play method:<pre class='code prettyprint lang-sc'>play {
|
||||
if (parent.isNil) { parent = defaultParentEvent };
|
||||
this.use { ~play.value };
|
||||
}</pre>
|
||||
|
||||
<p>Thus we can see that the <a href="#.defaultParentEvent">.defaultParentEvent</a> is used unless otherwise specified and the function stored in <code class='code prettyprint lang-sc'>~play</code> is executed in the context of the Event. It can be replaced in a given event for different behavior:<pre class='code prettyprint lang-sc'>(a: 6, b: 7, play: { (~a * ~b).postln }).play;</pre>
|
||||
<h3><a class='anchor' name='Timing%20control%20with%20Event's%20delta%20method'>Timing control with Event's delta method</a></h3>
|
||||
|
||||
<p>Events also specify timing within a <a href="./../Classes/Pattern.html">Pattern</a>. Event's <code class='code prettyprint lang-sc'>delta</code> method returns the value of <code class='code prettyprint lang-sc'>~delta</code> or, if that is nil, <code class='code prettyprint lang-sc'>~dur * ~stretch</code>.
|
||||
<p>Patterns are played by <a href="./../Classes/TempoClock.html">TempoClock</a>s, which have their own tempo controls. This tempo which can be controlled through <code class='code prettyprint lang-sc'>~tempo</code> in the event. Changes to the tempo affect everything else scheduled by the TempoClock, so <code class='code prettyprint lang-sc'>tempo</code> provides a global tempo control while <code class='code prettyprint lang-sc'>stretch</code> provides a control limited to the one pattern.<h3><a class='anchor' name='The%20structure%20of%20defaultParentEvent'>The structure of defaultParentEvent</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'> </span><a name='.defaultParentEvent' href='./../Overviews/Methods.html#defaultParentEvent'>defaultParentEvent</a> </h3>
|
||||
<div class='method'>
|
||||
<p>The default event used in most cases. This is a private class variable. See <a href="#*default">*default</a>.
|
||||
<p>The default parent event provides the collection of default values and functions needed for the different uses of an Event. These defaults are defined in partialEvents that specify distinct aspects of default parent Event:<pre class='code prettyprint lang-sc'>playerEvent // defines ~play, ~type and ~eventTypes
|
||||
serverEvent // server, group, addAction
|
||||
durEvent // duration, tempo and articulation
|
||||
ampEvent // volume, pan, MIDI velocity
|
||||
pitchEvent // pitch specified in many different ways
|
||||
bufferEvent // buffers on the server
|
||||
midiEvent // defines the sending of midi messages</pre>
|
||||
</div><h3><a class='anchor' name='Useful%20keys%20for%20notes'>Useful keys for notes</a></h3>
|
||||
|
||||
<p>Using Events is largely a matter of overwriting keys. Here is a list of keys useful for defining notes with their default values, grouped by the partialEvent within which they are defined.<ul>
|
||||
<li><strong>serverEvent keys</strong>:
|
||||
<p>The keys in serverEvent provide the values needed to identify the server to be used and where in the tree of nodes to place the group.<pre class='code prettyprint lang-sc'>server: nil, // if nil, Server.default is used
|
||||
instrument: \default, // this is the name of a SynthDef
|
||||
group: 1, // nodeID of group on the server
|
||||
// when adding before or after a node
|
||||
// this could be the nodeID of a synth instead of a group
|
||||
addAction: 0, // 0, 1, 2, 3 or \addToHead, \addToTail, \addBefore, \addAfter
|
||||
out: 0, // usually an output bus number, but depends on the SynthDef</pre>
|
||||
<li><strong>ampEvent keys</strong>:
|
||||
<p>The ampEvent determines volume. Notice that <code class='code prettyprint lang-sc'>~amp</code> is a function that determines its value from <code class='code prettyprint lang-sc'>~db</code>. The user can choose to specify the amplitude directly by overwriting <code class='code prettyprint lang-sc'>~amp</code> or to use a decibel specification by overwriting <code class='code prettyprint lang-sc'>~db</code>.<pre class='code prettyprint lang-sc'>amp: #{ ~db.dbamp }, // the amplitude
|
||||
db: -20.0, // the above described in decibel
|
||||
pan: 0.0, // pan position: -1 left 1 right
|
||||
velocity: 64 // midi velocity
|
||||
trig: 0.5 // trigger value</pre>
|
||||
<li><strong>durEvent keys</strong>:
|
||||
<p>The durEvent has keys that determine the timing of a note. Notice that <code class='code prettyprint lang-sc'>~sustain</code> is a function that uses <code class='code prettyprint lang-sc'>~legato</code> to determine the sustain. Like <code class='code prettyprint lang-sc'>~amp</code> this can be overwritten to set the sustain directly.<pre class='code prettyprint lang-sc'>tempo: nil, // changes tempo of a TempoClock
|
||||
dur: 1.0, // time until next note (inter-onset time)
|
||||
stretch: 1.0, // inverse of tempo control, specific to the Event's stream
|
||||
legato: 0.8, // ratio of sustain to duration
|
||||
sustain: #{ ~dur * ~legato * ~stretch },
|
||||
lag: 0.0, // delay (in seconds) relative to current time position of Stream
|
||||
timingOffset: 0.0, // delay (in beats) relative to current time position of Stream
|
||||
strum: 0.0 // "breaks" a chord. May be negative, playing the chord backward
|
||||
strumEndsTogether: false // if true, the strummed notes end together (with gated synths)
|
||||
sendGate: nil // override: true == always send a gate-release message; false == never send</pre>
|
||||
<li><strong>pitchEvent keys</strong>:
|
||||
<p>The pitchEvent has the most complex system of functions that provide a variety of useful ways to determine pitch:<pre class='code prettyprint lang-sc'>freq (->440) // determines the pitch directly as a frequency in Hertz
|
||||
midinote (-> 60) // determines pitch as a fractional MIDI note (69 -> 440)
|
||||
note (-> 0) // determines pitch as a scale degree in an ~stepsPerOctave equal tempered scale
|
||||
degree: 0 // determines pitch as a scale degree within the scale ~scale</pre>
|
||||
|
||||
<p>The event also provides a set of transposition keys:<pre class='code prettyprint lang-sc'>mtranspose: 0 // modal transposition of degree within a scale
|
||||
root: 0.0 // transposes root of the scale
|
||||
gtranspose: 0.0 // gamut transposition within the ~stepsPerOctave equal tempered scale
|
||||
ctranspose: 0.0 // chromatic transposition within the 12 tone equal tempered scale
|
||||
harmonic: 1.0 // multiplies the frequency determined by ~midinote, typically to an overtone
|
||||
detune: 0.0 // directly offsets frequency by adding this value
|
||||
midiToCps // a function taking a MIDI note number and turning it into frequency
|
||||
// Normally this is _.midicps, but you can override it for non-ET tunings
|
||||
|
||||
mtranspose: 0, // modal transposition of degree
|
||||
gtranspose: 0.0 // gamut transposition of note within a ~stepsPerOctave e.t. scale
|
||||
ctranspose: 0.0 // chromatic transposition of midinote within 12 tone e.t. scale
|
||||
|
||||
octave: 5.0 // octave offest of note
|
||||
root: 0.0 // root of the scale
|
||||
degree: 0 // degree in scale
|
||||
scale: #[0, 2, 4, 5, 7, 9, 11] // diatonic major scale
|
||||
stepsPerOctave: 12.0 //
|
||||
detune: 0.0, // detune in Hertz
|
||||
harmonic: 1.0 // harmonic ratio
|
||||
octaveRatio: 2.0 // size of the octave (can be used with the Scale class)</pre>
|
||||
|
||||
<p>The event calculates with these keys to derive parameters needed for the synth:<pre class='code prettyprint lang-sc'>note: #{ // note is the note in halftone steps from the root
|
||||
(~degree + ~mtranspose).degreeToKey(~scale, ~stepsPerOctave);
|
||||
}
|
||||
midinote: #{ // midinote is the midinote (continuous intermediate values)
|
||||
((~note.value + ~gtranspose + ~root) / ~stepsPerOctave + ~octave) * 12.0;
|
||||
}
|
||||
freq: #{
|
||||
(~midinote.value + ~ctranspose).midicps * ~harmonic;
|
||||
}
|
||||
detunedFreq: #{ // finally sent as "freq" to the synth as a parameter, if given
|
||||
~freq.value + ~detune
|
||||
}</pre>
|
||||
<div class='image'><img src='Event-default-note.png'/></div>
|
||||
</ul>
|
||||
<h3><a class='anchor' name='Event%20types'>Event types</a></h3>
|
||||
|
||||
<p>An Event responds to a play message by evaluating <code class='code prettyprint lang-sc'>~play</code> in the event, which by default uses the event's type to define the action to be performed. See <a href="./../Overviews/Event_types.html">Event types</a>.<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Event.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Event.schelp</a><br>link::Classes/Event::<br>sc version: 3.8.0</div></div></body></html>
|
120
doc-schelp/Help-3.12.2/Classes/ExternalClock.html
Normal file
|
@ -0,0 +1,120 @@
|
|||
<html><head><title>ExternalClock</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>ExternalClock</h1>
|
||||
<div id='summary'>Externally driven scheduling</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/eventscheduling/ExternalClock.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/eventscheduling/ExternalClock.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='subclasses'>Subclasses: <a href="../Classes/ServerClock.html">ServerClock</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='#-addprovider'>addprovider</a> </li>
|
||||
<li class='toc3'><a href='#-getMaterial'>getMaterial</a> </li>
|
||||
<li class='toc3'><a href='#-initExternalClock'>initExternalClock</a> </li>
|
||||
<li class='toc3'><a href='#-lastBeat'>lastBeat</a> </li>
|
||||
<li class='toc3'><a href='#-lastBeatTime'>lastBeatTime</a> </li>
|
||||
<li class='toc3'><a href='#-lastTempo'>lastTempo</a> </li>
|
||||
<li class='toc3'><a href='#-play'>play</a> </li>
|
||||
<li class='toc3'><a href='#-removeprovider'>removeprovider</a> </li>
|
||||
<li class='toc3'><a href='#-sched'>sched</a> </li>
|
||||
<li class='toc3'><a href='#-stop'>stop</a> </li>
|
||||
<li class='toc3'><a href='#-tempo'>tempo</a> </li>
|
||||
<li class='toc3'><a href='#-tempoclock'>tempoclock</a> </li>
|
||||
<li class='toc3'><a href='#-tick'>tick</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>Wrapper for a TempoClock that deals with the special scheduling queue required for externally driven scheduling. Subclasses of ExternalClock may deal with the case of a ServerClock (server side clock, as for instance from beat tracking UGens), or control from external applications.
|
||||
<p>Because of Server latency, perceptual attack time of events and timing groove deviations, the next beat's worth of music must be generated before that beat, and cannot be rescheduled with changes of tempo. You add instances (individual bbcutters, patterns etc) to the clock.
|
||||
<p>Note that the scheduler compensates for latency- it is built for real-time reactions, so the latency is taken into account to avoid network jitter in communicating with the Server, but there is no delay from the required time of an event. Also, perceptual attack time and time deviations (possibly due to groove/expressive timing) of events are factored in. PAT necessitates pre-scheduling, expressive timing can go either way.
|
||||
<p>warnings of undefined behaviour:
|
||||
<p>Tempo is assumed in a moderate range 1-4 bps say.
|
||||
<p>s.latency must be small, ie 0.05 sec.
|
||||
<p>Using with Patterns- you can play EventStreams only. See EventStreamPlayer2 class file.
|
||||
<p>Using as a general scheduler: this scheduler assumes that everything it schedules is an Event that has a \play field, within which is a Function. For default Events this will be the same result as Event.play. For your own special Events you require at least (play:{"something".postln;}) <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'>tempoclock</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>tempoclock<td class='argumentdesc'>
|
||||
<p>A TempoClock object. If a SimpleNumber gets passed in, a new TempoClock is created at that bps. The default is to use TempoClock.default;</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='-addprovider' href='./../Overviews/Methods.html#addprovider'>addprovider</a> (<span class='argstr'>provider</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-getMaterial' href='./../Overviews/Methods.html#getMaterial'>getMaterial</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-initExternalClock' href='./../Overviews/Methods.html#initExternalClock'>initExternalClock</a> (<span class='argstr'>tc</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-lastBeat' href='./../Overviews/Methods.html#lastBeat'>lastBeat</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-lastBeatTime' href='./../Overviews/Methods.html#lastBeatTime'>lastBeatTime</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-lastTempo' href='./../Overviews/Methods.html#lastTempo'>lastTempo</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-play' href='./../Overviews/Methods.html#play'>play</a> (<span class='argstr'>quant: 0</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-removeprovider' href='./../Overviews/Methods.html#removeprovider'>removeprovider</a> (<span class='argstr'>array</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-sched' href='./../Overviews/Methods.html#sched'>sched</a> (<span class='argstr'>list</span>, <span class='argstr'>lastref</span>, <span class='argstr'>provider</span>, <span class='argstr'>alive</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-stop' href='./../Overviews/Methods.html#stop'>stop</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-tempo' href='./../Overviews/Methods.html#tempo'>tempo</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-tempo' href='./../Overviews/Methods.html#tempo'>tempo</a> = <span class='argstr'>val</span></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-tempoclock' href='./../Overviews/Methods.html#tempoclock'>tempoclock</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-tick' href='./../Overviews/Methods.html#tick'>tick</a> </h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>s=Server.default;
|
||||
|
||||
s.latency=0.05;
|
||||
|
||||
c=ExternalClock(TempoClock(2.1)).play;
|
||||
|
||||
//playExt= play on External Clock
|
||||
p=Pbind.new.playExt(c);
|
||||
|
||||
q= Pbind(\dur,Pseq([0.25,0.25,0.5],inf),\freq,Pseq([330,330,550],inf),\sustain, 0.1).playExt(c);
|
||||
|
||||
q.mute;
|
||||
q.unmute;
|
||||
|
||||
p.stop;
|
||||
q.stop;
|
||||
|
||||
~buffers= BBCutBuffer.array([Platform.resourceDir +/+ "sounds/break.aiff",Platform.resourceDir +/+ "sounds/break2.aiff"],[8,4]);
|
||||
|
||||
//will be added to run on this clock as soon as made
|
||||
a=BBCut2(CutBuf2(~buffers[0],0.3), BBCutProc11.new).play(c);
|
||||
|
||||
b=BBCut2(CutBuf2(~buffers[1],0.5,dutycycle:0.4), BBCutProc11.new).play(c);
|
||||
|
||||
//stream cut audio in
|
||||
g=BBCut2(CutStream1(8), ChooseCutProc(0.5,4)).play(c);
|
||||
|
||||
|
||||
//remove the first from the clock- don't worry if there are FAILURE messages, some latency queued OSC messages
|
||||
//are still waiting that were already sent to the server, they shouldn't cause too much trouble
|
||||
a.end
|
||||
|
||||
c.tempoclock.tempo_(1.5);
|
||||
|
||||
b.end
|
||||
|
||||
//remove everything and terminate TempoClock
|
||||
c.stop;</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/ExternalClock.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/ExternalClock.schelp</a><br>link::Classes/ExternalClock::<br>sc version: 3.8.0</div></div></body></html>
|
81
doc-schelp/Help-3.12.2/Classes/FBSineN.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
<html><head><title>FBSineN</title>
|
||||
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
|
||||
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
|
||||
<link rel='stylesheet' href='./../custom.css' type='text/css' />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
|
||||
<script src='./../scdoc.js' type='text/javascript'></script>
|
||||
<script src='./../docmap.js' type='text/javascript'></script>
|
||||
<script src='./../prettify.js' type='text/javascript'></script>
|
||||
<script src='./../lang-sc.js' type='text/javascript'></script>
|
||||
<script type='text/javascript'>var helpRoot='./..';</script>
|
||||
</head>
|
||||
<ul id='menubar'></ul>
|
||||
<body onload='fixTOC();prettyPrint()'>
|
||||
<div class='contents'>
|
||||
<div class='header'>
|
||||
<div id='label'>SuperCollider CLASSES</div>
|
||||
<div id='categories'><a href='./../Browse.html#UGens>Generators>Chaotic'>UGens>Generators>Chaotic</a></div>
|
||||
<h1>FBSineN</h1>
|
||||
<div id='summary'>Feedback sine with chaotic phase indexing</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/ChaosGen.html">ChaosGen</a> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='subclasses'>Subclasses: <a href="../Classes/FBSineC.html">FBSineC</a>, <a href="../Classes/FBSineL.html">FBSineL</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/FBSineL.html">FBSineL</a>, <a href="./../Classes/FBSineC.html">FBSineC</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*ar'>ar</a> </li>
|
||||
<li class='toc2'><a href='#Inherited%20class%20methods'>Inherited class methods</a></li>
|
||||
<li class='toc2'><a href='#Undocumented%20class%20methods'>Undocumented class methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*equation'>equation</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
|
||||
</ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A non-interpolating sound generator based on the difference equations:<pre> x(n+1) = sin(im * y(n) + fb * x(n))
|
||||
y(n+1) = (a * y(n) + c) % 2pi</pre>
|
||||
<p>This uses a linear congruential function to drive the phase indexing of a sine wave. For <code class='code prettyprint lang-sc'>im = 1</code>, <code class='code prettyprint lang-sc'>fb = 0</code>, and <code class='code prettyprint lang-sc'>a = 1</code> a normal sinewave results.
|
||||
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
|
||||
var im = 1, fb = 0.1, a = 1.1, c = 0.5, xi = 0.1, yi = 0.1, size = 64;
|
||||
plot(size.collect { xi = sin((im * yi) + (fb * xi)); yi = (a * yi + c) % 2pi; xi });
|
||||
)</pre>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*ar' href='./../Overviews/Methods.html#ar'>ar</a> (<span class='argstr'>freq: 22050</span>, <span class='argstr'>im: 1</span>, <span class='argstr'>fb: 0.1</span>, <span class='argstr'>a: 1.1</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>xi: 0.1</span>, <span class='argstr'>yi: 0.1</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>freq<td class='argumentdesc'>
|
||||
<p>Iteration frequency in Hertz<tr><td class='argumentname'>im<td class='argumentdesc'>
|
||||
<p>Index multiplier amount<tr><td class='argumentname'>fb<td class='argumentdesc'>
|
||||
<p>Feedback amount<tr><td class='argumentname'>a<td class='argumentdesc'>
|
||||
<p>Phase multiplier amount<tr><td class='argumentname'>c<td class='argumentdesc'>
|
||||
<p>Phase increment amount<tr><td class='argumentname'>xi<td class='argumentdesc'>
|
||||
<p>Initial value of x<tr><td class='argumentname'>yi<td class='argumentdesc'>
|
||||
<p>Initial value of y<tr><td class='argumentname'>mul<td class='argumentdesc'><tr><td class='argumentname'>add<td class='argumentdesc'></table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
|
||||
<div id='inheritedclassmets'></div><h3><a class='anchor' name='Undocumented%20class%20methods'>Undocumented class methods</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*equation' href='./../Overviews/Methods.html#equation'>equation</a> </h3>
|
||||
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
||||
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
|
||||
<div id='inheritedinstmets'></div><h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>// default initial params
|
||||
{ FBSineN.ar(SampleRate.ir/4) * 0.2 }.play(s);</pre>
|
||||
<pre class='code prettyprint lang-sc'>// increase feedback
|
||||
{ FBSineN.ar(SampleRate.ir, 1, Line.kr(0.01, 4, 10), 1, 0.1) * 0.2 }.play(s);</pre>
|
||||
<pre class='code prettyprint lang-sc'>// increase phase multiplier
|
||||
{ FBSineN.ar(SampleRate.ir, 1, 0, XLine.kr(1, 2, 10), 0.1) * 0.2 }.play(s);</pre>
|
||||
<pre class='code prettyprint lang-sc'>// modulate frequency and index multiplier
|
||||
{ FBSineN.ar(LFNoise2.kr(1, 1e4, 1e4), LFNoise2.kr(1,16,17), 1, 1.005, 0.7) * 0.2 }.play(s);</pre>
|
||||
<pre class='code prettyprint lang-sc'>// randomly modulate params
|
||||
(
|
||||
{ FBSineN.ar(
|
||||
LFNoise2.kr(1, 1e4, 1e4),
|
||||
LFNoise2.kr(1, 32, 33),
|
||||
LFNoise2.kr(1, 0.5),
|
||||
LFNoise2.kr(1, 0.05, 1.05),
|
||||
LFNoise2.kr(1, 0.3, 0.3)
|
||||
) * 0.2 }.play(s);
|
||||
)</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FBSineN.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FBSineN.schelp</a><br>link::Classes/FBSineN::<br>sc version: 3.8.0</div></div></body></html>
|
235
doc-schelp/Help-3.12.2/Classes/FM7.html
Normal file
|
@ -0,0 +1,235 @@
|
|||
<!doctype html><html lang='en'><head><title>FM7 | 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 = 'FM7';
|
||||
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'>FM7:</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='toc3'><a href='#*arAlgo'>arAlgo</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='#*algoSpec'>algoSpec</a> </li>
|
||||
<li class='toc3'><a href='#*controlArraySize'>controlArraySize</a> </li>
|
||||
<li class='toc3'><a href='#*controlMatrix'>controlMatrix</a> </li>
|
||||
<li class='toc3'><a href='#*modArraySize'>modArraySize</a> </li>
|
||||
<li class='toc3'><a href='#*modMatrix'>modMatrix</a> </li>
|
||||
<li class='toc3'><a href='#*numControls'>numControls</a> </li>
|
||||
<li class='toc3'><a href='#*numOperators'>numOperators</a> </li>
|
||||
<li class='toc3'><a href='#*numRequiredInputs'>numRequiredInputs</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 (extension)</span>
|
||||
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>FM7<span id='superclasses'> : <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></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'>Phase modulation oscillator matrix.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/SkUGens/FM7.sc' title='/Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/SkUGens/FM7.sc'>FM7.sc</a></div></div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>FM7 implements a 6x6 oscillator matrix, where each oscillator's phase can be modulated by any of the other oscillators' output.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>ctlMatrix</span>, <span class='argstr'>modMatrix</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>The UGen expects two matrices: one for oscillator parameter control, one for phase modulation. It outputs six channels, one for each oscillator. To select specific outputs, you can use array methods like <code>at(indices)</code> or <code>slice(indices)</code>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>ctlMatrix<td class='argumentdesc'>
|
||||
<p>specifies the three parameters <strong>frequency</strong> (can be modulated at control rate), <strong>phase</strong> (set at initialization only) and <strong>amplitude</strong>.(control rate):<textarea class='editor'>// freq, phase, amp
|
||||
[ [ 300, 0, 1 ],
|
||||
[ 400, pi/2, 1 ],
|
||||
[ 730, 0, 0.5 ],
|
||||
[ 0, 0, 0 ],
|
||||
[ 0, 0, 0 ],
|
||||
[ 0, 0, 0 ] ]</textarea>
|
||||
<tr><td class='argumentname'>modMatrix<td class='argumentdesc'>
|
||||
<p>The modulation matrix specifies the amount of modulation each oscillator output has on another oscillator's phase. Row i in the matrix refer to oscillator i's phase input and the columns denote the amount of phase modulation in radians.
|
||||
<p>The UGen outputs the six individual oscillator signals.<textarea class='editor'>(
|
||||
{
|
||||
var ctls, mods, chans;
|
||||
ctls = [
|
||||
// freq, phase, amp
|
||||
[LFNoise1.kr(0.5).range(300, 310), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 310), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1]
|
||||
];
|
||||
mods = [
|
||||
[Line.kr(0, 0.001, 2), Line.kr(0.1, 0, 4), 0, MouseY.kr(0, 6), 0, 0],
|
||||
[MouseX.kr(0, 6), 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0]
|
||||
];
|
||||
chans = [0, 1];
|
||||
FM7.ar(ctls, mods).slice(chans) * -12.dbamp; // using "slice" to select specific channels
|
||||
}.play;
|
||||
)</textarea>
|
||||
</table></div><h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*arAlgo' href='./../Overviews/Methods.html#arAlgo'>arAlgo</a>(<span class='argstr'>algo: 0</span>, <span class='argstr'>ctlMatrix</span>, <span class='argstr'>feedback: 0.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Provided a number for a wiring (called 'algorithm' in the FM-world), returns an instance that has this setup. All 32 algorithms from the DX7 are implemented.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>algo<td class='argumentdesc'>
|
||||
<p>The id of the algorithms [0..31]
|
||||
<p>the algo argument chooses the algorithm when the ugen is instantiated. It cannot be modulated.<tr><td class='argumentname'>ctlMatrix<td class='argumentdesc'>
|
||||
<p>See above.<tr><td class='argumentname'>feedback<td class='argumentdesc'>
|
||||
<p>One global parameter used in all places where the interconnections result in feedback.<textarea class='editor'>(
|
||||
{
|
||||
var ctls = [
|
||||
// freq, phase, amp
|
||||
[LFNoise1.kr(0.5).range(300, 310), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 310), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1],
|
||||
[LFNoise1.kr(0.5).exprange(3, 100), 0, 1]
|
||||
];
|
||||
FM7.arAlgo(1, ctls, MouseX.kr(0, 2))
|
||||
}.play
|
||||
|
||||
)</textarea>
|
||||
</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'>FM7.</span><a class='method-name' name='*algoSpec' href='./../Overviews/Methods.html#algoSpec'>algoSpec</a>(<span class='argstr'>algo</span>, <span class='argstr'>feedback: 0.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*controlArraySize' href='./../Overviews/Methods.html#controlArraySize'>controlArraySize</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*controlMatrix' href='./../Overviews/Methods.html#controlMatrix'>controlMatrix</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*modArraySize' href='./../Overviews/Methods.html#modArraySize'>modArraySize</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*modMatrix' href='./../Overviews/Methods.html#modMatrix'>modMatrix</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*numControls' href='./../Overviews/Methods.html#numControls'>numControls</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*numOperators' href='./../Overviews/Methods.html#numOperators'>numOperators</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FM7.</span><a class='method-name' name='*numRequiredInputs' href='./../Overviews/Methods.html#numRequiredInputs'>numRequiredInputs</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'>(
|
||||
{
|
||||
var ctls, mods, chans, freq;
|
||||
freq = LFNoise0.kr(3).exprange(200, 310);
|
||||
ctls = [
|
||||
// freq, phase, amp
|
||||
[freq, 0, 1],
|
||||
[freq, 0, 1],
|
||||
[LFNoise2.kr(0.5).exprange(3, 80), 0, 1],
|
||||
[LFNoise2.kr(0.5).exprange(3, 800), 0, 1],
|
||||
[LFNoise2.kr(0.5).exprange(3, 800), 0, 1],
|
||||
[LFNoise2.kr(0.5).exprange(0.3, 10), 0, 1]
|
||||
];
|
||||
mods = [
|
||||
{ LFNoise1.kr(0.5).max(0) } ! 6 * MouseX.kr(0, 3),
|
||||
{ LFNoise1.kr(0.5).max(0) } ! 6 * MouseY.kr(0, 3),
|
||||
{ LFNoise1.kr(0.5).max(0) } ! 6 * MouseY.kr(0, 3),
|
||||
{ LFNoise1.kr(0.5).max(0) } ! 6 * MouseX.kr(0, 3),
|
||||
{ LFNoise1.kr(0.5).max(0) } ! 6 * MouseY.kr(0, 3),
|
||||
{ LFNoise1.kr(0.5).max(0) } ! 6 * MouseY.kr(0, 3)
|
||||
];
|
||||
chans = FM7.ar(ctls, mods).slice([0, 1]) * -12.dbamp;
|
||||
}.play;
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
// Courtesy Fredrik Olofsson (2008)
|
||||
Routine.run{
|
||||
var syn, time = 3; // Allow each patch to run for 16sec / 8bars
|
||||
inf.do{|i|
|
||||
("// FM7 patch"+i).post;
|
||||
syn= ("
|
||||
(
|
||||
var x= #"++({{{ |i| rrand(0.5, 1.5).round(0.5)}!4}!3}!6).asCompileString++";
|
||||
var y= #"++({{{ |i| rrand(0.2, 1.6).round(0.5)}!4}!6}!6).asCompileString++";
|
||||
{
|
||||
var ctls= x.collect{|a| a.collect{|b| LFSaw.kr(*b)}};
|
||||
var mods= y.collect{|a| a.collect{|b| LFPar.kr(*b)}};
|
||||
var chans= #[0, 1];
|
||||
FM7.ar(ctls, mods).slice(chans)*0.5;
|
||||
}.play)").postln.interpret;
|
||||
time.wait;
|
||||
syn.free;
|
||||
};
|
||||
};
|
||||
)
|
||||
|
||||
(
|
||||
// Courtesy Fredrik Olofsson (2008), edited by <sk>
|
||||
// FM7 patch 4 generated on Thu Jun 26 18:27:12 2008
|
||||
(
|
||||
var x= #[ [ [ 0.0, -0.33333333333333, -1.0, 0.0 ], [ 0.75, 0.75, 0.0, -0.5 ], [ -0.5, -0.25, 0.25, -0.75 ], [ -0.5, 1.0, 1.0, 1.0 ], [ 0.0, 0.16666666666667, -0.75, -1.0 ], [ 0.5, 0.5, -0.5, 0.33333333333333 ] ], [ [ -0.33333333333333, 0.5, -0.5, -0.5 ], [ 0.5, 0.75, 0.25, 0.75 ], [ -0.83333333333333, 0.25, -1.0, 0.5 ], [ 1.5, 0.25, 0.25, -0.25 ], [ -0.66666666666667, -0.66666666666667, -1.0, -0.5 ], [ -1.0, 0.0, -0.83333333333333, -0.33333333333333 ] ], [ [ 0.25, -0.5, -0.5, -1.0 ], [ -0.5, 1.0, -1.5, 0.0 ], [ -1.0, -1.5, -0.5, 0.0 ], [ 0.5, -1.0, 1.1666666666667, -0.5 ], [ 0.83333333333333, -0.75, -1.5, 0.5 ], [ 0.25, -1.0, 0.5, 1.0 ] ], [ [ 1.0, 0.33333333333333, 0.0, -0.75 ], [ -0.25, 0.0, 0.0, -0.5 ], [ -0.5, -0.5, 0.0, 0.5 ], [ 1.0, 0.75, 0.5, 0.5 ], [ 0.0, 1.5, -0.5, 0.0 ], [ 1.0, 0.0, -0.25, -0.5 ] ], [ [ 0.5, -0.25, 0.0, 0.33333333333333 ], [ 0.25, -0.75, 0.33333333333333, -1.0 ], [ -0.25, -0.5, 0.25, -1.1666666666667 ], [ 0.0, 0.25, 0.5, 0.16666666666667 ], [ -1.0, -0.5, 0.83333333333333, -0.5 ], [ 0.83333333333333, -0.75, -0.5, 0.0 ] ], [ [ 0.0, -0.75, -0.16666666666667, 0.0 ], [ 1.0, 0.5, 0.5, 0.0 ], [ -0.5, 0.0, -0.5, 0.0 ], [ -0.5, -0.16666666666667, 0.0, 0.5 ], [ -0.25, 0.16666666666667, -0.75, 0.25 ], [ -1.1666666666667, -1.3333333333333, -0.16666666666667, 1.5 ] ] ];
|
||||
var y= #[ [ [ 0.0, -0.5, 1.0, 0.0 ], [ -0.5, 1.0, 0.5, -0.5 ], [ 0.0, 0.33333333333333, 1.0, 1.0 ] ], [ [ -0.5, 0.5, 1.0, 1.0 ], [ 0.0, 0.33333333333333, 0.0, 1.5 ], [ -0.5, 0.83333333333333, 1.0, 0.0 ] ], [ [ 0.25, -0.66666666666667, 0.25, 0.0 ], [ 0.5, -0.5, -0.5, -0.5 ], [ 0.5, -0.5, -0.75, 0.83333333333333 ] ], [ [ -0.25, 1.0, 0.0, 0.33333333333333 ], [ -1.25, -0.25, 0.5, 0.0 ], [ 0.0, -1.25, -0.25, -0.5 ] ], [ [ 0.75, -0.25, 1.5, 0.0 ], [ 0.25, -1.5, 0.5, 0.5 ], [ -0.5, -0.5, -0.5, -0.25 ] ], [ [ 0.0, 0.5, -0.5, 0.25 ], [ 0.25, 0.5, -0.33333333333333, 0.0 ], [ 1.0, 0.5, -0.16666666666667, 0.5 ] ] ];
|
||||
{
|
||||
var ctls= x.collect{|a| a.collect{|b| SinOsc.ar(*b)}};
|
||||
var mods= y.collect{|a| a.collect{|b| Pulse.ar(*b)}};
|
||||
var chans= #[0, 1, 2, 4, 5];
|
||||
(FM7.ar(ctls, mods).slice(chans) * [1, 1, LFSaw.kr(0.1).range(0, -12.dbamp), 1, -3.dbamp]).clump(2).sum*0.5;
|
||||
}.play)
|
||||
)
|
||||
|
||||
(
|
||||
// Courtesy Fredrik Olofsson (2008), edited by <sk>
|
||||
// FM7 patch 4 generated on Thu Jun 26 18:27:12 2008
|
||||
(
|
||||
var x= #[ [ [ 0.0, -0.33333333333333, -1.0, 0.0 ], [ 0.75, 0.75, 0.0, -0.5 ], [ -0.5, -0.25, 0.25, -0.75 ], [ -0.5, 1.0, 1.0, 1.0 ], [ 0.0, 0.16666666666667, -0.75, -1.0 ], [ 0.5, 0.5, -0.5, 0.33333333333333 ] ], [ [ -0.33333333333333, 0.5, -0.5, -0.5 ], [ 0.5, 0.75, 0.25, 0.75 ], [ -0.83333333333333, 0.25, -1.0, 0.5 ], [ 1.5, 0.25, 0.25, -0.25 ], [ -0.66666666666667, -0.66666666666667, -1.0, -0.5 ], [ -1.0, 0.0, -0.83333333333333, -0.33333333333333 ] ], [ [ 0.25, -0.5, -0.5, -1.0 ], [ -0.5, 1.0, -1.5, 0.0 ], [ -1.0, -1.5, -0.5, 0.0 ], [ 0.5, -1.0, 1.1666666666667, -0.5 ], [ 0.83333333333333, -0.75, -1.5, 0.5 ], [ 0.25, -1.0, 0.5, 1.0 ] ], [ [ 1.0, 0.33333333333333, 0.0, -0.75 ], [ -0.25, 0.0, 0.0, -0.5 ], [ -0.5, -0.5, 0.0, 0.5 ], [ 1.0, 0.75, 0.5, 0.5 ], [ 0.0, 1.5, -0.5, 0.0 ], [ 1.0, 0.0, -0.25, -0.5 ] ], [ [ 0.5, -0.25, 0.0, 0.33333333333333 ], [ 0.25, -0.75, 0.33333333333333, -1.0 ], [ -0.25, -0.5, 0.25, -1.1666666666667 ], [ 0.0, 0.25, 0.5, 0.16666666666667 ], [ -1.0, -0.5, 0.83333333333333, -0.5 ], [ 0.83333333333333, -0.75, -0.5, 0.0 ] ], [ [ 0.0, -0.75, -0.16666666666667, 0.0 ], [ 1.0, 0.5, 0.5, 0.0 ], [ -0.5, 0.0, -0.5, 0.0 ], [ -0.5, -0.16666666666667, 0.0, 0.5 ], [ -0.25, 0.16666666666667, -0.75, 0.25 ], [ -1.1666666666667, -1.3333333333333, -0.16666666666667, 1.5 ] ] ];
|
||||
var y= #[ [ [ 0.0, -0.5, 1.0, 0.0 ], [ -0.5, 1.0, 0.5, -0.5 ], [ 0.0, 0.33333333333333, 1.0, 1.0 ] ], [ [ -0.5, 0.5, 1.0, 1.0 ], [ 0.0, 0.33333333333333, 0.0, 1.5 ], [ -0.5, 0.83333333333333, 1.0, 0.0 ] ], [ [ 0.25, -0.66666666666667, 0.25, 0.0 ], [ 0.5, -0.5, -0.5, -0.5 ], [ 0.5, -0.5, -0.75, 0.83333333333333 ] ], [ [ -0.25, 1.0, 0.0, 0.33333333333333 ], [ -1.25, -0.25, 0.5, 0.0 ], [ 0.0, -1.25, -0.25, -0.5 ] ], [ [ 0.75, -0.25, 1.5, 0.0 ], [ 0.25, -1.5, 0.5, 0.5 ], [ -0.5, -0.5, -0.5, -0.25 ] ], [ [ 0.0, 0.5, -0.5, 0.25 ], [ 0.25, 0.5, -0.33333333333333, 0.0 ], [ 1.0, 0.5, -0.16666666666667, 0.5 ] ] ];
|
||||
{
|
||||
var ctls= x.collect{|a| a.collect{|b| SinOsc.ar(*b)}};
|
||||
var mods= y.collect{|a| a.collect{|b| Pulse.ar(*b)}};
|
||||
var chans= #[0, 1, 2, 4, 5];
|
||||
(Fold.ar(FM7.ar(ctls, mods), -0.2, 0.8).slice(chans) * [1, 1, LFSaw.kr(0.1).range(0, -12.dbamp), 1, -3.dbamp]).clump(2).sum*0.5;
|
||||
}.play)
|
||||
)
|
||||
|
||||
(
|
||||
// Courtesy Fredrik Olofsson (2008), edited by <sk>
|
||||
// FM7 patch 4 generated on Thu Jun 26 18:27:12 2008
|
||||
(
|
||||
var x= #[ [ [ 0.0, -0.33333333333333, -1.0, 0.0 ], [ 0.75, 0.75, 0.0, -0.5 ], [ -0.5, -0.25, 0.25, -0.75 ], [ -0.5, 1.0, 1.0, 1.0 ], [ 0.0, 0.16666666666667, -0.75, -1.0 ], [ 0.5, 0.5, -0.5, 0.33333333333333 ] ], [ [ -0.33333333333333, 0.5, -0.5, -0.5 ], [ 0.5, 0.75, 0.25, 0.75 ], [ -0.83333333333333, 0.25, -1.0, 0.5 ], [ 1.5, 0.25, 0.25, -0.25 ], [ -0.66666666666667, -0.66666666666667, -1.0, -0.5 ], [ -1.0, 0.0, -0.83333333333333, -0.33333333333333 ] ], [ [ 0.25, -0.5, -0.5, -1.0 ], [ -0.5, 1.0, -1.5, 0.0 ], [ -1.0, -1.5, -0.5, 0.0 ], [ 0.5, -1.0, 1.1666666666667, -0.5 ], [ 0.83333333333333, -0.75, -1.5, 0.5 ], [ 0.25, -1.0, 0.5, 1.0 ] ], [ [ 1.0, 0.33333333333333, 0.0, -0.75 ], [ -0.25, 0.0, 0.0, -0.5 ], [ -0.5, -0.5, 0.0, 0.5 ], [ 1.0, 0.75, 0.5, 0.5 ], [ 0.0, 1.5, -0.5, 0.0 ], [ 1.0, 0.0, -0.25, -0.5 ] ], [ [ 0.5, -0.25, 0.0, 0.33333333333333 ], [ 0.25, -0.75, 0.33333333333333, -1.0 ], [ -0.25, -0.5, 0.25, -1.1666666666667 ], [ 0.0, 0.25, 0.5, 0.16666666666667 ], [ -1.0, -0.5, 0.83333333333333, -0.5 ], [ 0.83333333333333, -0.75, -0.5, 0.0 ] ], [ [ 0.0, -0.75, -0.16666666666667, 0.0 ], [ 1.0, 0.5, 0.5, 0.0 ], [ -0.5, 0.0, -0.5, 0.0 ], [ -0.5, -0.16666666666667, 0.0, 0.5 ], [ -0.25, 0.16666666666667, -0.75, 0.25 ], [ -1.1666666666667, -1.3333333333333, -0.16666666666667, 1.5 ] ] ];
|
||||
var y= #[ [ [ 0.0, -0.5, 1.0, 0.0 ], [ -0.5, 1.0, 0.5, -0.5 ], [ 0.0, 0.33333333333333, 1.0, 1.0 ] ], [ [ -0.5, 0.5, 1.0, 1.0 ], [ 0.0, 0.33333333333333, 0.0, 1.5 ], [ -0.5, 0.83333333333333, 1.0, 0.0 ] ], [ [ 0.25, -0.66666666666667, 0.25, 0.0 ], [ 0.5, -0.5, -0.5, -0.5 ], [ 0.5, -0.5, -0.75, 0.83333333333333 ] ], [ [ -0.25, 1.0, 0.0, 0.33333333333333 ], [ -1.25, -0.25, 0.5, 0.0 ], [ 0.0, -1.25, -0.25, -0.5 ] ], [ [ 0.75, -0.25, 1.5, 0.0 ], [ 0.25, -1.5, 0.5, 0.5 ], [ -0.5, -0.5, -0.5, -0.25 ] ], [ [ 0.0, 0.5, -0.5, 0.25 ], [ 0.25, 0.5, -0.33333333333333, 0.0 ], [ 1.0, 0.5, -0.16666666666667, 0.5 ] ] ];
|
||||
{
|
||||
var ctls= x.collect{|a| a.collect{|b| SinOsc.ar(*b+LFNoise0.kr(0.5).range(-0.007,0.005))}};
|
||||
var mods= y.collect{|a| a.collect{|b| Pulse.ar(*b)}};
|
||||
var chans= #[0, 1, 2, 4, 5].scramble;
|
||||
(FM7.ar(ctls, mods).slice(chans) * [1, 1, LFSaw.kr(0.1).range(0, -12.dbamp), 1, -3.dbamp]).clump(2).sum*0.5;
|
||||
}.play)
|
||||
)
|
||||
|
||||
(
|
||||
// Courtesy Fredrik Olofsson (2008), edited by <sk>
|
||||
// FM7 patch 4 generated on Thu Jun 26 18:27:12 2008
|
||||
(
|
||||
var x= #[ [ [ 0.0, -0.33333333333333, -1.0, 0.0 ], [ 0.75, 0.75, 0.0, -0.5 ], [ -0.5, -0.25, 0.25, -0.75 ], [ -0.5, 1.0, 1.0, 1.0 ], [ 0.0, 0.16666666666667, -0.75, -1.0 ], [ 0.5, 0.5, -0.5, 0.33333333333333 ] ], [ [ -0.33333333333333, 0.5, -0.5, -0.5 ], [ 0.5, 0.75, 0.25, 0.75 ], [ -0.83333333333333, 0.25, -1.0, 0.5 ], [ 1.5, 0.25, 0.25, -0.25 ], [ -0.66666666666667, -0.66666666666667, -1.0, -0.5 ], [ -1.0, 0.0, -0.83333333333333, -0.33333333333333 ] ], [ [ 0.25, -0.5, -0.5, -1.0 ], [ -0.5, 1.0, -1.5, 0.0 ], [ -1.0, -1.5, -0.5, 0.0 ], [ 0.5, -1.0, 1.1666666666667, -0.5 ], [ 0.83333333333333, -0.75, -1.5, 0.5 ], [ 0.25, -1.0, 0.5, 1.0 ] ], [ [ 1.0, 0.33333333333333, 0.0, -0.75 ], [ -0.25, 0.0, 0.0, -0.5 ], [ -0.5, -0.5, 0.0, 0.5 ], [ 1.0, 0.75, 0.5, 0.5 ], [ 0.0, 1.5, -0.5, 0.0 ], [ 1.0, 0.0, -0.25, -0.5 ] ], [ [ 0.5, -0.25, 0.0, 0.33333333333333 ], [ 0.25, -0.75, 0.33333333333333, -1.0 ], [ -0.25, -0.5, 0.25, -1.1666666666667 ], [ 0.0, 0.25, 0.5, 0.16666666666667 ], [ -1.0, -0.5, 0.83333333333333, -0.5 ], [ 0.83333333333333, -0.75, -0.5, 0.0 ] ], [ [ 0.0, -0.75, -0.16666666666667, 0.0 ], [ 1.0, 0.5, 0.5, 0.0 ], [ -0.5, 0.0, -0.5, 0.0 ], [ -0.5, -0.16666666666667, 0.0, 0.5 ], [ -0.25, 0.16666666666667, -0.75, 0.25 ], [ -1.1666666666667, -1.3333333333333, -0.16666666666667, 1.5 ] ] ];
|
||||
var y= #[ [ [ 0.0, -0.5, 1.0, 0.0 ], [ -0.5, 1.0, 0.5, -0.5 ], [ 0.0, 0.33333333333333, 1.0, 1.0 ] ], [ [ -0.5, 0.5, 1.0, 1.0 ], [ 0.0, 0.33333333333333, 0.0, 1.5 ], [ -0.5, 0.83333333333333, 1.0, 0.0 ] ], [ [ 0.25, -0.66666666666667, 0.25, 0.0 ], [ 0.5, -0.5, -0.5, -0.5 ], [ 0.5, -0.5, -0.75, 0.83333333333333 ] ], [ [ -0.25, 1.0, 0.0, 0.33333333333333 ], [ -1.25, -0.25, 0.5, 0.0 ], [ 0.0, -1.25, -0.25, -0.5 ] ], [ [ 0.75, -0.25, 1.5, 0.0 ], [ 0.25, -1.5, 0.5, 0.5 ], [ -0.5, -0.5, -0.5, -0.25 ] ], [ [ 0.0, 0.5, -0.5, 0.25 ], [ 0.25, 0.5, -0.33333333333333, 0.0 ], [ 1.0, 0.5, -0.16666666666667, 0.5 ] ] ];
|
||||
{
|
||||
var ctls= x.collect{|a| a.collect{|b| VarSaw.ar(*b)}};
|
||||
var mods= y.collect{|a| a.collect{|b| VarSaw.ar(*b)}};
|
||||
var chans= #[0, 1, 5, 4, 2];
|
||||
(Fold.ar(FM7.ar(ctls, mods).slice(chans), -0.3, 0.8) * [1, 1, 1, 1, LFPar.kr(0.05).range(-40.dbamp, -60.dbamp)]).clump(2).sum;
|
||||
}.play)
|
||||
)</textarea>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/SkUGens/HelpSource/Classes/FM7.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/SC3plugins/SkUGens/HelpSource/Classes/FM7.schelp</a><br>link::Classes/FM7::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
61
doc-schelp/Help-3.12.2/Classes/FSinOsc.html
Normal file
|
@ -0,0 +1,61 @@
|
|||
<!doctype html><html lang='en'><head><title>FSinOsc | 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 = 'FSinOsc';
|
||||
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'>FSinOsc:</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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>FSinOsc<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'>Fast sine 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/SinOsc.html">SinOsc</a>, <a href="./../Classes/SinOscFB.html">SinOscFB</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Very fast sine wave generator (2 PowerPC instructions per output sample!) implemented using a ringing filter. This generates a much cleaner sine wave than a table lookup oscillator and is a lot faster. However, the amplitude of the wave will vary with frequency. Generally the amplitude will go down as you raise the frequency and go up as you lower the frequency.<div class='warning'><span class='warninglabel'>WARNING:</span> In the current implementation, the amplitude can blow up if the frequency is modulated by certain alternating signals.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>FSinOsc.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>freq: 440</span>, <span class='argstr'>iphase: 0</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>FSinOsc.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>freq: 440</span>, <span class='argstr'>iphase: 0</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'>freq<td class='argumentdesc'>
|
||||
<p>Frequency in Hertz.<tr><td class='argumentname'>iphase<td class='argumentdesc'>
|
||||
<p>Initial phase offset.<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'>{ FSinOsc.ar(800) * 0.2 }.play;
|
||||
|
||||
{ FSinOsc.ar(XLine.kr(200, 4000, 1)) * 0.2 }.play;
|
||||
|
||||
// loses amplitude towards the end
|
||||
{ FSinOsc.ar(FSinOsc.ar(XLine.kr(4, 401, 8), 0.0, 200, 800)) * 0.2 }.play;</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FSinOsc.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FSinOsc.schelp</a><br>link::Classes/FSinOsc::<br></div></div></body></html>
|
70
doc-schelp/Help-3.12.2/Classes/Formant.html
Normal file
|
@ -0,0 +1,70 @@
|
|||
<!doctype html><html lang='en'><head><title>Formant | 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 = 'Formant';
|
||||
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'>Formant:</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</span>
|
||||
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>Formant<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'>Formant 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>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Generates a set of harmonics around a formant frequency at a given fundamental frequency.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Formant.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>fundfreq: 440.0</span>, <span class='argstr'>formfreq: 1760.0</span>, <span class='argstr'>bwfreq: 880.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'>fundfreq<td class='argumentdesc'>
|
||||
<p>Fundamental frequency in Hertz. (control rate)<tr><td class='argumentname'>formfreq<td class='argumentdesc'>
|
||||
<p>Formant frequency in Hertz. (control rate)<tr><td class='argumentname'>bwfreq<td class='argumentdesc'>
|
||||
<p>Pulse width frequency in Hertz. Controls the bandwidth of the formant. (control rate)
|
||||
<p>Must be greater than or equal to <code>fundfreq</code>.<tr><td class='argumentname'>mul<td class='argumentdesc'><tr><td class='argumentname'>add<td class='argumentdesc'></table><h4>Discussion:</h4>
|
||||
|
||||
<p>The frequency inputs are read at control rate only, so if you use an audio rate UGen as an input, it will only be sampled at the start of each audio synthesis block.</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'>// modulate fundamental frequency, formant freq stays constant
|
||||
{ Formant.ar(XLine.kr(400,1000, 8), 2000, 800, 0.125) }.play
|
||||
|
||||
// modulate formant frequency, fundamental freq stays constant
|
||||
{ Formant.ar(200, XLine.kr(400, 4000, 8), 200, 0.125) }.play
|
||||
|
||||
// modulate width frequency, other freqs stay constant
|
||||
{ Formant.ar(400, 2000, XLine.kr(800, 8000, 8), 0.125) }.play</textarea>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Formant.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Formant.schelp</a><br>link::Classes/Formant::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
97
doc-schelp/Help-3.12.2/Classes/FreeSelfWhenDone.html
Normal file
|
@ -0,0 +1,97 @@
|
|||
<!doctype html><html lang='en'><head><title>FreeSelfWhenDone | 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 = 'FreeSelfWhenDone';
|
||||
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'>FreeSelfWhenDone:</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='#*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> > <a href='./../Browse.html#UGens>Synth control'>Synth control</a></span>
|
||||
</div><h1>FreeSelfWhenDone<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'>Free the enclosing synth when a UGen is finished</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/EnvGen.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/EnvGen.sc'>EnvGen.sc</a></div><div id='related'>See also: <a href="./../Classes/Done.html">Done</a>, <a href="./../Classes/PauseSelfWhenDone.html">PauseSelfWhenDone</a>, <a href="./../Classes/Done.html">Done</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Some UGens set a 'done' flag when they are finished playing. FreeSelfWhenDone will free the enclosing synth when this flag is set to true.
|
||||
<p>See <a href="./../Classes/Done.html">Done</a> for a complete list of these UGens.
|
||||
<p>Note that many of these UGens have doneActions, which are another way of accomplishing the same thing. See <a href="./../Classes/Done.html">Done</a> for more detail.<div class='note'><span class='notelabel'>NOTE:</span> One must be careful when using binary operations on UGens with done flags, as these will return a <a href="./../Classes/BinaryOpUGen.html">BinaryOpUGen</a>, and thus prevent the done flag from being accessible. See example below.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>FreeSelfWhenDone.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>src</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>src<td class='argumentdesc'>
|
||||
<p>the UGen to check for done.</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'>s.boot;
|
||||
|
||||
// simple example
|
||||
(
|
||||
{ var env;
|
||||
env = Line.kr(0, 1, 1);
|
||||
FreeSelfWhenDone.kr(env); // free synth at end of line
|
||||
SinOsc.ar(200, 0, 0.5) * env
|
||||
}.play;
|
||||
)
|
||||
|
||||
// the previous example works, because FreeSelfWhenDone operates on the Line
|
||||
// this version won't work
|
||||
(
|
||||
{ var env, output;
|
||||
env = Line.kr(0, 1, 1);
|
||||
output = SinOsc.ar(200, 0, 0.5) * env;
|
||||
output.postln; // output is a BinaryOpUGen, which has no 'done' flag
|
||||
FreeSelfWhenDone.kr(output); // won't ever be done
|
||||
output
|
||||
}.play;
|
||||
)
|
||||
|
||||
// record for four seconds
|
||||
b = Buffer.alloc(s, 44100 * 4.0, 1);
|
||||
(
|
||||
SynthDef("help-RecordBuf",{ arg out=0,bufnum=0;
|
||||
var formant, recbuf;
|
||||
formant = Formant.ar(XLine.kr(400,1000, 4), 2000, 800, 0.125);
|
||||
recbuf = RecordBuf.ar(formant, bufnum, recLevel: Line.kr(1, 1), loop: 0);
|
||||
// The RecordBuf doesn't loop, so you can check it for 'done' status
|
||||
FreeSelfWhenDone.kr(recbuf);
|
||||
}).play(s,[\out, 0, \bufnum, b]);
|
||||
)
|
||||
|
||||
// play it back
|
||||
(
|
||||
SynthDef("help-RecordBuf play",{ arg out=0,bufnum=0;
|
||||
var playbuf;
|
||||
playbuf = PlayBuf.ar(1,bufnum);
|
||||
FreeSelfWhenDone.kr(playbuf); // frees the synth when the PlayBuf is finished
|
||||
Out.ar(out, playbuf);
|
||||
}).play(s,[\out, 0, \bufnum, b]);
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FreeSelfWhenDone.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FreeSelfWhenDone.schelp</a><br>link::Classes/FreeSelfWhenDone::<br></div></div></body></html>
|
100
doc-schelp/Help-3.12.2/Classes/FreeVerb2.html
Normal file
|
@ -0,0 +1,100 @@
|
|||
<!doctype html><html lang='en'><head><title>FreeVerb2 | 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 = 'FreeVerb2';
|
||||
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'>FreeVerb2:</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 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> > <a href='./../Browse.html#UGens>Reverbs'>Reverbs</a></span>
|
||||
</div><h1>FreeVerb2<span id='superclasses'> : <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></span>
|
||||
</h1>
|
||||
<div id='summary'>A two-channel reverb</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/FreeVerb.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/FreeVerb.sc'>FreeVerb.sc</a></div><div id='related'>See also: <a href="./../Classes/FreeVerb.html">FreeVerb</a>, <a href="./../Classes/GVerb.html">GVerb</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Coded from experiments with faust.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>FreeVerb2.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in</span>, <span class='argstr'>in2</span>, <span class='argstr'>mix: 0.33</span>, <span class='argstr'>room: 0.5</span>, <span class='argstr'>damp: 0.5</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 channel 1.<tr><td class='argumentname'>in2<td class='argumentdesc'>
|
||||
<p>input signal channel 2.<tr><td class='argumentname'>mix<td class='argumentdesc'>
|
||||
<p>dry/wet balance. range 0..1.<tr><td class='argumentname'>room<td class='argumentdesc'>
|
||||
<p>room size. rage 0..1.<tr><td class='argumentname'>damp<td class='argumentdesc'>
|
||||
<p>Reverb HF damp. range 0..1.<tr><td class='argumentname'>mul<td class='argumentdesc'><tr><td class='argumentname'>add<td class='argumentdesc'></table><h4>Discussion:</h4>
|
||||
|
||||
<p>Valid parameter range from 0 to 1. Values outside this range are clipped by the UGen.</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'>s.boot;
|
||||
|
||||
// FreeVerb2 - demo synthdef
|
||||
(
|
||||
SynthDef(\FreeVerb2x2, { |out, mix = 0.25, room = 0.15, damp = 0.5, amp = 1.0|
|
||||
var signal;
|
||||
|
||||
signal = In.ar(out, 2);
|
||||
|
||||
ReplaceOut.ar(out,
|
||||
FreeVerb2.ar( // FreeVerb2 - true stereo UGen
|
||||
signal[0], // Left channel
|
||||
signal[1], // Right Channel
|
||||
mix, room, damp, amp
|
||||
)
|
||||
); // same params as FreeVerb 1 chn version
|
||||
|
||||
}).add;
|
||||
)
|
||||
|
||||
// 2ch source
|
||||
(
|
||||
a = SynthDef(\src2x2, { |out|
|
||||
Out.ar(out,
|
||||
Decay.ar(Impulse.ar(1), 0.25, LFCub.ar(1200, 0, 0.1)) ! 2
|
||||
+
|
||||
Pan2.ar(
|
||||
Decay.ar(Impulse.ar(1, pi), 0.1, WhiteNoise.ar(0.1)),
|
||||
LFNoise1.kr(0.5).range(-1, 1)
|
||||
)
|
||||
)
|
||||
}).play
|
||||
)
|
||||
|
||||
// kick it in
|
||||
z = Synth(\FreeVerb2x2, [\outbus, 0], addAction:\addToTail)
|
||||
// experiment with some settings
|
||||
z.set(\room, 0.7)
|
||||
z.set(\mix, 0.33)
|
||||
z.set(\damp, 0.9)
|
||||
|
||||
// silence
|
||||
[a, z].do(_.free)</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FreeVerb2.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FreeVerb2.schelp</a><br>link::Classes/FreeVerb2::<br></div></div></body></html>
|
524
doc-schelp/Help-3.12.2/Classes/Function.html
Normal file
|
@ -0,0 +1,524 @@
|
|||
<!doctype html><html lang='en'><head><title>Function | 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 = 'Function';
|
||||
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'>Function:</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='#Related%20Keywords'>Related Keywords</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#.thisFunction'>thisFunction</a> </li>
|
||||
</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>
|
||||
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Access'>Access</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-def'>def</a> </li>
|
||||
<li class='toc3'><a href='#-isClosed'>isClosed</a> </li>
|
||||
</ul><li class='toc2'><a href='#Evaluation'>Evaluation</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-value'>value</a> </li>
|
||||
<li class='toc3'><a href='#-valueArray'>valueArray</a> </li>
|
||||
<li class='toc3'><a href='#-valueEnvir'>valueEnvir</a> </li>
|
||||
<li class='toc3'><a href='#-valueArrayEnvir'>valueArrayEnvir</a> </li>
|
||||
<li class='toc3'><a href='#-valueWithEnvir'>valueWithEnvir</a> </li>
|
||||
<li class='toc3'><a href='#-functionPerformList'>functionPerformList</a> </li>
|
||||
<li class='toc3'><a href='#-performWithEnvir'>performWithEnvir</a> </li>
|
||||
<li class='toc3'><a href='#-performKeyValuePairs'>performKeyValuePairs</a> </li>
|
||||
<li class='toc3'><a href='#-loop'>loop</a> </li>
|
||||
<li class='toc3'><a href='#-defer'>defer</a> </li>
|
||||
<li class='toc3'><a href='#-dup'>dup</a> </li>
|
||||
<li class='toc3'><a href='#-!'>!</a> </li>
|
||||
<li class='toc3'><a href='#-sum'>sum</a> </li>
|
||||
<li class='toc3'><a href='#-choose'>choose</a> </li>
|
||||
<li class='toc3'><a href='#-bench'>bench</a> </li>
|
||||
<li class='toc3'><a href='#-fork'>fork</a> </li>
|
||||
<li class='toc3'><a href='#-forkIfNeeded'>forkIfNeeded</a> </li>
|
||||
<li class='toc3'><a href='#-block'>block</a> </li>
|
||||
<li class='toc3'><a href='#-thunk'>thunk</a> </li>
|
||||
<li class='toc3'><a href='#-flop'>flop</a> </li>
|
||||
<li class='toc3'><a href='#-envirFlop'>envirFlop</a> </li>
|
||||
<li class='toc3'><a href='#-inEnvir'>inEnvir</a> </li>
|
||||
<li class='toc3'><a href='#-case'>case</a> </li>
|
||||
<li class='toc3'><a href='#-matchItem'>matchItem</a> </li>
|
||||
<li class='toc3'><a href='#-performDegreeToKey'>performDegreeToKey</a> </li>
|
||||
</ul><li class='toc2'><a href='#Exception%20Handling'>Exception Handling</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-try'>try</a> </li>
|
||||
<li class='toc3'><a href='#-protect'>protect</a> </li>
|
||||
</ul><li class='toc2'><a href='#Audio'>Audio</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-play'>play</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='#-asBuffer'>asBuffer</a> </li>
|
||||
</ul><li class='toc2'><a href='#Conversion'>Conversion</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-asSynthDef'>asSynthDef</a> </li>
|
||||
<li class='toc3'><a href='#-asDefName'>asDefName</a> </li>
|
||||
<li class='toc3'><a href='#-asRoutine'>asRoutine</a> </li>
|
||||
<li class='toc3'><a href='#-r'>r</a> </li>
|
||||
<li class='toc3'><a href='#-p'>p</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='#-archiveAsCompileString'>archiveAsCompileString</a> </li>
|
||||
<li class='toc3'><a href='#-archiveAsObject'>archiveAsObject</a> </li>
|
||||
<li class='toc3'><a href='#-argNames'>argNames</a> </li>
|
||||
<li class='toc3'><a href='#-asInstr'>asInstr</a> </li>
|
||||
<li class='toc3'><a href='#-asInterfaceDef'>asInterfaceDef</a> </li>
|
||||
<li class='toc3'><a href='#-awake'>awake</a> </li>
|
||||
<li class='toc3'><a href='#-checkCanArchive'>checkCanArchive</a> </li>
|
||||
<li class='toc3'><a href='#-cmdPeriod'>cmdPeriod</a> </li>
|
||||
<li class='toc3'><a href='#-defaultArgs'>defaultArgs</a> </li>
|
||||
<li class='toc3'><a href='#-doOnApplicationStart'>doOnApplicationStart</a> </li>
|
||||
<li class='toc3'><a href='#-doOnCmdPeriod'>doOnCmdPeriod</a> </li>
|
||||
<li class='toc3'><a href='#-doOnError'>doOnError</a> </li>
|
||||
<li class='toc3'><a href='#-doOnServerBoot'>doOnServerBoot</a> </li>
|
||||
<li class='toc3'><a href='#-doOnServerQuit'>doOnServerQuit</a> </li>
|
||||
<li class='toc3'><a href='#-doOnServerTree'>doOnServerTree</a> </li>
|
||||
<li class='toc3'><a href='#-doOnShutDown'>doOnShutDown</a> </li>
|
||||
<li class='toc3'><a href='#-doOnStartUp'>doOnStartUp</a> </li>
|
||||
<li class='toc3'><a href='#-freqscope'>freqscope</a> </li>
|
||||
<li class='toc3'><a href='#-get'>get</a> </li>
|
||||
<li class='toc3'><a href='#-handleError'>handleError</a> </li>
|
||||
<li class='toc3'><a href='#-iplay'>iplay</a> </li>
|
||||
<li class='toc3'><a href='#-isFunction'>isFunction</a> </li>
|
||||
<li class='toc3'><a href='#-loadToFloatArray'>loadToFloatArray</a> </li>
|
||||
<li class='toc3'><a href='#-makeFlopFunc'>makeFlopFunc</a> </li>
|
||||
<li class='toc3'><a href='#-numArgs'>numArgs</a> </li>
|
||||
<li class='toc3'><a href='#-numVars'>numVars</a> </li>
|
||||
<li class='toc3'><a href='#-plotAudio'>plotAudio</a> </li>
|
||||
<li class='toc3'><a href='#-postString'>postString</a> </li>
|
||||
<li class='toc3'><a href='#-prTry'>prTry</a> </li>
|
||||
<li class='toc3'><a href='#-prepareForProxySynthDef'>prepareForProxySynthDef</a> </li>
|
||||
<li class='toc3'><a href='#-rate'>rate</a> </li>
|
||||
<li class='toc3'><a href='#-scopeResponse'>scopeResponse</a> </li>
|
||||
<li class='toc3'><a href='#-set'>set</a> </li>
|
||||
<li class='toc3'><a href='#-shallowCopy'>shallowCopy</a> </li>
|
||||
<li class='toc3'><a href='#-transformEvent'>transformEvent</a> </li>
|
||||
<li class='toc3'><a href='#-update'>update</a> </li>
|
||||
<li class='toc3'><a href='#-varArgs'>varArgs</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Exception%20Handling'>Exception Handling</a></li>
|
||||
<ul class='toc'></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#Core'>Core</a> > <a href='./../Browse.html#Core>Kernel'>Kernel</a></span>
|
||||
</div><h1>Function<span id='superclasses'> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>Implements a function</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Function.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Function.sc'>Function.sc</a></div><div id='related'>See also: <a href="./../Classes/FunctionDef.html">FunctionDef</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A Function is a reference to a FunctionDef and its defining context Frame. When a FunctionDef is encountered in your code it is pushed on the stack as a Function. A Function can be evaluated by using the 'value' method. See the Functions help file for a basic introduction.
|
||||
<p>Because it inherits from AbstractFunction, Functions respond to math operations by creating a new Function.<pre class='code prettyprint lang-sc'>// example
|
||||
(
|
||||
var a, b, c;
|
||||
a = { [100, 200, 300].choose }; // a Function
|
||||
b = { 10.rand + 1 }; // another Function
|
||||
c = a + b; // c is a Function.
|
||||
c.value.postln; // evaluate c and print the result
|
||||
)</pre>
|
||||
|
||||
<p>See AbstractFunction for function composition examples.
|
||||
<p>Because Functions are such an important concept, here some examples from related programming languages with functions as first class objects:<pre class='code prettyprint lang-sc'>// returning the first argument itself:
|
||||
{ |x| x }.value(1) // SuperCollider
|
||||
[:x | x ] value: 1 // Smalltalk
|
||||
((lambda (x) x) 1) // Lisp</pre>
|
||||
<h3><a class='anchor' name='Related%20Keywords'>Related Keywords</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'></span><a class='method-name' name='thisFunction' href='./../Overviews/Methods.html#thisFunction'>thisFunction</a></h3>
|
||||
<div class='method'>
|
||||
<p>The global pseudo-variable <code class='code prettyprint lang-sc'>thisFunction</code> always evaluates to the current enclosing Function.<div class='note'><span class='notelabel'>NOTE:</span> Be aware of <a href="./../Reference/Control-Structures.html#Inline%20optimization">inline optimizations</a> which will be reflected in the value of <code class='code prettyprint lang-sc'>thisFunction</code>.</div>
|
||||
<p>See also: <a href="./../Classes/FunctionDef.html#.thisFunctionDef">thisFunctionDef</a></div><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='Access'>Access</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-def' href='./../Overviews/Methods.html#def'>def</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the definition ( FunctionDef ) of the Function.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isClosed' href='./../Overviews/Methods.html#isClosed'>isClosed</a></h3>
|
||||
<div class='method'>
|
||||
<p>returns true if the function is closed, i.e. has no external references and can thus be converted to a compile string safely.</div><h3><a class='anchor' name='Evaluation'>Evaluation</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-value' href='./../Overviews/Methods.html#value'>value</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Evaluates the FunctionDef referred to by the Function. The Function is passed the args given.<pre class='code prettyprint lang-sc'>{ |a, b| (a * b).postln }.value(3, 10);
|
||||
{ arg a, b; (a * b).postln }.value(3, 10); // different way of expressing the same</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-valueArray' href='./../Overviews/Methods.html#valueArray'>valueArray</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Evaluates the FunctionDef referred to by the Function. If the last argument is an Array or List, then it is unpacked and appended to the other arguments (if any) to the Function. If the last argument is not an Array or List then this is the same as the 'value' method.<pre class='code prettyprint lang-sc'>{ |a, b, c| ((a * b) + c).postln }.valueArray([3, 10, 7]);
|
||||
|
||||
{ |a, b, c, d| [a, b, c, d].postln }.valueArray([1, 2, 3]);
|
||||
|
||||
{ |a, b, c, d| [a, b, c, d].postln }.valueArray(9, [1, 2, 3]);
|
||||
|
||||
{ |a, b, c, d| [a, b, c, d].postln }.valueArray(9, 10, [1, 2, 3]);</pre>
|
||||
|
||||
<p>A common syntactic shortcut:<pre class='code prettyprint lang-sc'>{ |a, b, c| ((a * b) + c).postln }.value(*[3, 10, 7]);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-valueEnvir' href='./../Overviews/Methods.html#valueEnvir'>valueEnvir</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>As value above. Unsupplied argument names are looked up in the current Environment.<pre class='code prettyprint lang-sc'>(
|
||||
Environment.use({
|
||||
~a = 3;
|
||||
~b = 10;
|
||||
{ |a, b| (a * b).postln }.valueEnvir;
|
||||
});
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-valueArrayEnvir' href='./../Overviews/Methods.html#valueArrayEnvir'>valueArrayEnvir</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Evaluates the FunctionDef referred to by the Function. If the last argument is an Array or List, then it is unpacked and appended to the other arguments (if any) to the Function. If the last argument is not an Array or List then this is the same as the 'value' method. Unsupplied argument names are looked up in the current Environment.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-valueWithEnvir' href='./../Overviews/Methods.html#valueWithEnvir'>valueWithEnvir</a>(<span class='argstr'>envir</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Evaluate the function, using arguments from the supplied environment This is slightly faster than valueEnvir and does not require replacing the currentEnvironment<pre class='code prettyprint lang-sc'>(
|
||||
e = Environment.make({ ~a = 3; ~b = 10 });
|
||||
{ |a, b| (a * b) }.valueWithEnvir(e);
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-functionPerformList' href='./../Overviews/Methods.html#functionPerformList'>functionPerformList</a>(<span class='argstr'>selector</span>, <span class='argstr'>arglist</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>For Function, this behaves the same as valueArray(arglist). It is used where Functions and other objects should behave differently to value, such as in the object prototyping implementation of Environment.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-performWithEnvir' href='./../Overviews/Methods.html#performWithEnvir'>performWithEnvir</a>(<span class='argstr'>selector</span>, <span class='argstr'>envir</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><pre class='code prettyprint lang-sc'>a = { |a, b, c| postf("% plus % plus % is %\n", a, b, c, a + b + c); "" };
|
||||
a.performWithEnvir(\value, (a: 1, c: 3, d: 4, b: 2));</pre>
|
||||
<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>selector<td class='argumentdesc'>
|
||||
<p>A Symbol representing a method selector.<tr><td class='argumentname'>envir<td class='argumentdesc'>
|
||||
<p>The remaining arguments derived from the environment and passed as arguments to the method named by the selector.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-performKeyValuePairs' href='./../Overviews/Methods.html#performKeyValuePairs'>performKeyValuePairs</a>(<span class='argstr'>selector</span>, <span class='argstr'>pairs</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><pre class='code prettyprint lang-sc'>a = { |a, b, c| postf("% plus % plus % is %\n", a, b, c, a + b + c); "" };
|
||||
a.performKeyValuePairs(\value, [\a, 1, \b, 2, \c, 3, \d, 4]);</pre>
|
||||
<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>selector<td class='argumentdesc'>
|
||||
<p>A Symbol representing a method selector.<tr><td class='argumentname'>pairs<td class='argumentdesc'>
|
||||
<p>Array or List with key-value pairs.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-loop' href='./../Overviews/Methods.html#loop'>loop</a></h3>
|
||||
<div class='method'>
|
||||
<p>Repeat this function. Useful with Task and Clocks.<pre class='code prettyprint lang-sc'>t = Task({ { "I'm loopy".postln; 1.wait;}.loop });
|
||||
t.start;
|
||||
t.stop;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-defer' href='./../Overviews/Methods.html#defer'>defer</a>(<span class='argstr'>delta</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Delay the evaluation of this Function by <code class='code prettyprint lang-sc'>delta</code> in seconds on AppClock.
|
||||
<p>This is equivalent to <code class='code prettyprint lang-sc'>AppClock.sched(0, function)</code> unless <code class='code prettyprint lang-sc'>delta</code> is <code class='code prettyprint lang-sc'>nil</code>. In that case the function is only scheduled if current code is not running on AppClock, otherwise the function is evaluated immediately.<pre class='code prettyprint lang-sc'>{ "2 seconds have passed.".postln; }.defer(2);
|
||||
|
||||
(
|
||||
{ "chicken".postln }.defer(0); // schedules on the AppClock
|
||||
{ "egg".postln }.defer // evaluates immediately
|
||||
)
|
||||
|
||||
(
|
||||
fork { // schedules on a TempoClock
|
||||
{ "chicken".postln }.defer // schedules on the AppClock
|
||||
};
|
||||
{ "egg".postln }.defer // evaluates immediately
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dup' href='./../Overviews/Methods.html#dup'>dup</a>(<span class='argstr'>n: 2</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Return an Array consisting of the results of n evaluations of this Function.<pre class='code prettyprint lang-sc'>x = { 4.rand; }.dup(4);
|
||||
x.postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'></span><a class='method-name' name='-!' href='./../Overviews/Methods.html#!'>!</a>(<span class='argstr'>n</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
|
||||
<div class='method'>
|
||||
<p>equivalent to dup(n)<pre class='code prettyprint lang-sc'>x = { 4.rand } ! 4;
|
||||
x.postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sum' href='./../Overviews/Methods.html#sum'>sum</a>(<span class='argstr'>n: 2</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>return the sum of n values produced.<pre class='code prettyprint lang-sc'>{ 4.rand }.sum(8);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-choose' href='./../Overviews/Methods.html#choose'>choose</a></h3>
|
||||
<div class='method'>
|
||||
<p>evaluates the function. This makes it polymorphic to SequenceableCollection, Bag and Set.<pre class='code prettyprint lang-sc'>[{ 100.rand }, [20, 30, 40]].collect(_.choose);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-bench' href='./../Overviews/Methods.html#bench'>bench</a>(<span class='argstr'>print: true</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns the amount of time this function takes to evaluate. print is a boolean indicating whether the result is posted. The default is true.<pre class='code prettyprint lang-sc'>{ 1000000.do({ 1.0.rand }); }.bench;</pre>
|
||||
</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'>clock</span>, <span class='argstr'>quant</span>, <span class='argstr'>stackSize</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns a Routine using the receiver as it's function, and plays it in a TempoClock.<pre class='code prettyprint lang-sc'>{ 4.do({ "Threading...".postln; 1.wait;}) }.fork;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-forkIfNeeded' href='./../Overviews/Methods.html#forkIfNeeded'>forkIfNeeded</a>(<span class='argstr'>clock</span>, <span class='argstr'>quant</span>, <span class='argstr'>stackSize</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>If needed, creates a new Routine to evaluate the function in, if the message is called within a routine already, it simply evaluates it.<pre class='code prettyprint lang-sc'>f = { 4.do({ "Threading...".postln; 1.wait;}) };
|
||||
f.forkIfNeeded;
|
||||
{ "we are now in a routine".postln; 1.wait; f.forkIfNeeded }.fork;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-block' href='./../Overviews/Methods.html#block'>block</a></h3>
|
||||
<div class='method'>
|
||||
<p>Break from a loop. Calls the receiver with an argument which is a function that returns from the method block. To exit the loop, call .value on the function passed in. You can pass a value to this function and that value will be returned from the block method.<pre class='code prettyprint lang-sc'>block {|break|
|
||||
100.do {|i|
|
||||
i.postln;
|
||||
if (i == 7) { break.value(999) }
|
||||
};
|
||||
}</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-thunk' href='./../Overviews/Methods.html#thunk'>thunk</a></h3>
|
||||
<div class='method'>
|
||||
<p>Return a Thunk, which is an unevaluated value that can be used in calculations<pre class='code prettyprint lang-sc'>x = thunk { 4.rand };
|
||||
x.value;
|
||||
x.value;</pre>
|
||||
</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>Return a function that, when evaluated with nested arguments, does multichannel expansion by evaluating the receiver function for each channel. A flopped function responds like the "map" function in languages like Lisp.<pre class='code prettyprint lang-sc'>f = { |a, b| if(a > 0) { a + b } { -inf } }.flop;
|
||||
f.value([-1, 2, 1, -3.0], [10, 1000]);
|
||||
f.value(2, 3);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-envirFlop' href='./../Overviews/Methods.html#envirFlop'>envirFlop</a></h3>
|
||||
<div class='method'>
|
||||
<p>like flop, but implements an environment argument passing (valueEnvir). Less efficient in generation than flop, but not a big difference in evaluation.<pre class='code prettyprint lang-sc'>f = { |a| if(a > 0) { a + 1 } { -inf } }.envirFlop;
|
||||
e = (a: [20, 40]);
|
||||
e.use { f.value }</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-inEnvir' href='./../Overviews/Methods.html#inEnvir'>inEnvir</a>(<span class='argstr'>envir</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>returns an "environment-safe" function. See Environment for more details.<pre class='code prettyprint lang-sc'>// prints nil because ~a is read from topEnvironment, not e
|
||||
e = (a: "got it", f: { { ~a.postln }.defer(0.5) });
|
||||
e.use { e.f };
|
||||
|
||||
// prints "got it" because { ~a.postln } is now bound to the e environment
|
||||
e = (a: "got it", f: { { ~a.postln }.inEnvir.defer(0.5) });
|
||||
e.use { e.f };</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-case' href='./../Overviews/Methods.html#case'>case</a>( <span class='argstr'>... cases</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Function implements a case method which allows for conditional evaluation with multiple cases. Since the receiver represents the first case this can be simply written as pairs of test functions and corresponding functions to be evaluated if true. Unlike Object-switch, this is inlined and is therefore just as efficient as nested if statements.<pre class='code prettyprint lang-sc'>(
|
||||
var i, x, z;
|
||||
z = [0, 1, 1.1, 1.3, 1.5, 2];
|
||||
i = z.choose;
|
||||
x = case
|
||||
{ i == 1 } { \no }
|
||||
{ i == 1.1 } { \wrong }
|
||||
{ i == 1.3 } { \wrong }
|
||||
{ i == 1.5 } { \wrong }
|
||||
{ i == 2 } { \wrong }
|
||||
{ i == 0 } { \true };
|
||||
x.postln;
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-matchItem' href='./../Overviews/Methods.html#matchItem'>matchItem</a>(<span class='argstr'>item</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Interface shared with other classes that implements pattern matching. See also: matchItem. Function.matchItem evaluates the function with the item as argument, expecting a Boolean as reply.
|
||||
<p>See also <a href="./../Reference/matchItem.html">matchItem</a>.<pre class='code prettyprint lang-sc'>{ |x| x > 5 }.matchItem(6); // true</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-performDegreeToKey' href='./../Overviews/Methods.html#performDegreeToKey'>performDegreeToKey</a>(<span class='argstr'>scaleDegree</span>, <span class='argstr'>stepsPerOctave: 12</span>, <span class='argstr'>accidental: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>use a function as a conversion from scale degree to note number. See also SequenceableCollection and Scale<pre class='code prettyprint lang-sc'>// a strange mapping
|
||||
(
|
||||
var f = {|degree, stepsPerOctave, acc|
|
||||
(1.8 ** (degree % stepsPerOctave) + acc).postln
|
||||
};
|
||||
Pbind(
|
||||
\scale, f,
|
||||
\degree, Pseq([0, 1, 2b, 3s, 4s, 6, 14, [0, 2, 4], [1, 3, 6]], inf)
|
||||
).play
|
||||
)</pre>
|
||||
</div><h3><a class='anchor' name='Exception%20Handling'>Exception Handling</a></h3>
|
||||
|
||||
<p>For the following two methods a return ^ inside of the receiver itself cannot be caught. Returns in methods called by the receiver are OK.<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-try' href='./../Overviews/Methods.html#try'>try</a>(<span class='argstr'>handler</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Executes the receiver. If an exception is thrown the catch function handler is executed with the error as an argument. handler itself can rethrow the error if desired.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-protect' href='./../Overviews/Methods.html#protect'>protect</a>(<span class='argstr'>handler</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Executes the receiver. The cleanup function handler is executed with an error as an argument, or nil if there was no error. The error continues to be in effect.</div><h3><a class='anchor' name='Audio'>Audio</a></h3>
|
||||
<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'>target</span>, <span class='argstr'>outbus: 0</span>, <span class='argstr'>fadeTime: 0.02</span>, <span class='argstr'>addAction: 'addToHead'</span>, <span class='argstr'>args</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asDefName.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asDefName.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>This is probably the simplest way to get audio in SC3. It wraps the Function in a SynthDef (adding an Out ugen if needed), creates and starts a new Synth with it, and returns the Synth object. A Linen is also added to avoid clicks, which is configured to allow the resulting Synth to have its \gate argument set, or to respond to a release message. Args in the function become args in the resulting def.<pre class='code prettyprint lang-sc'>x = { |freq = 440| SinOsc.ar(freq, 0, 0.3) }.play; // this returns a Synth object;
|
||||
x.set(\freq, 880); // note you can set the freq argument
|
||||
x.defName; // the name of the resulting SynthDef (generated automatically in a cycle of 512)
|
||||
x.release(4); // fadeout over 4 seconds</pre>
|
||||
|
||||
<p>Many of the examples make use of the Function.play syntax. Note that reusing such code in a SynthDef requires the addition of an Out ugen.<pre class='code prettyprint lang-sc'>// the following two lines produce equivalent results
|
||||
{ SinOsc.ar(440, 0, 0.3) }.play(fadeTime: 0.0);
|
||||
SynthDef(\help_FuncPlay, { Out.ar(0, SinOsc.ar(440, 0, 0.3))}).play;</pre>
|
||||
|
||||
<p>Function.play is often more convenient than SynthDef.play, particularly for short examples and quick testing. The latter does have some additional options, such as lagtimes for controls, etc. Where reuse and maximum flexibility are of greater importance, SynthDef and its various methods are usually the better choice.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>target<td class='argumentdesc'>
|
||||
<p>a Node, Server, or Nil. A Server will be converted to the default group of that server. Nil will be converted to the default group of the default Server.<tr><td class='argumentname'>outbus<td class='argumentdesc'>
|
||||
<p>the output bus to play the audio out on. This is equivalent to Out.ar(outbus, theoutput). The default is 0.<tr><td class='argumentname'>fadeTime<td class='argumentdesc'>
|
||||
<p>a fadein time. The default is 0.02 seconds, which is just enough to avoid a click. This will also be the fadeout time for a release if you do not specify.<tr><td class='argumentname'>addAction<td class='argumentdesc'>
|
||||
<p>see Synth for a list of valid addActions. The default is \addToHead.<tr><td class='argumentname'>args<td class='argumentdesc'>
|
||||
<p>arguments</table></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'>numChannels</span>, <span class='argstr'>outbus: 0</span>, <span class='argstr'>fadeTime: 0.05</span>, <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>As play above, and calls Server-scope to open a scope window in which to view the output.<pre class='code prettyprint lang-sc'>{ FSinOsc.ar(440, 0, 0.3) }.scope(1)</pre>
|
||||
<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
|
||||
<p>The number of channels to display in the scope window, starting from outbus. The default is 2.<tr><td class='argumentname'>outbus<td class='argumentdesc'>
|
||||
<p>The output bus to play the audio out on. This is equivalent to Out.ar(outbus, theoutput). The default is 0.<tr><td class='argumentname'>fadeTime<td class='argumentdesc'>
|
||||
<p>A fadein time. The default is 0.02 seconds, which is just enough to avoid a click.<tr><td class='argumentname'>bufsize<td class='argumentdesc'>
|
||||
<p>The size of the buffer for the ScopeView. The default is 4096.<tr><td class='argumentname'>zoom<td class='argumentdesc'>
|
||||
<p>A zoom value for the scope's X axis. Larger values show more. The default is 1.</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'>duration: 0.01</span>, <span class='argstr'>server</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>Calculates duration in seconds worth of the output of this function asynchronously, and plots it in a GUI window. Unlike play and scope it will not work with explicit Out Ugens, so your function should return a UGen or an Array of them. The plot will be calculated in realtime.<pre class='code prettyprint lang-sc'>{ SinOsc.ar(440) }.plot(0.01, bounds: Window.screenBounds);
|
||||
|
||||
{ {|i| SinOsc.ar(1 + i)}.dup(7) }.plot(1);</pre>
|
||||
<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>duration<td class='argumentdesc'>
|
||||
<p>The duration of the function to plot in seconds. The default is 0.01.<tr><td class='argumentname'>server<td class='argumentdesc'>
|
||||
<p>The Server on which to calculate the plot. This must be running on your local machine, but does not need to be the internal server. If nil the default server will be used.<tr><td class='argumentname'>bounds<td class='argumentdesc'>
|
||||
<p>An instance of Rect or Point indicating the bounds of the plot window.<tr><td class='argumentname'>minval<td class='argumentdesc'>
|
||||
<p>the minimum value in the plot. Defaults to -1.0.<tr><td class='argumentname'>maxval<td class='argumentdesc'>
|
||||
<p>the maximum value in the plot. Defaults to 1.0.<tr><td class='argumentname'>separately<td class='argumentdesc'>
|
||||
<p>For multi channel signals, set whether to use separate value display ranges or not. a window to place the plot in. If nil, one will be created for you.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asBuffer' href='./../Overviews/Methods.html#asBuffer'>asBuffer</a>(<span class='argstr'>duration: 0.01</span>, <span class='argstr'>server</span>, <span class='argstr'>action</span>, <span class='argstr'>fadeTime: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Calculates duration in seconds worth of the output of this function asynchronously, and returns it in a <a href="./../Classes/Buffer.html">Buffer</a> of the number of channels. This method immediately returns a buffer, which takes <code class='code prettyprint lang-sc'>duration</code> seconds to become filled with data asynchronously. Then the action function is called.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>duration<td class='argumentdesc'>
|
||||
<p>The duration of the function to plot in seconds. The default is 0.01.<tr><td class='argumentname'>server<td class='argumentdesc'>
|
||||
<p>The server on which the function is calculated. The default is <code class='code prettyprint lang-sc'>Server.default</code>.<tr><td class='argumentname'>action<td class='argumentdesc'>
|
||||
<p>A function that is called when the buffer is filled. It is passed the buffer as argument.<tr><td class='argumentname'>fadeTime<td class='argumentdesc'>
|
||||
<p>A fade in and out time in seconds. Only when greater than zero, an envelope is applied to the signal to avoid clicks (default: 0).</table><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>// record a buffer
|
||||
b = { Blip.ar(XLine.kr(10000, 4, 3) * [1, 1.2], 20) * 0.1 }.asBuffer(3, fadeTime:0.1)
|
||||
b.plot; // after 3 seconds, you can see it.
|
||||
// play the soundfile back
|
||||
{ PlayBuf.ar(b.numChannels, b, LFNoise2.kr(2 ! 8).exprange(0.15, 1), loop:1).sum }.play;</pre>
|
||||
</div><h3><a class='anchor' name='Conversion'>Conversion</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asSynthDef' href='./../Overviews/Methods.html#asSynthDef'>asSynthDef</a>(<span class='argstr'>rates</span>, <span class='argstr'>prependArgs</span>, <span class='argstr'>outClass: 'Out'</span>, <span class='argstr'>fadeTime</span>, <span class='argstr'>name</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asDefName.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asDefName.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Returns a SynthDef based on this Function, adding a Linen and an Out ugen if needed.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>rates<td class='argumentdesc'>
|
||||
<p>An Array of rates and lagtimes for the function's arguments (see SynthDef for more details).<tr><td class='argumentname'>prependArgs<td class='argumentdesc'>
|
||||
<p>arguments<tr><td class='argumentname'>outClass<td class='argumentdesc'>
|
||||
<p>The class of the output ugen as a symbol. The default is \Out.<tr><td class='argumentname'>fadeTime<td class='argumentdesc'>
|
||||
<p>a fadein time. The default is 0.<tr><td class='argumentname'>name<td class='argumentdesc'>
|
||||
<p>the name of the SynthDef</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asDefName' href='./../Overviews/Methods.html#asDefName'>asDefName</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asDefName.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asDefName.sc</a></div>
|
||||
<div class='method'>
|
||||
<p>Performs asSynthDef (see above), sends the resulting def to the local server and returns the SynthDefs name. This is asynchronous.<pre class='code prettyprint lang-sc'>x = { SinOsc.ar(440, 0, 0.3) }.asDefName; // this must complete first
|
||||
y = Synth(x);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asRoutine' href='./../Overviews/Methods.html#asRoutine'>asRoutine</a></h3>
|
||||
<div class='method'>
|
||||
<p>Returns a Routine using this as its func argument.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-r' href='./../Overviews/Methods.html#r'>r</a></h3>
|
||||
<div class='method'>
|
||||
<p>Returns a Routine using this as its func argument.<pre class='code prettyprint lang-sc'>a = r { 5.do { |i| i.rand.yield } };
|
||||
a.nextN(8);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-p' href='./../Overviews/Methods.html#p'>p</a></h3>
|
||||
<div class='method'>
|
||||
<p>Returns a Prout using this as its func argument.<pre class='code prettyprint lang-sc'>a = p { 5.do { |i| i.rand.yield } };
|
||||
x = a.asStream;
|
||||
x.nextN(8);</pre>
|
||||
|
||||
<p>This is useful for using ListComprehensions in Patterns:<pre class='code prettyprint lang-sc'>Pbind(\degree, p {:[x, y].postln, x<-(0..10), y<-(0..10), (x + y).isPrime }, \dur, 0.3).play;</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='-archiveAsCompileString' href='./../Overviews/Methods.html#archiveAsCompileString'>archiveAsCompileString</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-archiveAsObject' href='./../Overviews/Methods.html#archiveAsObject'>archiveAsObject</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-argNames' href='./../Overviews/Methods.html#argNames'>argNames</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='-asInstr' href='./../Overviews/Methods.html#asInstr'>asInstr</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asInterfaceDef' href='./../Overviews/Methods.html#asInterfaceDef'>asInterfaceDef</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-awake' href='./../Overviews/Methods.html#awake'>awake</a>(<span class='argstr'>beats</span>, <span class='argstr'>seconds</span>, <span class='argstr'>clock</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-checkCanArchive' href='./../Overviews/Methods.html#checkCanArchive'>checkCanArchive</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-cmdPeriod' href='./../Overviews/Methods.html#cmdPeriod'>cmdPeriod</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-defaultArgs' href='./../Overviews/Methods.html#defaultArgs'>defaultArgs</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='-doOnApplicationStart' href='./../Overviews/Methods.html#doOnApplicationStart'>doOnApplicationStart</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/ApplicationStart.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/ApplicationStart.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnCmdPeriod' href='./../Overviews/Methods.html#doOnCmdPeriod'>doOnCmdPeriod</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnError' href='./../Overviews/Methods.html#doOnError'>doOnError</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnServerBoot' href='./../Overviews/Methods.html#doOnServerBoot'>doOnServerBoot</a>(<span class='argstr'>server</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnServerQuit' href='./../Overviews/Methods.html#doOnServerQuit'>doOnServerQuit</a>(<span class='argstr'>server</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnServerTree' href='./../Overviews/Methods.html#doOnServerTree'>doOnServerTree</a>(<span class='argstr'>server</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnShutDown' href='./../Overviews/Methods.html#doOnShutDown'>doOnShutDown</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doOnStartUp' href='./../Overviews/Methods.html#doOnStartUp'>doOnStartUp</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/extSystemActions.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-freqscope' href='./../Overviews/Methods.html#freqscope'>freqscope</a></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>
|
||||
<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'>prevVal</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-handleError' href='./../Overviews/Methods.html#handleError'>handleError</a>(<span class='argstr'>error</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-iplay' href='./../Overviews/Methods.html#iplay'>iplay</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/instrSupport.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isFunction' href='./../Overviews/Methods.html#isFunction'>isFunction</a></h3>
|
||||
<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'>duration: 0.01</span>, <span class='argstr'>server</span>, <span class='argstr'>action</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-makeFlopFunc' href='./../Overviews/Methods.html#makeFlopFunc'>makeFlopFunc</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numArgs' href='./../Overviews/Methods.html#numArgs'>numArgs</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numVars' href='./../Overviews/Methods.html#numVars'>numVars</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' 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'>server</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='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-postString' href='./../Overviews/Methods.html#postString'>postString</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/Patterns/extFunction.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/JITLib/Patterns/extFunction.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prTry' href='./../Overviews/Methods.html#prTry'>prTry</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prepareForProxySynthDef' href='./../Overviews/Methods.html#prepareForProxySynthDef'>prepareForProxySynthDef</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='-rate' href='./../Overviews/Methods.html#rate'>rate</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='-scopeResponse' href='./../Overviews/Methods.html#scopeResponse'>scopeResponse</a>(<span class='argstr'>server</span>, <span class='argstr'>freqMode: 1</span>, <span class='argstr'>label: "Empirical Frequency response"</span>, <span class='argstr'>mute: false</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Control/scopeResponse.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/PlusGUI/Control/scopeResponse.sc</a></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'>... args</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-shallowCopy' href='./../Overviews/Methods.html#shallowCopy'>shallowCopy</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-transformEvent' href='./../Overviews/Methods.html#transformEvent'>transformEvent</a>(<span class='argstr'>event</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-update' href='./../Overviews/Methods.html#update'>update</a>(<span class='argstr'>obj</span>, <span class='argstr'>what</span> <span class='argstr'>... args</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-varArgs' href='./../Overviews/Methods.html#varArgs'>varArgs</a></h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<h3><a class='anchor' name='Exception%20Handling'>Exception Handling</a></h3>
|
||||
<pre class='code prettyprint lang-sc'>// no exception handler
|
||||
value { 8.zorg; \didnt_continue.postln; }
|
||||
|
||||
try { 8.zorg } {|error| error.postln; \cleanup.postln; }; \continued.postln;
|
||||
|
||||
protect { 8.zorg } {|error| error.postln; }; \didnt_continue.postln;</pre>
|
||||
<pre class='code prettyprint lang-sc'>try { 123.postln; 456.throw; 789.postln } {|error| [\catch, error].postln };
|
||||
|
||||
try { 123.postln; 789.postln } {|error| [\catch, error].postln };
|
||||
|
||||
try { 123.postln; nil.throw; 789.postln } {|error| [\catch, error].postln };
|
||||
|
||||
protect { 123.postln; 456.throw; 789.postln } {|error| [\onExit, error].postln };
|
||||
|
||||
protect { 123.postln; 789.postln } {|error| [\onExit, error].postln };
|
||||
|
||||
(
|
||||
try {
|
||||
protect { 123.postln; 456.throw; 789.postln } {|error| [\onExit, error].postln };
|
||||
} {|error| [\catch, error].postln };
|
||||
)
|
||||
|
||||
value { 123.postln; 456.throw; 789.postln }
|
||||
|
||||
value { 123.postln; Error("what happened?").throw; 789.postln }</pre>
|
||||
<pre class='code prettyprint lang-sc'>(
|
||||
a = [\aaa, \bbb, \ccc, \ddd];
|
||||
a[1].postln;
|
||||
a[\x].postln;
|
||||
a[2].postln;
|
||||
)
|
||||
|
||||
(
|
||||
try {
|
||||
a = [\aaa, \bbb, \ccc, \ddd];
|
||||
a[1].postln;
|
||||
a[\x].postln;
|
||||
a[2].postln;
|
||||
} {|error| \caught.postln; error.dump }
|
||||
)
|
||||
|
||||
(
|
||||
try {
|
||||
a = [\aaa, \bbb, \ccc, \ddd];
|
||||
a[1].postln;
|
||||
a[\x].postln;
|
||||
a[2].postln;
|
||||
} {|error| \caught.postln; error.dump; error.throw }
|
||||
)
|
||||
|
||||
(
|
||||
protect {
|
||||
a = [\aaa, \bbb, \ccc, \ddd];
|
||||
a[1].postln;
|
||||
a[\x].postln;
|
||||
a[2].postln;
|
||||
} {|error| \caught.postln; error.dump }
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Function.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Function.schelp</a><br>link::Classes/Function::<br></div></div></body></html>
|
120
doc-schelp/Help-3.12.2/Classes/FunctionDef.html
Normal file
|
@ -0,0 +1,120 @@
|
|||
<!doctype html><html lang='en'><head><title>FunctionDef | 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 = 'FunctionDef';
|
||||
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'>FunctionDef:</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='#Related%20Keywords'>Related Keywords</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#.thisFunctionDef'>thisFunctionDef</a> </li>
|
||||
</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>
|
||||
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Accessing'>Accessing</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-code'>code</a> </li>
|
||||
<li class='toc3'><a href='#-sourceCode'>sourceCode</a> </li>
|
||||
<li class='toc3'><a href='#-context'>context</a> </li>
|
||||
<li class='toc3'><a href='#-findReferences'>findReferences</a> </li>
|
||||
<li class='toc3'><a href='#-argNames'>argNames</a> </li>
|
||||
<li class='toc3'><a href='#-prototypeFrame'>prototypeFrame</a> </li>
|
||||
<li class='toc3'><a href='#-varNames'>varNames</a> </li>
|
||||
<li class='toc3'><a href='#-argumentString'>argumentString</a> </li>
|
||||
<li class='toc3'><a href='#-makeEnvirFromArgs'>makeEnvirFromArgs</a> </li>
|
||||
</ul><li class='toc2'><a href='#Utilities'>Utilities</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-dumpByteCodes'>dumpByteCodes</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='#-archiveAsCompileString'>archiveAsCompileString</a> </li>
|
||||
<li class='toc3'><a href='#-asFunction'>asFunction</a> </li>
|
||||
<li class='toc3'><a href='#-checkCanArchive'>checkCanArchive</a> </li>
|
||||
<li class='toc3'><a href='#-constants'>constants</a> </li>
|
||||
<li class='toc3'><a href='#-dumpContexts'>dumpContexts</a> </li>
|
||||
<li class='toc3'><a href='#-inspectorClass'>inspectorClass</a> </li>
|
||||
<li class='toc3'><a href='#-keyValuePairsFromArgs'>keyValuePairsFromArgs</a> </li>
|
||||
<li class='toc3'><a href='#-numArgs'>numArgs</a> </li>
|
||||
<li class='toc3'><a href='#-numVars'>numVars</a> </li>
|
||||
<li class='toc3'><a href='#-selectors'>selectors</a> </li>
|
||||
<li class='toc3'><a href='#-shallowCopy'>shallowCopy</a> </li>
|
||||
<li class='toc3'><a href='#-varArgs'>varArgs</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#Core'>Core</a> > <a href='./../Browse.html#Core>Kernel'>Kernel</a></span>
|
||||
</div><h1>FunctionDef<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>FunctionDefs contain code which can be executed from a Function.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Kernel.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Kernel.sc'>Kernel.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/Method.html">Method</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/Function.html">Function</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
<h3><a class='anchor' name='Related%20Keywords'>Related Keywords</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'></span><a class='method-name' name='thisFunctionDef' href='./../Overviews/Methods.html#thisFunctionDef'>thisFunctionDef</a></h3>
|
||||
<div class='method'>
|
||||
<p>The global pseudo-variable <code class='code prettyprint lang-sc'>thisFunctionDef</code> always evaluates to the current enclosing FunctionDef.
|
||||
<p>See also: <a href="./../Classes/Function.html#.thisFunction">thisFunction</a></div><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='Accessing'>Accessing</a></h3>
|
||||
|
||||
<p>Even though it is possible to change the values in the various arrays that define the FunctionDef, you should not do it, unless you like to crash.<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-code' href='./../Overviews/Methods.html#code'>code</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the byte code array.<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| a + b }.def.code;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-sourceCode' href='./../Overviews/Methods.html#sourceCode'>sourceCode</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the source code string.<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| a + b }.def.sourceCode.postcs;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-context' href='./../Overviews/Methods.html#context'>context</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the enclosing FunctionDef or Method.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-findReferences' href='./../Overviews/Methods.html#findReferences'>findReferences</a>(<span class='argstr'>aSymbol</span>, <span class='argstr'>references</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>return a list of all references to a given symbol.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-argNames' href='./../Overviews/Methods.html#argNames'>argNames</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the Array of Symbols of the argument names.<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| a + b }.def.argNames;</pre>
|
||||
|
||||
<p></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prototypeFrame' href='./../Overviews/Methods.html#prototypeFrame'>prototypeFrame</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the array of default values for argument and temporary variables.<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| a + b }.def.prototypeFrame;</pre>
|
||||
|
||||
<p></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-varNames' href='./../Overviews/Methods.html#varNames'>varNames</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the Array of Symbols of the local variable names.<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| var x = 9; a + b + x }.def.varNames;</pre>
|
||||
|
||||
<p></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-argumentString' href='./../Overviews/Methods.html#argumentString'>argumentString</a>(<span class='argstr'>withDefaultValues: true</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Return a string that contains arguments and their default values for embedding in a string<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| a + b }.def.argumentString;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-makeEnvirFromArgs' href='./../Overviews/Methods.html#makeEnvirFromArgs'>makeEnvirFromArgs</a></h3>
|
||||
<div class='method'>
|
||||
<p>Get the Array of Symbols of the local variable names.<pre class='code prettyprint lang-sc'>{ |a = 9, b = 10, c| a + b }.def.makeEnvirFromArgs;</pre>
|
||||
</div><h3><a class='anchor' name='Utilities'>Utilities</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dumpByteCodes' href='./../Overviews/Methods.html#dumpByteCodes'>dumpByteCodes</a></h3>
|
||||
<div class='method'>
|
||||
<p>"Disassemble" and post the FunctionDef's byte code instructions to the text window.</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='-archiveAsCompileString' href='./../Overviews/Methods.html#archiveAsCompileString'>archiveAsCompileString</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asFunction' href='./../Overviews/Methods.html#asFunction'>asFunction</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-checkCanArchive' href='./../Overviews/Methods.html#checkCanArchive'>checkCanArchive</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-constants' href='./../Overviews/Methods.html#constants'>constants</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dumpContexts' href='./../Overviews/Methods.html#dumpContexts'>dumpContexts</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-inspectorClass' href='./../Overviews/Methods.html#inspectorClass'>inspectorClass</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-keyValuePairsFromArgs' href='./../Overviews/Methods.html#keyValuePairsFromArgs'>keyValuePairsFromArgs</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numArgs' href='./../Overviews/Methods.html#numArgs'>numArgs</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numVars' href='./../Overviews/Methods.html#numVars'>numVars</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-selectors' href='./../Overviews/Methods.html#selectors'>selectors</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-shallowCopy' href='./../Overviews/Methods.html#shallowCopy'>shallowCopy</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-varArgs' href='./../Overviews/Methods.html#varArgs'>varArgs</a></h3>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FunctionDef.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/FunctionDef.schelp</a><br>link::Classes/FunctionDef::<br></div></div></body></html>
|
194
doc-schelp/Help-3.12.2/Classes/GUI.html
Normal file
|
@ -0,0 +1,194 @@
|
|||
<html><head><title>GUI</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#GUI>Kits'>GUI>Kits</a></div>
|
||||
<h1>GUI</h1>
|
||||
<div id='summary'>Factory abstraction for all GUI related core classes</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/backwardsCompatibility/GUI.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/GUI/backwardsCompatibility/GUI.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../Overviews/GUI-Classes.html">List of GUI classes</a>, <a href="./../Guides/GUI-Introduction.html">Introduction to GUI</a>, <a href="./../Classes/ViewRedirect.html">ViewRedirect</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Switching%20and%20Referring%20to%20GUI%20Kits'>Switching and Referring to GUI Kits</a></li>
|
||||
<ul class='toc'></ul><li class='toc2'><a href='#Extending%20GUI%20Kits'>Extending GUI Kits</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='#Methods%20and%20Variables%20for%20GUI'>Methods and Variables for GUI</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*new'>new</a> </li>
|
||||
<li class='toc3'><a href='#*makeGUI'>makeGUI</a> </li>
|
||||
<li class='toc3'><a href='#*initClass'>initClass</a> </li>
|
||||
<li class='toc3'><a href='#*cocoa'>cocoa</a> </li>
|
||||
<li class='toc3'><a href='#*swing'>swing</a> </li>
|
||||
<li class='toc3'><a href='#*fromID'>fromID</a> </li>
|
||||
<li class='toc3'><a href='#*current'>current</a> </li>
|
||||
<li class='toc3'><a href='#*get'>get</a> </li>
|
||||
<li class='toc3'><a href='#*set'>set</a> </li>
|
||||
<li class='toc3'><a href='#*use'>use</a> </li>
|
||||
<li class='toc3'><a href='#*useID'>useID</a> </li>
|
||||
<li class='toc3'><a href='#*add'>add</a> </li>
|
||||
<li class='toc3'><a href='#*doesNotUnderstand'>doesNotUnderstand</a> </li>
|
||||
<li class='toc3'><a href='#*setSkin'>setSkin</a> </li>
|
||||
<li class='toc3'><a href='#*scheme'>scheme</a> </li>
|
||||
<li class='toc3'><a href='#*schemes'>schemes</a> </li>
|
||||
<li class='toc3'><a href='#*skin'>skin</a> </li>
|
||||
<li class='toc3'><a href='#*skins'>skins</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='#*qt'>qt</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><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>SuperCollider currently supports three operating system platforms: Macintosh OSX, UNIX (Linux and FreeBSD) and Windows (with some limitations).<div class='warning'><span class='warninglabel'>WARNING:</span> The redirect system has been deprecated, please use the view classes directly.</div>
|
||||
<p>Graphical User Interface (GUI) code, for the most part, does not need to worry about which platform is executing the code because of the <strong>view redirect</strong> system. At any time, one and only one <strong>GUI kit</strong> is active. This determines which GUI classes will be used for rendering. These classes, the active views, have prefixes for the GUI kit that created the view object: SCWindow vs. JSCWindow vs. QWindow.<table>
|
||||
<tr><td><strong>GUI kit</strong><td><strong>Code to activate</strong><td><strong>Supported platform(s)</strong><td><strong>Framework</strong><td><strong>Prefix</strong><tr><td>Cocoa<td><code class='code prettyprint lang-sc'>GUI.cocoa</code><td>Mac OSX only<td>Cocoa<td>SC-<tr><td>SwingOSC<td><code class='code prettyprint lang-sc'>GUI.swing</code><td>All<td>Java + Swing<td>JSC-<tr><td>Qt<td><code class='code prettyprint lang-sc'>GUI.qt</code><td>All<td>Qt<td>Q-</table>
|
||||
|
||||
<p>In general, users should not concern themselves with the prefixes. Instead, work with the <em>redirect</em> classes, which have no prefix: Window, Button, Slider, etc. The redirect class will ask the currently-selected kit which <em>implementation class</em> should be used.
|
||||
<p>The GUI kit (CocoaGUI, QtGUI, SwingGUI) maps the generic view names to the implementing classes: <code class='code prettyprint lang-sc'>Window --> SCWindow, QWindow or JSCWindow</code>. These schemes are in turn used by <a href="./../Classes/ViewRedirect.html">ViewRedirect</a> to provide a simple cross-platform gui syntax. The GUI class provides utilities for switching kits and other cross platform tasks.
|
||||
<p>You can get your available schemes (depending on what you installed) with:<pre class='code prettyprint lang-sc'>GUI.schemes;</pre>
|
||||
|
||||
<p>For a complete list of gui classes and redirects, see <a href="./../Overviews/GUI-Classes.html">List of GUI classes</a>.<h3><a class='anchor' name='Switching%20and%20Referring%20to%20GUI%20Kits'>Switching and Referring to GUI Kits</a></h3>
|
||||
|
||||
<p>As of this writing, three GUI kits are available through the GUI class: <a href="./../Classes/QtGUI.html">QtGUI</a> (Qt framework), <a href="./../Classes/CocoaGUI">CocoaGUI</a> (Mac OS X native) and <a href="./../Classes/SwingGUI">SwingGUI</a> (Java). Note that <a href="./../Classes/SwingOSC">SwingOSC</a> is not part of every SuperCollider distribution, so you may have to install it separately.
|
||||
<p>You can switch the GUI kit by calling one of the following class methods:<pre class='code prettyprint lang-sc'>GUI.qt; // use Qt in subsequent GUI creation procedures
|
||||
GUI.cocoa; // use cocoa in subsequent GUI creation procedures
|
||||
GUI.swing; // use swing in subsequent GUI creation procedures
|
||||
// NOTE: If you do not have SwingOSC installed, you get
|
||||
// a warning only, and do not switch; so you cannot
|
||||
// accidentally disable your gui system.</pre>
|
||||
|
||||
<p>These methods return the new GUI kit implementation. The current implementation can be queried by calling<pre class='code prettyprint lang-sc'>GUI.current; // returns the current GUI kit implementation</pre>
|
||||
|
||||
<p>If you want to make a GUI kit specific switch (e.g. in a class), then you should use the following instead, as on non-OSX systems the class CocoaGUI is not in the class library path, and you cannot check for an undefined class:<pre class='code prettyprint lang-sc'>GUI.id; // returns the current GUI kit implementation id; this is currently either \cocoa or \swing</pre>
|
||||
|
||||
<p>For persistency, you can store the identifier of the kit implementation and recall the kit through the class method <code class='code prettyprint lang-sc'>fromID</code>:<pre class='code prettyprint lang-sc'>x = GUI.cocoa;
|
||||
y = x.id; // store the identifier of a kit implementation
|
||||
y.postln; // the id could be stored in a preferences file for example
|
||||
GUI.swing;
|
||||
// now switch back to the kit implementation with identifier y
|
||||
GUI.fromID( y );
|
||||
GUI.current.id.postln; // --> cocoa</pre>
|
||||
|
||||
<p>The <code class='code prettyprint lang-sc'>*use</code> and <code class='code prettyprint lang-sc'>*useID</code> methods allow you to temporarily switch the kit, so as to use it only for a dedicated block of statements:<pre class='code prettyprint lang-sc'>GUI.cocoa;
|
||||
GUI.useID(\swing, { Array.rand( 1000, 0.0, 1.0 ).plot });
|
||||
GUI.current.id.postln; // --> still cocoa</pre>
|
||||
|
||||
<p>You can get a particular kit using the <code class='code prettyprint lang-sc'>*get</code> method. You can switch to a particular kit using the <code class='code prettyprint lang-sc'>*set</code> method:<pre class='code prettyprint lang-sc'>x = GUI.get( \swing ); // note: unlike *swing and *cocoa, this does not _switch_ the current kit!
|
||||
GUI.current.id.postln; // --> still cocoa
|
||||
GUI.set( x ); // now we make SwingOSC the current kit
|
||||
GUI.window.viewPalette;</pre>
|
||||
<h3><a class='anchor' name='Extending%20GUI%20Kits'>Extending GUI Kits</a></h3>
|
||||
|
||||
<p>GUI Kits can be extended with custom classes by using their respective <code class='code prettyprint lang-sc'>put</code> methods:<pre class='code prettyprint lang-sc'>GUI.get( \cocoa ).put( \myText, SCStaticText );
|
||||
GUI.get( \swing ).put( \myText, JSCStaticText );
|
||||
|
||||
GUI.cocoa;
|
||||
GUI.swing;
|
||||
(
|
||||
w = GUI.window.new;
|
||||
GUI.myText.new( w, w.view.bounds.insetBy( 20, 20 )).string_( "schoko" ).background_( Color.red );
|
||||
w.front;
|
||||
)</pre>
|
||||
|
||||
<p>If you intend to add extensions from within your own classes upon class library initialization time, the preferred way is to do this in the startup process:<pre class='code prettyprint lang-sc'>MyGUIExtension {
|
||||
*initClass {
|
||||
StartUp.add({
|
||||
var scheme;
|
||||
|
||||
scheme = GUI.get( \cocoa );
|
||||
if( scheme.notNil, {scheme.put( \myText, SCStaticText )});
|
||||
scheme = GUI.get( \swing );
|
||||
if( scheme.notNil, {scheme.put( \myText, JSCStaticText )});
|
||||
});
|
||||
}
|
||||
}</pre>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3><a class='anchor' name='Methods%20and%20Variables%20for%20GUI'>Methods and Variables for GUI</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*new' href='./../Overviews/Methods.html#new'>new</a> (<span class='argstr'>key</span>)</h3>
|
||||
<div class='method'>
|
||||
<p></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*makeGUI' href='./../Overviews/Methods.html#makeGUI'>makeGUI</a> (<span class='argstr'>key</span>, <span class='argstr'>args</span>, <span class='argstr'>properties</span>)</h3>
|
||||
<div class='method'>
|
||||
<p></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*initClass' href='./../Overviews/Methods.html#initClass'>initClass</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Sets the <code class='code prettyprint lang-sc'>skin</code> to default values on compile.<pre class='code prettyprint lang-sc'>fontSpecs: ["Helvetica", 10],
|
||||
fontColor: Color.black,
|
||||
background: Color(0.8, 0.85, 0.7, 0.5),
|
||||
foreground: Color.grey(0.95),
|
||||
onColor: Color(0.5, 1, 0.5),
|
||||
offColor: Color.clear,
|
||||
gap: 0@0,
|
||||
margin: 2@2,
|
||||
buttonHeight: 16</pre>
|
||||
</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*cocoa' href='./../Overviews/Methods.html#cocoa'>cocoa</a>: METHOD NOT FOUND!</h3>
|
||||
<div class='method'>
|
||||
<p>Makes Cocoa (Mac OS X GUI) the current scheme and returns it. Subsequent GUI object calls to GUI are delegated to cocoa. Returns the current (cocoa) scheme.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*swing' href='./../Overviews/Methods.html#swing'>swing</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Makes Swing (Java GUI) the current scheme and returns it. Subsequent GUI object calls to GUI are delegated to swing. Returns the current (swing) scheme.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*fromID' href='./../Overviews/Methods.html#fromID'>fromID</a> (<span class='argstr'>id</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Changes the current scheme and returns the new scheme.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>id<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Symbol.html">Symbol</a>. The identifier of the scheme to use.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*current' href='./../Overviews/Methods.html#current'>current</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Returns the current scheme. This is useful for objects that, upon instantiation, wish to store the then-current scheme, so as to be able to consistently use the same scheme in future method calls.<div class='note'><span class='notelabel'>NOTE:</span> the caller shouldn't make any assumptions about the nature (the class) of the returned object, so that the actual implementation (an Event) may change in the future.</div></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*get' href='./../Overviews/Methods.html#get'>get</a> (<span class='argstr'>id</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Returns the scheme for a given identifier. Does not switch the current scheme.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>id<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Symbol.html">Symbol</a>. The identifier of the scheme to retrieve, such as returned by calling <code class='code prettyprint lang-sc'>aScheme.id</code>.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*set' href='./../Overviews/Methods.html#set'>set</a> (<span class='argstr'>aScheme</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Changes the current scheme.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>aScheme<td class='argumentdesc'>
|
||||
<p>An instance of <a href="./../Classes/Symbol.html">Symbol</a>. The scheme to use as current scheme.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*use' href='./../Overviews/Methods.html#use'>use</a> (<span class='argstr'>aScheme</span>, <span class='argstr'>func</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Executes a function body, temporarily setting the current GUI scheme. This is useful inside view's action functions in order to make this function use the GUI scheme that was originally used for the view of the action, even if the scheme has been switched meanwhile.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>aScheme<td class='argumentdesc'>
|
||||
<p>The scheme to use during the function execution.<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>An Instance of <a href="./../Classes/Function.html">Function</a>.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*useID' href='./../Overviews/Methods.html#useID'>useID</a> (<span class='argstr'>id</span>, <span class='argstr'>func</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <code class='code prettyprint lang-sc'>use</code> but using a scheme's id as first argument.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>id<td class='argumentdesc'>
|
||||
<p>The id of the scheme to use during the function execution.<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>A body to execute.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*add' href='./../Overviews/Methods.html#add'>add</a> (<span class='argstr'>aScheme</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Registers a new scheme. This is typically called by external libraries in their startup procedure. If a scheme with the same identifier (<code class='code prettyprint lang-sc'>scheme.id</code>) exists, it is overwritten.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>aScheme<td class='argumentdesc'>
|
||||
<p>The scheme to add.</table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*doesNotUnderstand' href='./../Overviews/Methods.html#doesNotUnderstand'>doesNotUnderstand</a> (<span class='argstr'>selector</span> <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>All method calls are mapped to the current scheme, so that for example <code class='code prettyprint lang-sc'>GUI.button</code> can be used and is delegated to the button association of the current scheme.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>selector<td class='argumentdesc'><tr><td class='argumentname'>... args<td class='argumentdesc'></table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*setSkin' href='./../Overviews/Methods.html#setSkin'>setSkin</a> (<span class='argstr'>skinName</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>skinName<td class='argumentdesc'></table></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*scheme' href='./../Overviews/Methods.html#scheme'>scheme</a> </h3>
|
||||
<div class='method'>
|
||||
<p>A class variable. Returns the current scheme.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*schemes' href='./../Overviews/Methods.html#schemes'>schemes</a> </h3>
|
||||
<div class='method'>
|
||||
<p>A class variable. Returns an <a href="./../Classes/IdentityDictionary.html">IdentityDictionary</a> of registered schemes.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*skin' href='./../Overviews/Methods.html#skin'>skin</a> </h3>
|
||||
<div class='method'>
|
||||
<p>A class variable. Returns the current skin.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*skins' href='./../Overviews/Methods.html#skins'>skins</a> </h3>
|
||||
<div class='method'>
|
||||
<p>A class variable. Returns an <a href="./../Classes/IdentityDictionary.html">IdentityDictionary</a> of registered skins.</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='*qt' href='./../Overviews/Methods.html#qt'>qt</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='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/GUI.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/GUI.schelp</a><br>link::Classes/GUI::<br>sc version: 3.8.0</div></div></body></html>
|
118
doc-schelp/Help-3.12.2/Classes/GVerb.html
Normal file
|
@ -0,0 +1,118 @@
|
|||
<!doctype html><html lang='en'><head><title>GVerb | 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 = 'GVerb';
|
||||
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'>GVerb:</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='#Known%20issues'>Known issues</a></li>
|
||||
<ul class='toc'></ul></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 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> > <a href='./../Browse.html#UGens>Reverbs'>Reverbs</a></span>
|
||||
</div><h1>GVerb<span id='superclasses'> : <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></span>
|
||||
</h1>
|
||||
<div id='summary'>A two-channel reverb</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/GVerb.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/GVerb.sc'>GVerb.sc</a></div><div id='related'>See also: <a href="./../Classes/FreeVerb.html">FreeVerb</a>, <a href="./../Classes/FreeVerb2.html">FreeVerb2</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A two-channel reverb <a href="./../Classes/UGen.html">UGen</a>, based on the "GVerb" LADSPA effect by Juhana Sadeharju (kouhia at nic.funet.fi).<h3><a class='anchor' name='Known%20issues'>Known issues</a></h3>
|
||||
<ul>
|
||||
<li>There is a large CPU spike when the synth is instantiated while all the delay lines are zeroed out.<li>Quick changes in roomsize result in zipper noise.<li><em>Changing the roomsize does not work properly! Still trying to look for the bug... (-josh)</em></ul>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>GVerb.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in</span>, <span class='argstr'>roomsize: 10</span>, <span class='argstr'>revtime: 3</span>, <span class='argstr'>damping: 0.5</span>, <span class='argstr'>inputbw: 0.5</span>, <span class='argstr'>spread: 15</span>, <span class='argstr'>drylevel: 1</span>, <span class='argstr'>earlyreflevel: 0.7</span>, <span class='argstr'>taillevel: 0.5</span>, <span class='argstr'>maxroomsize: 300</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>mono input.<tr><td class='argumentname'>roomsize<td class='argumentdesc'>
|
||||
<p>in squared meters.<tr><td class='argumentname'>revtime<td class='argumentdesc'>
|
||||
<p>in seconds.<tr><td class='argumentname'>damping<td class='argumentdesc'>
|
||||
<p>0 to 1, high frequency rolloff, 0 damps the reverb signal completely, 1 not at all.<tr><td class='argumentname'>inputbw<td class='argumentdesc'>
|
||||
<p>0 to 1, same as damping control, but on the input signal.<tr><td class='argumentname'>spread<td class='argumentdesc'>
|
||||
<p>a control on the stereo spread and diffusion of the reverb signal.<tr><td class='argumentname'>drylevel<td class='argumentdesc'>
|
||||
<p>amount of dry signal.<tr><td class='argumentname'>earlyreflevel<td class='argumentdesc'>
|
||||
<p>amount of early reflection level.<tr><td class='argumentname'>taillevel<td class='argumentdesc'>
|
||||
<p>amount of tail level.<tr><td class='argumentname'>maxroomsize<td class='argumentdesc'>
|
||||
<p>to set the size of the delay lines. Defaults to roomsize + 1.<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><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'>(
|
||||
SynthDef(\test, { |out, roomsize, revtime, damping, inputbw, spread = 15, drylevel, earlylevel,
|
||||
taillevel|
|
||||
|
||||
var a = Resonz.ar(
|
||||
Array.fill(4, { Dust.ar(2) }),
|
||||
1760 * [1, 2, 4, 8],
|
||||
0.01
|
||||
).sum * 10;
|
||||
|
||||
// var a = SoundIn.ar(0);
|
||||
// var a = PlayBuf.ar(1, 0);
|
||||
|
||||
Out.ar(out,
|
||||
GVerb.ar(
|
||||
a,
|
||||
roomsize,
|
||||
revtime,
|
||||
damping,
|
||||
inputbw,
|
||||
spread,
|
||||
drylevel.dbamp,
|
||||
earlylevel.dbamp,
|
||||
taillevel.dbamp,
|
||||
roomsize, 0.3)
|
||||
+ a
|
||||
)
|
||||
}).add
|
||||
)
|
||||
|
||||
|
||||
s.scope(2);
|
||||
|
||||
// bathroom
|
||||
a = Synth(\test, [\roomsize, 5, \revtime, 0.6, \damping, 0.62, \inputbw, 0.48, \drylevel -6, \earlylevel, -11, \taillevel, -13]);
|
||||
a.free;
|
||||
|
||||
//living room
|
||||
a = Synth(\test, [\roomsize, 16, \revtime, 1.24, \damping, 0.10, \inputbw, 0.95, \drylevel -3, \earlylevel, -15, \taillevel, -17]);
|
||||
a.free;
|
||||
|
||||
//church
|
||||
a = Synth(\test, [\roomsize, 80, \revtime, 4.85, \damping, 0.41, \inputbw, 0.19, \drylevel -3, \earlylevel, -9, \taillevel, -11]);
|
||||
a.free;
|
||||
|
||||
// cathedral
|
||||
a = Synth(\test, [\roomsize, 243, \revtime, 1, \damping, 0.1, \inputbw, 0.34, \drylevel -3, \earlylevel, -11, \taillevel, -9]);
|
||||
a.free
|
||||
|
||||
// canyon
|
||||
a = Synth(\test, [\roomsize, 300, \revtime, 103, \damping, 0.43, \inputbw, 0.51, \drylevel -5, \earlylevel, -26, \taillevel, -20]);
|
||||
a.free;
|
||||
|
||||
s.quit;</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/GVerb.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/GVerb.schelp</a><br>link::Classes/GVerb::<br></div></div></body></html>
|
227
doc-schelp/Help-3.12.2/Classes/Gendy1.html
Normal file
|
@ -0,0 +1,227 @@
|
|||
<html><head><title>Gendy1</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>Stochastic'>UGens>Generators>Stochastic</a></div>
|
||||
<h1>Gendy1</h1>
|
||||
<div id='summary'>Dynamic stochastic synthesis generator.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Gendyn.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Gendyn.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/Gendy2.html">Gendy2</a>, <a href="./../Classes/Gendy3.html">Gendy3</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Technical%20notes'>Technical notes</a></li>
|
||||
<ul class='toc'></ul></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><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>An implementation of the dynamic stochastic synthesis generator conceived by Iannis Xenakis and described in <em>Formalized Music (1992, Stuyvesant, NY: Pendragon Press) chapter 9 (pp 246-254) and chapters 13 and 14 (pp 289-322)</em>.
|
||||
<p>The BASIC program in the book was written by Marie-Helene Serra so I think it helpful to credit her too.
|
||||
<p>The program code has been adapted to avoid infinities in the probability distribution functions.
|
||||
<p>The distributions are hard-coded in C but there is an option to have new amplitude or time breakpoints sampled from a continuous controller input.<h3><a class='anchor' name='Technical%20notes'>Technical notes</a></h3>
|
||||
|
||||
<p>X's plan as described in chapter 13 allows the 12 segments in the period to be successively modified with each new period. Yet the period is allowed to vary as the sum of the segment durations, as figure 1 demonstrates. We can setup some memory of n (conventionally 12) points, or even simply vary successively a single point's ordinate and duration. There are thus various schemes available to us. In one, fix period T and only move the (ti, Ei) within the period. In another, have a memory of 12 segments but allow continuous modification of the inter point intervals and the amplitudes. In yet another, just have one point and random walk its amplitude and duration based on the probability distribution. In this implementation I allow the user to initialise a certain number of memory points which is up to them. To restrict the period to be unchanging, you must set rate variation to zero (dscale=0).
|
||||
<p>SuperCollider implementation by Nick Collins.<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'>ampdist: 1</span>, <span class='argstr'>durdist: 1</span>, <span class='argstr'>adparam: 1</span>, <span class='argstr'>ddparam: 1</span>, <span class='argstr'>minfreq: 440</span>, <span class='argstr'>maxfreq: 660</span>, <span class='argstr'>ampscale: 0.5</span>, <span class='argstr'>durscale: 0.5</span>, <span class='argstr'>initCPs: 12</span>, <span class='argstr'>knum</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>ampdist: 1</span>, <span class='argstr'>durdist: 1</span>, <span class='argstr'>adparam: 1</span>, <span class='argstr'>ddparam: 1</span>, <span class='argstr'>minfreq: 20</span>, <span class='argstr'>maxfreq: 1000</span>, <span class='argstr'>ampscale: 0.5</span>, <span class='argstr'>durscale: 0.5</span>, <span class='argstr'>initCPs: 12</span>, <span class='argstr'>knum</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'>ampdist<td class='argumentdesc'>
|
||||
<p>Choice of probability distribution for the next perturbation of the amplitude of a control point.
|
||||
<p>The distributions are (adapted from the GENDYN program in Formalized Music):<table>
|
||||
<tr><td>0:<td>LINEAR.<tr><td>1:<td>CAUCHY.<tr><td>2:<td>LOGIST.<tr><td>3:<td>HYPERBCOS.<tr><td>4:<td>ARCSINE.<tr><td>5:<td>EXPON.<tr><td>6:<td>SINUS.</table>
|
||||
|
||||
<p>Where the sinus (Xenakis' name) is in this implementation taken as sampling from a third party oscillator. See example below.<tr><td class='argumentname'>durdist<td class='argumentdesc'>
|
||||
<p>Choice of distribution for the perturbation of the current inter control point duration.<tr><td class='argumentname'>adparam<td class='argumentdesc'>
|
||||
<p>A parameter for the shape of the amplitude probability distribution, requires values in the range 0.0001 to 1 (there are safety checks in the code so don't worry too much if you want to modulate!).<tr><td class='argumentname'>ddparam<td class='argumentdesc'>
|
||||
<p>A parameter for the shape of the duration probability distribution, requires values in the range 0.0001 to 1.<tr><td class='argumentname'>minfreq<td class='argumentdesc'>
|
||||
<p>Minimum allowed frequency of oscillation for the Gendy1 oscillator, so gives the largest period the duration is allowed to take on.<tr><td class='argumentname'>maxfreq<td class='argumentdesc'>
|
||||
<p>Maximum allowed frequency of oscillation for the Gendy1 oscillator, so gives the smallest period the duration is allowed to take on.<tr><td class='argumentname'>ampscale<td class='argumentdesc'>
|
||||
<p>Normally 0.0 to 1.0, multiplier for the distribution's delta value for amplitude. An ampscale of 1.0 allows the full range of -1 to 1 for a change of amplitude.<tr><td class='argumentname'>durscale<td class='argumentdesc'>
|
||||
<p>Normally 0.0 to 1.0, multiplier for the distribution's delta value for duration. An ampscale of 1.0 allows the full range of -1 to 1 for a change of duration.<tr><td class='argumentname'>initCPs<td class='argumentdesc'>
|
||||
<p>Initialise the number of control points in the memory. Xenakis specifies 12. There would be this number of control points per cycle of the oscillator, though the oscillator's period will constantly change due to the duration distribution.<tr><td class='argumentname'>knum<td class='argumentdesc'>
|
||||
<p>Current number of utilised control points, allows modulation.<tr><td class='argumentname'>mul<td class='argumentdesc'><tr><td class='argumentname'>add<td class='argumentdesc'></table><h4>Discussion:</h4>
|
||||
|
||||
<p>All parameters can be modulated at control rate except for <code class='code prettyprint lang-sc'>initCPs</code> which is used only at initialisation.</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>
|
||||
<div class='warning'><span class='warninglabel'>WARNING:</span> if you have lots of CPs and you have fast frequencies, the CPU cost goes up a lot because a new CP move happens every sample!</div><pre class='code prettyprint lang-sc'>//defaults
|
||||
{Pan2.ar(Gendy1.ar)}.play
|
||||
|
||||
//wandering bass/ powerline
|
||||
{Pan2.ar(Gendy1.ar(1,1,1.0,1.0,30,100,0.3,0.05,5))}.play
|
||||
|
||||
//play me
|
||||
{Pan2.ar(RLPF.ar(Gendy1.ar(2,3,minfreq:20,maxfreq:MouseX.kr(100,1000),durscale:0.0,initCPs:40),500,0.3,0.2),0.0)}.play
|
||||
|
||||
//scream! - careful with your ears for this one!
|
||||
(
|
||||
{
|
||||
var mx, my;
|
||||
|
||||
mx= MouseX.kr(220,440);
|
||||
my= MouseY.kr(0.0,1.0);
|
||||
|
||||
Pan2.ar(Gendy1.ar(2,3,1,1,minfreq:mx, maxfreq:8*mx, ampscale:my, durscale:my, initCPs:7, mul:0.3), 0.0)
|
||||
}.play
|
||||
)
|
||||
|
||||
|
||||
//1 CP = random noise effect
|
||||
{Pan2.ar(Gendy1.ar(initCPs:1))}.play
|
||||
|
||||
//2 CPs = suudenly an oscillator (though a fast modulating one here)
|
||||
{Pan2.ar(Gendy1.ar(initCPs:2))}.play
|
||||
|
||||
|
||||
//used as an LFO
|
||||
(
|
||||
{
|
||||
Pan2.ar(
|
||||
SinOsc.ar(
|
||||
Gendy1.kr(2, 4,
|
||||
SinOsc.kr(0.1,0,0.49,0.51),
|
||||
SinOsc.kr(0.13,0,0.49,0.51),
|
||||
3.4, 3.5,
|
||||
SinOsc.kr(0.17,0,0.49,0.51),
|
||||
SinOsc.kr(0.19,0,0.49,0.51),
|
||||
10,10,50, 350),
|
||||
0, 0.3),
|
||||
0.0)
|
||||
}.play
|
||||
)
|
||||
|
||||
//wasp
|
||||
{Pan2.ar(Gendy1.ar(0, 0, SinOsc.kr(0.1, 0, 0.1, 0.9),1.0, 50,1000, 1,0.005, 12, 12, 0.2), 0.0)}.play
|
||||
|
||||
|
||||
//modulate distributions
|
||||
//change of pitch as distributions change the duration structure and spectrum
|
||||
{Pan2.ar(Gendy1.ar(MouseX.kr(0,7),MouseY.kr(0,7),mul:0.2), 0.0)}.play
|
||||
|
||||
|
||||
//modulate num of CPs
|
||||
{Pan2.ar(Gendy1.ar(knum:MouseX.kr(1,13),mul:0.2), 0.0)}.play
|
||||
|
||||
|
||||
(//Gendy into Gendy...with cartoon side effects
|
||||
{Pan2.ar(Gendy1.ar(
|
||||
maxfreq:Gendy1.kr(5,4,0.3, 0.7, 0.1, MouseY.kr(0.1,10), 1.0, 1.0, 5,5, 500, 600),
|
||||
knum:MouseX.kr(1,13),mul:0.2), 0.0)
|
||||
}.play
|
||||
)
|
||||
|
||||
//use SINUS to track any oscillator and take CP positions from it, use adparam and ddparam as the inputs to sample
|
||||
{Pan2.ar(Gendy1.ar(6,6,LFPulse.kr(100, 0, 0.4, 1.0), SinOsc.kr(30, 0, 0.5),mul:0.2), 0.0)}.play
|
||||
|
||||
|
||||
//try out near the corners especially
|
||||
(
|
||||
{Pan2.ar(Gendy1.ar(6,6,LFPulse.kr(MouseX.kr(0,200), 0, 0.4, 1.0),
|
||||
SinOsc.kr(MouseY.kr(0,200), 0, 0.5),mul:0.2), 0.0)}.play
|
||||
)
|
||||
|
||||
//texture
|
||||
(
|
||||
{
|
||||
Mix.fill(10,{
|
||||
var freq;
|
||||
|
||||
freq= rrand(130,160.3);
|
||||
Pan2.ar(SinOsc.ar(Gendy1.ar(6.rand,6.rand,SinOsc.kr(0.1,0,0.49,0.51),
|
||||
SinOsc.kr(0.13,0,0.49,0.51),freq ,freq, SinOsc.kr(0.17,0,0.49,0.51),
|
||||
SinOsc.kr(0.19,0,0.49,0.51), 12, 12, 200, 400), 0, 0.1), 1.0.rand2)
|
||||
});
|
||||
}.play
|
||||
)
|
||||
|
||||
//wahhhhhhhh- try durscale 10.0 and 0.0 too
|
||||
(
|
||||
{Pan2.ar(
|
||||
CombN.ar(
|
||||
Resonz.ar(
|
||||
Gendy1.ar(2,3,minfreq:1, maxfreq:MouseX.kr(10,700), durscale:0.1, initCPs:10),
|
||||
MouseY.kr(50,1000), 0.1)
|
||||
,0.1,0.1,5, 0.6
|
||||
)
|
||||
, 0.0)}.play
|
||||
)
|
||||
|
||||
//overkill
|
||||
(
|
||||
{
|
||||
var n;
|
||||
n=10;
|
||||
|
||||
Mix.fill(n,{
|
||||
var freq, numcps;
|
||||
|
||||
freq= rrand(130,160.3);
|
||||
numcps= rrand(2,20);
|
||||
Pan2.ar(Gendy1.ar(6.rand,6.rand,1.0.rand,1.0.rand,freq ,freq, 1.0.rand, 1.0.rand, numcps,
|
||||
SinOsc.kr(exprand(0.02,0.2), 0, numcps/2, numcps/2), 0.5/(n.sqrt)), 1.0.rand2)
|
||||
});
|
||||
}.play
|
||||
)
|
||||
|
||||
//another traffic moment
|
||||
(
|
||||
{
|
||||
var n;
|
||||
n=10;
|
||||
|
||||
Resonz.ar(
|
||||
Mix.fill(n,{
|
||||
var freq, numcps;
|
||||
|
||||
freq= rrand(50,560.3);
|
||||
numcps= rrand(2,20);
|
||||
Pan2.ar(Gendy1.ar(6.rand,6.rand,1.0.rand,1.0.rand,freq ,freq, 1.0.rand, 1.0.rand, numcps,
|
||||
SinOsc.kr(exprand(0.02,0.2), 0, numcps/2, numcps/2), 0.5/(n.sqrt)), 1.0.rand2)
|
||||
})
|
||||
,MouseX.kr(100,2000), MouseY.kr(0.01,1.0))
|
||||
;
|
||||
}.play
|
||||
)
|
||||
|
||||
(
|
||||
{
|
||||
var n;
|
||||
n=15;
|
||||
|
||||
Out.ar(0,
|
||||
Resonz.ar(
|
||||
Mix.fill(n,{
|
||||
var freq, numcps;
|
||||
|
||||
freq= rrand(330,460.3);
|
||||
numcps= rrand(2,20);
|
||||
Pan2.ar(Gendy1.ar(6.rand,6.rand,1.0.rand,1.0.rand,freq,MouseX.kr(freq,2*freq), 1.0.rand, 1.0.rand, numcps,
|
||||
SinOsc.kr(exprand(0.02,0.2), 0, numcps/2, numcps/2), 0.5/(n.sqrt)), 1.0.rand2)
|
||||
})
|
||||
,MouseX.kr(100,2000), MouseY.kr(0.01,1.0))
|
||||
)
|
||||
|
||||
}.play;
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Gendy1.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Gendy1.schelp</a><br>link::Classes/Gendy1::<br>sc version: 3.8.0</div></div></body></html>
|
62
doc-schelp/Help-3.12.2/Classes/GrayNoise.html
Normal file
|
@ -0,0 +1,62 @@
|
|||
<!doctype html><html lang='en'><head><title>GrayNoise | 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 = 'GrayNoise';
|
||||
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'>GrayNoise:</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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Stochastic'>Stochastic</a></span>
|
||||
</div><h1>GrayNoise<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'>Gray 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/BrownNoise.html">BrownNoise</a>, <a href="./../Classes/ClipNoise.html">ClipNoise</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 which results from flipping random bits in a word. This type of noise has a high RMS level relative to its peak to peak level. The spectrum is emphasized towards lower frequencies.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>GrayNoise.</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'>GrayNoise.</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>
|
||||
<pre class='code prettyprint lang-sc'>(
|
||||
SynthDef("help-GrayNoise", { arg out=0;
|
||||
Out.ar(out,
|
||||
GrayNoise.ar(0.1)
|
||||
)
|
||||
}).play;
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/GrayNoise.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/GrayNoise.schelp</a><br>link::Classes/GrayNoise::<br></div></div></body></html>
|
BIN
doc-schelp/Help-3.12.2/Classes/Greyhole-logo-small.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
doc-schelp/Help-3.12.2/Classes/Greyhole-logo.jpg
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
doc-schelp/Help-3.12.2/Classes/IdentityDictionary_01.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
doc-schelp/Help-3.12.2/Classes/IdentityDictionary_02.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
doc-schelp/Help-3.12.2/Classes/IdentityDictionary_03.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
doc-schelp/Help-3.12.2/Classes/IdentityDictionary_04.png
Normal file
After Width: | Height: | Size: 27 KiB |
69
doc-schelp/Help-3.12.2/Classes/Impulse.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
<!doctype html><html lang='en'><head><title>Impulse | 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 = 'Impulse';
|
||||
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'>Impulse:</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>
|
||||
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-signalRange'>signalRange</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</span>
|
||||
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>Impulse<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'>Impulse 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/Blip.html">Blip</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Outputs non-bandlimited single sample impulses.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Impulse.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>freq: 440</span>, <span class='argstr'>phase: 0</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Impulse.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>freq: 440</span>, <span class='argstr'>phase: 0</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'>freq<td class='argumentdesc'>
|
||||
<p>Frequency in Hertz.<tr><td class='argumentname'>phase<td class='argumentdesc'>
|
||||
<p>Phase offset in cycles (0..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><h4>Discussion:</h4>
|
||||
|
||||
<p>An Impulse with frequency 0 returns a single impulse.</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='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-signalRange' href='./../Overviews/Methods.html#signalRange'>signalRange</a></h3>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>{ Impulse.ar(800, 0.0, 0.5, 0) }.play
|
||||
|
||||
{ Impulse.ar(XLine.kr(800,100,5), 0.0, 0.5, 0) }.play</pre>
|
||||
|
||||
<p>modulate phase:<pre class='code prettyprint lang-sc'>{ Impulse.ar(4, [0, MouseX.kr(0, 1)], 0.2) }.play;</pre>
|
||||
|
||||
<p>an Impulse with frequency 0 returns a single impulse:<pre class='code prettyprint lang-sc'>SynthDef(\imp, { OffsetOut.ar(0, Impulse.ar(0)); FreeSelf.kr(Impulse.kr(0)); }).add;
|
||||
fork { (1 / (1..60).scramble).do { |dt| Synth.grain(\imp); dt.wait } };</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Impulse.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Impulse.schelp</a><br>link::Classes/Impulse::<br></div></div></body></html>
|
113
doc-schelp/Help-3.12.2/Classes/InFeedback.html
Normal file
|
@ -0,0 +1,113 @@
|
|||
<html><head><title>InFeedback</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>InOut'>UGens>InOut</a></div>
|
||||
<h1>InFeedback</h1>
|
||||
<div id='summary'>Read signal from a bus with a current or one cycle old timestamp.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InOut.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/InOut.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/AbstractIn.html">AbstractIn</a> : <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/In.html">In</a>, <a href="./../Classes/LagIn.html">LagIn</a>, <a href="./../Classes/LocalIn.html">LocalIn</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>When the various output UGens ( <a href="./../Classes/Out.html">Out</a> , <a href="./../Classes/OffsetOut.html">OffsetOut</a> , <a href="./../Classes/XOut.html">XOut</a> ) write data to a bus, they mix it with any data from the current cycle, but overwrite any data from the previous cycle. ( <a href="./../Classes/ReplaceOut.html">ReplaceOut</a> overwrites all data regardless.) Thus depending on node order and what synths are writing to the bus, the data on a given bus may be from the current cycle or be one cycle old at the time of reading. In.ar checks the timestamp of any data it reads in and zeros any data from the previous cycle (for use within that node; the data remains on the bus). This is fine for audio data, as it avoids feedback, but for control data it is useful to be able to read data from any place in the node order. For this reason In.kr also reads data that is older than the current cycle.
|
||||
<p>In some cases we might also want to read audio from a node later in the current node order. This is the purpose of InFeedback. The delay introduced by this is one block size, which equals about 0.0014 sec at the default block size and sample rate. (See the resonator example below to see the implications of this.)
|
||||
<p>The variably mixing and overwriting behaviour of the output UGens can make order of execution crucial. (No pun intended.) For example with a node order like the following the InFeedback UGen in Synth 2 will only receive data from Synth 1 (→ = write out; ← = read in):<ul>
|
||||
<li>Synth1 → busA (this synth overwrites the output of Synth3 before it reaches Synth2)<li>Synth2 (with InFeedback) ← busA<li>Synth3 → busA</ul>
|
||||
|
||||
<p>If Synth1 were moved after Synth2 then Synth2's InFeedback would receive a mix of the output from Synth1 and Synth3. This would also be true if Synth2 came after Synth1 and Synth3. In both cases data from Synth1 and Synth3 would have the same time stamp (either current or from the previous cycle), so nothing would be overwritten.
|
||||
<p>Because of this it is often useful to allocate a separate bus for feedback. With the following arrangement Synth2 will receive data from Synth3 regardless of Synth1's position in the node order:<ul>
|
||||
<li>Synth1 → busA<li>Synth2 (with InFeedback) ← busB<li>Synth3 → busB + busA</ul>
|
||||
|
||||
<p>The second example below demonstrates this issue.<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'>bus: 0</span>, <span class='argstr'>numChannels: 1</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>bus<td class='argumentdesc'>
|
||||
<p>The index of the bus to read in from.<tr><td class='argumentname'>numChannels<td class='argumentdesc'>
|
||||
<p>The number of channels (i.e. adjacent buses) to read in. The default is 1. You cannot modulate this number by assigning it to an argument in a SynthDef.</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>audio feedback modulation:<pre class='code prettyprint lang-sc'>(
|
||||
SynthDef("help-InFeedback", { arg out=0, in=0;
|
||||
var input, sound;
|
||||
input = InFeedback.ar(in, 1);
|
||||
sound = SinOsc.ar(input * 1300 + 300, 0, 0.4);
|
||||
Out.ar(out, sound);
|
||||
|
||||
}).play;
|
||||
)</pre>
|
||||
|
||||
<p>this shows how a node can read audio from a bus that is being written to by a synth following it:<pre class='code prettyprint lang-sc'>(
|
||||
SynthDef("help-InFeedback", { arg out=0, in=0;
|
||||
Out.ar(out,
|
||||
InFeedback.ar(in, 1)
|
||||
);
|
||||
}).add;
|
||||
SynthDef("help-SinOsc", { arg out=0, freq=440;
|
||||
Out.ar(out, SinOsc.ar(freq, 0, 0.1))
|
||||
}).add;
|
||||
)
|
||||
|
||||
x = Bus.audio(s, 1);
|
||||
|
||||
// read from bus n play to bus 0 (silent)
|
||||
a = Synth("help-InFeedback",[\in, x.index, \out, 0]);
|
||||
|
||||
// now play a synth after this one, playing to bus x
|
||||
b = Synth.after(a, "help-SinOsc", [\out, x.index]);
|
||||
|
||||
// add another synth before a which also writes to bus x
|
||||
// now you can't hear b, as its data is one cycle old, and is overwritten by c
|
||||
c = Synth.before(a, "help-SinOsc", [\out, x.index, \freq, 800]);
|
||||
|
||||
// free c and you can hear b again
|
||||
c.free;
|
||||
x.free;
|
||||
|
||||
a.free; b.free;</pre>
|
||||
|
||||
<p>The example below implements a resonator. Note that you must subtract the blockSize in order for the tuning to be correct. See <a href="./../Classes/LocalIn.html">LocalIn</a> for an equivalent example.<pre class='code prettyprint lang-sc'>(
|
||||
var play, imp, initial;
|
||||
SynthDef("testRes", {
|
||||
|
||||
play = InFeedback.ar(10, 1); // 10 is feedback channel
|
||||
imp = Impulse.ar(1);
|
||||
|
||||
// feedback
|
||||
OffsetOut.ar(10, DelayC.ar(imp + (play * 0.995), 1,
|
||||
440.reciprocal - ControlRate.ir.reciprocal)); // subtract block size
|
||||
|
||||
OffsetOut.ar(0, play);
|
||||
|
||||
}).play(s);
|
||||
|
||||
// Compare with this for tuning
|
||||
{ SinOsc.ar(440, 0, 0.2) }.play(s, 1);
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/InFeedback.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/InFeedback.schelp</a><br>link::Classes/InFeedback::<br>sc version: 3.8.0</div></div></body></html>
|
314
doc-schelp/Help-3.12.2/Classes/Integer.html
Normal file
|
@ -0,0 +1,314 @@
|
|||
<!doctype html><html lang='en'><head><title>Integer | 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 = 'Integer';
|
||||
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'>Integer:</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>
|
||||
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Iteration'>Iteration</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-do'>do</a> </li>
|
||||
<li class='toc3'><a href='#-reverseDo'>reverseDo</a> </li>
|
||||
<li class='toc3'><a href='#-for'>for</a> </li>
|
||||
<li class='toc3'><a href='#-forBy'>forBy</a> </li>
|
||||
<li class='toc3'><a href='#-collect'>collect</a> </li>
|
||||
<li class='toc3'><a href='#-collectAs'>collectAs</a> </li>
|
||||
<li class='toc3'><a href='#-to'>to</a> </li>
|
||||
<li class='toc3'><a href='#-geom'>geom</a> </li>
|
||||
<li class='toc3'><a href='#-fib'>fib</a> </li>
|
||||
<li class='toc3'><a href='#-factors'>factors</a> </li>
|
||||
<li class='toc3'><a href='#-factorial'>factorial</a> </li>
|
||||
</ul><li class='toc2'><a href='#Random%20Numbers'>Random Numbers</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-xrand'>xrand</a> </li>
|
||||
<li class='toc3'><a href='#-xrand2'>xrand2</a> </li>
|
||||
</ul><li class='toc2'><a href='#Conversion'>Conversion</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-asAscii'>asAscii</a> </li>
|
||||
<li class='toc3'><a href='#-asDigit'>asDigit</a> </li>
|
||||
<li class='toc3'><a href='#-asBinaryDigits'>asBinaryDigits</a> </li>
|
||||
<li class='toc3'><a href='#-asDigits'>asDigits</a> </li>
|
||||
<li class='toc3'><a href='#-asBinaryString'>asBinaryString</a> </li>
|
||||
<li class='toc3'><a href='#-asHexString'>asHexString</a> </li>
|
||||
<li class='toc3'><a href='#-asIPString'>asIPString</a> </li>
|
||||
<li class='toc3'><a href='#-degreeToKey'>degreeToKey</a> </li>
|
||||
<li class='toc3'><a href='#-grayCode'>grayCode</a> </li>
|
||||
</ul><li class='toc2'><a href='#Binary%20Representation'>Binary Representation</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-setBit'>setBit</a> </li>
|
||||
<li class='toc3'><a href='#-leadingZeroes'>leadingZeroes</a> </li>
|
||||
<li class='toc3'><a href='#-trailingZeroes'>trailingZeroes</a> </li>
|
||||
<li class='toc3'><a href='#-numBits'>numBits</a> </li>
|
||||
</ul><li class='toc2'><a href='#Properties'>Properties</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-even'>even</a> </li>
|
||||
<li class='toc3'><a href='#-odd'>odd</a> </li>
|
||||
</ul><li class='toc2'><a href='#Powers%20Of%20Two'>Powers Of Two</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-nextPowerOfTwo'>nextPowerOfTwo</a> </li>
|
||||
<li class='toc3'><a href='#-isPowerOfTwo'>isPowerOfTwo</a> </li>
|
||||
</ul><li class='toc2'><a href='#Prime%20Numbers'>Prime Numbers</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-nthPrime'>nthPrime</a> </li>
|
||||
<li class='toc3'><a href='#-prevPrime'>prevPrime</a> </li>
|
||||
<li class='toc3'><a href='#-nextPrime'>nextPrime</a> </li>
|
||||
<li class='toc3'><a href='#-isPrime'>isPrime</a> </li>
|
||||
<li class='toc3'><a href='#-indexOfPrime'>indexOfPrime</a> </li>
|
||||
</ul><li class='toc2'><a href='#Misc'>Misc</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-pidRunning'>pidRunning</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='#-+'>+</a> </li>
|
||||
<li class='toc3'><a href='#--'>-</a> </li>
|
||||
<li class='toc3'><a href='#-archiveAsCompileString'>archiveAsCompileString</a> </li>
|
||||
<li class='toc3'><a href='#-asBus'>asBus</a> </li>
|
||||
<li class='toc3'><a href='#-asFileSafeChar'>asFileSafeChar</a> </li>
|
||||
<li class='toc3'><a href='#-asFileSafeString'>asFileSafeString</a> </li>
|
||||
<li class='toc3'><a href='#-asGroup'>asGroup</a> </li>
|
||||
<li class='toc3'><a href='#-asNodeID'>asNodeID</a> </li>
|
||||
<li class='toc3'><a href='#-asStringToBase'>asStringToBase</a> </li>
|
||||
<li class='toc3'><a href='#-asTarget'>asTarget</a> </li>
|
||||
<li class='toc3'><a href='#-asUnicode'>asUnicode</a> </li>
|
||||
<li class='toc3'><a href='#-clip'>clip</a> </li>
|
||||
<li class='toc3'><a href='#-exit'>exit</a> </li>
|
||||
<li class='toc3'><a href='#-fold'>fold</a> </li>
|
||||
<li class='toc3'><a href='#-generate'>generate</a> </li>
|
||||
<li class='toc3'><a href='#-hash'>hash</a> </li>
|
||||
<li class='toc3'><a href='#-isAlt'>isAlt</a> </li>
|
||||
<li class='toc3'><a href='#-isCaps'>isCaps</a> </li>
|
||||
<li class='toc3'><a href='#-isCmd'>isCmd</a> </li>
|
||||
<li class='toc3'><a href='#-isCtrl'>isCtrl</a> </li>
|
||||
<li class='toc3'><a href='#-isFun'>isFun</a> </li>
|
||||
<li class='toc3'><a href='#-isHelp'>isHelp</a> </li>
|
||||
<li class='toc3'><a href='#-isInteger'>isInteger</a> </li>
|
||||
<li class='toc3'><a href='#-isNumPad'>isNumPad</a> </li>
|
||||
<li class='toc3'><a href='#-isShift'>isShift</a> </li>
|
||||
<li class='toc3'><a href='#-log2Ceil'>log2Ceil</a> </li>
|
||||
<li class='toc3'><a href='#-schedBundle'>schedBundle</a> </li>
|
||||
<li class='toc3'><a href='#-wrap'>wrap</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#Math'>Math</a></span>
|
||||
</div><h1>Integer<span id='superclasses'> : <a href="../Classes/SimpleNumber.html">SimpleNumber</a> : <a href="../Classes/Number.html">Number</a> : <a href="../Classes/Magnitude.html">Magnitude</a> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>Integer number</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Math/Integer.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Math/Integer.sc'>Integer.sc</a></div></div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A 32 bit integer. Integer inherits most of its behaviour from its superclass.<div class='note'><span class='notelabel'>NOTE:</span> A 32 bit signed integer can represent values in the range -2147483648 to 2147483647. Adding up further returns in a wrapped result, so that and 2147483647+1= -2147483648. For a larger range, one can use <a href="./../Classes/Float.html">Float</a>, which is 64 bit and supports many (but not all) numerical methods that int does.</div><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='Iteration'>Iteration</a></h3>
|
||||
<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='method'>
|
||||
<p>Executes <strong>function</strong> for all integers from zero to this minus one.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>function<td class='argumentdesc'>
|
||||
<p>a <a href="./../Classes/Function.html">Function</a> which is passed two arguments, both of which are the same integer from zero to this minus one. The reason two arguments are passed is for symmetry with the implementations of do in <a href="./../Classes/Collection.html">Collection</a>.</table></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='method'>
|
||||
<p>Executes <strong>function</strong> for all integers from this minus one to zero.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-for' href='./../Overviews/Methods.html#for'>for</a>(<span class='argstr'>endval</span>, <span class='argstr'>function</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Executes <strong>function</strong> for all integers from this to <strong>endval</strong>, inclusive.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>endval<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a>.<tr><td class='argumentname'>function<td class='argumentdesc'>
|
||||
<p>a <a href="./../Classes/Function.html">Function</a> which is passed two arguments, the first which is an integer from this to endval, and the second which is a number from zero to the number of iterations minus one.</table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-forBy' href='./../Overviews/Methods.html#forBy'>forBy</a>(<span class='argstr'>endval</span>, <span class='argstr'>stepval</span>, <span class='argstr'>function</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Executes <strong>function</strong> for all integers from this to <strong>endval</strong>, inclusive, stepping each time by <strong>stepval</strong>.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>endval<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a>.<tr><td class='argumentname'>stepval<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a>.<tr><td class='argumentname'>function<td class='argumentdesc'>
|
||||
<p>a <a href="./../Classes/Function.html">Function</a> which is passed two arguments, the first which is an integer from this to endval, and the second which is a number from zero to the number of iterations minus one.</table></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='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>an <a href="./../Classes/Array.html">Array</a> of this size filled by objects generated from evaluating the <strong>function</strong>.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-collectAs' href='./../Overviews/Methods.html#collectAs'>collectAs</a>(<span class='argstr'>function</span>, <span class='argstr'>class</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a <a href="./../Classes/Collection.html">Collection</a> of <strong>class</strong> of this size filled by objects generated from evaluating the <strong>function</strong>.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-to' href='./../Overviews/Methods.html#to'>to</a>(<span class='argstr'>hi</span>, <span class='argstr'>step: 1</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>an <a href="./../Classes/Interval.html">Interval</a> from this to <strong>hi</strong>.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-geom' href='./../Overviews/Methods.html#geom'>geom</a>(<span class='argstr'>start</span>, <span class='argstr'>grow</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>an array with a geometric series of this size from start.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fib' href='./../Overviews/Methods.html#fib'>fib</a>(<span class='argstr'>a: 0</span>, <span class='argstr'>b: 1</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>an array with a fibonacci series of this size beginning with <strong>a</strong> and <strong>b</strong>.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-factors' href='./../Overviews/Methods.html#factors'>factors</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the prime factors as array.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-factorial' href='./../Overviews/Methods.html#factorial'>factorial</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the factorial of this.</div></div><h3><a class='anchor' name='Random%20Numbers'>Random Numbers</a></h3>
|
||||
|
||||
<p>See also: <a href="./../Guides/Randomness.html">Randomness</a><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-xrand' href='./../Overviews/Methods.html#xrand'>xrand</a>(<span class='argstr'>exclude: 0</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>exclude<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a>.</table><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a random value from zero to this, excluding the value exclude.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-xrand2' href='./../Overviews/Methods.html#xrand2'>xrand2</a>(<span class='argstr'>exclude: 0</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>exclude<td class='argumentdesc'>
|
||||
<p>an <a href="./../Classes/Integer.html">Integer</a>.</table><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a random value from this.neg to this, excluding the value exclude.</div></div><h3><a class='anchor' name='Conversion'>Conversion</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asAscii' href='./../Overviews/Methods.html#asAscii'>asAscii</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a <a href="./../Classes/Char.html">Char</a> which has the ASCII value of the receiver.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asDigit' href='./../Overviews/Methods.html#asDigit'>asDigit</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a <a href="./../Classes/Char.html">Char</a> which represents the receiver as an ASCII digit.</div><h4>Discussion:</h4>
|
||||
|
||||
<p>For example <code class='code prettyprint lang-sc'>5.asDigit</code> returns <code class='code prettyprint lang-sc'>$5</code>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asBinaryDigits' href='./../Overviews/Methods.html#asBinaryDigits'>asBinaryDigits</a>(<span class='argstr'>numDigits: 8</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>an array with the binary digits (integer 0 or 1).</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asDigits' href='./../Overviews/Methods.html#asDigits'>asDigits</a>(<span class='argstr'>base: 10</span>, <span class='argstr'>numDigits</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>an array with the n-ary digits.</div><h4>Discussion:</h4>
|
||||
|
||||
<p>See also the complementary method <a href="./../Classes/SequenceableCollection.html#-convertDigits">SequenceableCollection: -convertDigits</a>.<pre class='code prettyprint lang-sc'>2007.asDigits;
|
||||
2007.asDigits(2);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asBinaryString' href='./../Overviews/Methods.html#asBinaryString'>asBinaryString</a>(<span class='argstr'>width: 8</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a string with the binary digits (0 or 1).</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asHexString' href='./../Overviews/Methods.html#asHexString'>asHexString</a>(<span class='argstr'>width: 8</span>)</h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a string with the hexadecimal digits (integer 0 to F).</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asIPString' href='./../Overviews/Methods.html#asIPString'>asIPString</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a string in IP format.</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-degreeToKey' href='./../Overviews/Methods.html#degreeToKey'>degreeToKey</a>(<span class='argstr'>scale</span>, <span class='argstr'>stepsPerOctave: 12</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Interpret this as index into a scale with a given number of steps per ocatve.<h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>2.degreeToKey([0, 2, 5, 7, 11]);</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-grayCode' href='./../Overviews/Methods.html#grayCode'>grayCode</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the gray code for the number.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>2.grayCode</pre>
|
||||
</div><h3><a class='anchor' name='Binary%20Representation'>Binary Representation</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-setBit' href='./../Overviews/Methods.html#setBit'>setBit</a>(<span class='argstr'>bitNumber</span>, <span class='argstr'>bool: true</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>set nth bit to zero (bool = false) or one (bool = true)</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-leadingZeroes' href='./../Overviews/Methods.html#leadingZeroes'>leadingZeroes</a></h3>
|
||||
<div class='method'>
|
||||
<p><code class='code prettyprint lang-sc'>{ _CLZ }</code></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-trailingZeroes' href='./../Overviews/Methods.html#trailingZeroes'>trailingZeroes</a></h3>
|
||||
<div class='method'>
|
||||
<p><code class='code prettyprint lang-sc'>{ _CTZ }</code></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-numBits' href='./../Overviews/Methods.html#numBits'>numBits</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>number of required bits</div></div><h3><a class='anchor' name='Properties'>Properties</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-even' href='./../Overviews/Methods.html#even'>even</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>true if dividable by 2 with no rest</div></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-odd' href='./../Overviews/Methods.html#odd'>odd</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>true if not dividable by 2 with no rest</div></div><h3><a class='anchor' name='Powers%20Of%20Two'>Powers Of Two</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-nextPowerOfTwo' href='./../Overviews/Methods.html#nextPowerOfTwo'>nextPowerOfTwo</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the next power of two greater than or equal to the receiver.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>13.nextPowerOfTwo.postln;
|
||||
64.nextPowerOfTwo.postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isPowerOfTwo' href='./../Overviews/Methods.html#isPowerOfTwo'>isPowerOfTwo</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the whether the receiver is a power of two.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>13.isPowerOfTwo.postln;
|
||||
64.isPowerOfTwo.postln;</pre>
|
||||
</div><h3><a class='anchor' name='Prime%20Numbers'>Prime Numbers</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-nthPrime' href='./../Overviews/Methods.html#nthPrime'>nthPrime</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the nth prime number. The receiver must be from 0 to 6541.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>[0,1,2,3,4,5].collect({ arg i; i.nthPrime; }).postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prevPrime' href='./../Overviews/Methods.html#prevPrime'>prevPrime</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the next prime less than or equal to the receiver up to 65521.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>25.prevPrime.postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-nextPrime' href='./../Overviews/Methods.html#nextPrime'>nextPrime</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the next prime less than or equal to the receiver up to 65521.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>25.nextPrime.postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isPrime' href='./../Overviews/Methods.html#isPrime'>isPrime</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>whether the receiver is prime.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>25.isPrime.postln;
|
||||
13.isPrime.postln;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-indexOfPrime' href='./../Overviews/Methods.html#indexOfPrime'>indexOfPrime</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the index of a prime number less than or equal to the receiver up to 65521. If the receiver is not a prime, the answer is nil.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>23.indexOfPrime;
|
||||
25.indexOfPrime;</pre>
|
||||
</div><h3><a class='anchor' name='Misc'>Misc</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pidRunning' href='./../Overviews/Methods.html#pidRunning'>pidRunning</a></h3>
|
||||
<div class='method'><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a Boolean for whether or not the specified pid is running.</div><h4>Discussion:</h4>
|
||||
<pre class='code prettyprint lang-sc'>p = "cat".unixCmd;
|
||||
p.pidRunning; // cat will stay alive
|
||||
("kill" + p).unixCmd
|
||||
p.pidRunning;</pre>
|
||||
|
||||
<p></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='-*' href='./../Overviews/Methods.html#*'>*</a>(<span class='argstr'>aNumber</span>, <span class='argstr'>adverb</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'></span><a class='method-name' name='-+' href='./../Overviews/Methods.html#+'>+</a>(<span class='argstr'>aNumber</span>, <span class='argstr'>adverb</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'></span><a class='method-name' name='--' href='./../Overviews/Methods.html#-'>-</a>(<span class='argstr'>aNumber</span>, <span class='argstr'>adverb</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-archiveAsCompileString' href='./../Overviews/Methods.html#archiveAsCompileString'>archiveAsCompileString</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asBus' href='./../Overviews/Methods.html#asBus'>asBus</a>(<span class='argstr'>rate: 'control'</span>, <span class='argstr'>numChannels: 1</span>, <span class='argstr'>server</span>)</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='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asFileSafeChar' href='./../Overviews/Methods.html#asFileSafeChar'>asFileSafeChar</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Players/pathUtilities.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Players/pathUtilities.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asFileSafeString' href='./../Overviews/Methods.html#asFileSafeString'>asFileSafeString</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Players/pathUtilities.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Players/pathUtilities.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asGroup' href='./../Overviews/Methods.html#asGroup'>asGroup</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asGroup.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asGroup.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asNodeID' href='./../Overviews/Methods.html#asNodeID'>asNodeID</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asTarget.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asTarget.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asStringToBase' href='./../Overviews/Methods.html#asStringToBase'>asStringToBase</a>(<span class='argstr'>base: 10</span>, <span class='argstr'>width: 8</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asTarget' href='./../Overviews/Methods.html#asTarget'>asTarget</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asTarget.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/asTarget.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-asUnicode' href='./../Overviews/Methods.html#asUnicode'>asUnicode</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-clip' href='./../Overviews/Methods.html#clip'>clip</a>(<span class='argstr'>lo</span>, <span class='argstr'>hi</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-exit' href='./../Overviews/Methods.html#exit'>exit</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-fold' href='./../Overviews/Methods.html#fold'>fold</a>(<span class='argstr'>lo</span>, <span class='argstr'>hi</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-generate' href='./../Overviews/Methods.html#generate'>generate</a>(<span class='argstr'>function</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-hash' href='./../Overviews/Methods.html#hash'>hash</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isAlt' href='./../Overviews/Methods.html#isAlt'>isAlt</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isCaps' href='./../Overviews/Methods.html#isCaps'>isCaps</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isCmd' href='./../Overviews/Methods.html#isCmd'>isCmd</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isCtrl' href='./../Overviews/Methods.html#isCtrl'>isCtrl</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isFun' href='./../Overviews/Methods.html#isFun'>isFun</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isHelp' href='./../Overviews/Methods.html#isHelp'>isHelp</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isInteger' href='./../Overviews/Methods.html#isInteger'>isInteger</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isNumPad' href='./../Overviews/Methods.html#isNumPad'>isNumPad</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-isShift' href='./../Overviews/Methods.html#isShift'>isShift</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-log2Ceil' href='./../Overviews/Methods.html#log2Ceil'>log2Ceil</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-schedBundle' href='./../Overviews/Methods.html#schedBundle'>schedBundle</a>(<span class='argstr'>bundle</span>, <span class='argstr'>server</span>, <span class='argstr'>timeOfRequest</span>)</h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/schedBundle.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Control/schedBundle.sc</a></div>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-wrap' href='./../Overviews/Methods.html#wrap'>wrap</a>(<span class='argstr'>lo</span>, <span class='argstr'>hi</span>)</h3>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Integer.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Integer.schelp</a><br>link::Classes/Integer::<br></div></div></body></html>
|
463
doc-schelp/Help-3.12.2/Classes/Interface.html
Normal file
|
@ -0,0 +1,463 @@
|
|||
<!doctype html><html lang='en'><head><title>Interface | SuperCollider 3.11.1 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 = 'Interface';
|
||||
var scdoc_sc_version = '3.11.1';
|
||||
</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'>Interface:</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='toc3'><a href='#-interfaceDef'>interfaceDef</a> </li>
|
||||
<li class='toc3'><a href='#-args'>args</a> </li>
|
||||
<li class='toc3'><a href='#-onPrepareToBundle'>onPrepareToBundle</a> </li>
|
||||
<li class='toc3'><a href='#-onPlay'>onPlay</a> </li>
|
||||
<li class='toc3'><a href='#-onStop'>onStop</a> </li>
|
||||
<li class='toc3'><a href='#-onFree'>onFree</a> </li>
|
||||
<li class='toc3'><a href='#-onNoteOn'>onNoteOn</a> </li>
|
||||
<li class='toc3'><a href='#-onNoteOff'>onNoteOff</a> </li>
|
||||
<li class='toc3'><a href='#-onCC'>onCC</a> </li>
|
||||
<li class='toc3'><a href='#-guiFunction'>guiFunction</a> </li>
|
||||
<li class='toc3'><a href='#-guiBodyFunction'>guiBodyFunction</a> </li>
|
||||
<li class='toc3'><a href='#-keyDownAction'>keyDownAction</a> </li>
|
||||
<li class='toc3'><a href='#-keyUpAction'>keyUpAction</a> </li>
|
||||
<li class='toc3'><a href='#-init'>init</a> </li>
|
||||
<li class='toc3'><a href='#-createArgs'>createArgs</a> </li>
|
||||
<li class='toc3'><a href='#-prepareToBundle'>prepareToBundle</a> </li>
|
||||
<li class='toc3'><a href='#-didSpawn'>didSpawn</a> </li>
|
||||
<li class='toc3'><a href='#-didStop'>didStop</a> </li>
|
||||
<li class='toc3'><a href='#-freeToBundle'>freeToBundle</a> </li>
|
||||
<li class='toc3'><a href='#-gui'>gui</a> </li>
|
||||
<li class='toc3'><a href='#-guiClass'>guiClass</a> </li>
|
||||
<li class='toc3'><a href='#-guiBody'>guiBody</a> </li>
|
||||
<li class='toc3'><a href='#-use'>use</a> </li>
|
||||
<li class='toc3'><a href='#-defer'>defer</a> </li>
|
||||
<li class='toc3'><a href='#-storeArgs'>storeArgs</a> </li>
|
||||
<li class='toc3'><a href='#-storeModifiersOn'>storeModifiersOn</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><li class='toc1'><a href='#GUI'>GUI</a></li>
|
||||
<ul class='toc'></ul><li class='toc1'><a href='#MIDI'>MIDI</a></li>
|
||||
<ul class='toc'></ul><li class='toc1'><a href='#onPlay%20onStop%20onFree'>onPlay onStop onFree</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#Libraries'>Libraries</a> > <a href='./../Browse.html#Libraries>crucial'>crucial</a> > <a href='./../Browse.html#Libraries>crucial>Instr'>Instr</a> | <a href='./../Browse.html#Libraries'>Libraries</a> > <a href='./../Browse.html#Libraries>crucial'>crucial</a> > <a href='./../Browse.html#Libraries>crucial>Players'>Players</a></span>
|
||||
</div><h1>Interface<span id='superclasses'> : <a href="../Classes/AbstractPlayerProxy.html">AbstractPlayerProxy</a> : <a href="../Classes/AbstractPlayer.html">AbstractPlayer</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'>Sets up an environment in which you can build a player, a GUI and responders for midi and keyboard control</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/Interface.sc' title='/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/Instr/Interface.sc'>Interface.sc</a></div><div id='related'>See also: <a href="./../Classes/Instr.html">Instr</a>, <a href="./../Classes/Patch.html">Patch</a>, <a href="./../Classes/Mx">Mx</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>This sets up an environment in which you can build a player, build a gui for that player, and respond to midi and keyboard control.
|
||||
<p>The gui is quite optional, and in fact non-screen-staring is one of its primary goals.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Interface.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>interfaceDef</span>, <span class='argstr'>args</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>interfaceDef<td class='argumentdesc'><tr><td class='argumentname'>args<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 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-interfaceDef' href='./../Overviews/Methods.html#interfaceDef'>interfaceDef</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-args' href='./../Overviews/Methods.html#args'>args</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onPrepareToBundle' href='./../Overviews/Methods.html#onPrepareToBundle'>onPrepareToBundle</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onPrepareToBundle' href='./../Overviews/Methods.html#onPrepareToBundle'>onPrepareToBundle</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onPlay' href='./../Overviews/Methods.html#onPlay'>onPlay</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onPlay' href='./../Overviews/Methods.html#onPlay'>onPlay</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onStop' href='./../Overviews/Methods.html#onStop'>onStop</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onStop' href='./../Overviews/Methods.html#onStop'>onStop</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onFree' href='./../Overviews/Methods.html#onFree'>onFree</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onFree' href='./../Overviews/Methods.html#onFree'>onFree</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onNoteOn' href='./../Overviews/Methods.html#onNoteOn'>onNoteOn</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onNoteOn' href='./../Overviews/Methods.html#onNoteOn'>onNoteOn</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onNoteOff' href='./../Overviews/Methods.html#onNoteOff'>onNoteOff</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onNoteOff' href='./../Overviews/Methods.html#onNoteOff'>onNoteOff</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onCC' href='./../Overviews/Methods.html#onCC'>onCC</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-onCC' href='./../Overviews/Methods.html#onCC'>onCC</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>the control change handler is installed (via <a href="./../Classes/CCResponder.html">CCResponder</a>) when play starts and unistalled when play stops.
|
||||
<p>It can be a simple function:<textarea class='editor'>interface.onCC = { arg src,chan,num,value;
|
||||
[num,value].postln;
|
||||
};</textarea>
|
||||
|
||||
<p>a CCResponder that responds on a specific number. (note: tell it NOT to install itself, because the Interface will install and uninstall it when play starts or stops)<textarea class='editor'> onCC = CCResponder(num,{ },install: false);</textarea>
|
||||
|
||||
<p>or a custom class:<textarea class='editor'>onCC = KorgMicroKontrolCC(
|
||||
[\slider,0,{ }],
|
||||
[\slider,1,{ }],
|
||||
[\encoder,0,{ }],
|
||||
[\encoder,1,{ }],
|
||||
[\x,{ }],
|
||||
[\y, { }]
|
||||
);</textarea>
|
||||
|
||||
<p>whatever it is will be asked to respond to 'value' :<textarea class='editor'> thing.value(src,chan,num,value);</textarea>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-guiFunction' href='./../Overviews/Methods.html#guiFunction'>guiFunction</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-guiBodyFunction' href='./../Overviews/Methods.html#guiBodyFunction'>guiBodyFunction</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-keyDownAction' href='./../Overviews/Methods.html#keyDownAction'>keyDownAction</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-keyDownAction' href='./../Overviews/Methods.html#keyDownAction'>keyDownAction</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-keyUpAction' href='./../Overviews/Methods.html#keyUpAction'>keyUpAction</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-keyUpAction' href='./../Overviews/Methods.html#keyUpAction'>keyUpAction</a> = value</h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-init' href='./../Overviews/Methods.html#init'>init</a>(<span class='argstr'>i</span>, <span class='argstr'>a</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>i<td class='argumentdesc'><tr><td class='argumentname'>a<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-createArgs' href='./../Overviews/Methods.html#createArgs'>createArgs</a>(<span class='argstr'>argargs</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>argargs<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-prepareToBundle' href='./../Overviews/Methods.html#prepareToBundle'>prepareToBundle</a>(<span class='argstr'>agroup</span>, <span class='argstr'>bundle</span>, <span class='argstr'>private: false</span>, <span class='argstr'>bus</span>, <span class='argstr'>defWasLoaded: false</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>agroup<td class='argumentdesc'><tr><td class='argumentname'>bundle<td class='argumentdesc'><tr><td class='argumentname'>private<td class='argumentdesc'><tr><td class='argumentname'>bus<td class='argumentdesc'><tr><td class='argumentname'>defWasLoaded<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-didSpawn' href='./../Overviews/Methods.html#didSpawn'>didSpawn</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-didStop' href='./../Overviews/Methods.html#didStop'>didStop</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-freeToBundle' href='./../Overviews/Methods.html#freeToBundle'>freeToBundle</a>(<span class='argstr'>b</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>b<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-gui' href='./../Overviews/Methods.html#gui'>gui</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-gui' href='./../Overviews/Methods.html#gui'>gui</a> = <span class='argstr'>f</span></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/Object.html'>Object</a></div>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>f<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-guiClass' href='./../Overviews/Methods.html#guiClass'>guiClass</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-guiBody' href='./../Overviews/Methods.html#guiBody'>guiBody</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>... args<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-use' href='./../Overviews/Methods.html#use'>use</a>(<span class='argstr'>function</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>function<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-defer' href='./../Overviews/Methods.html#defer'>defer</a>(<span class='argstr'>function</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>function<td class='argumentdesc'></table></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-storeArgs' href='./../Overviews/Methods.html#storeArgs'>storeArgs</a></h3>
|
||||
<div class='method'></div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-storeModifiersOn' href='./../Overviews/Methods.html#storeModifiersOn'>storeModifiersOn</a>(<span class='argstr'>stream</span>)</h3>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>stream<td class='argumentdesc'></table></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>
|
||||
<textarea class='editor'>(
|
||||
|
||||
m = Interface({
|
||||
// an environment is in place here
|
||||
~freq = KrNumberEditor(400,[100,1200,\exp]);
|
||||
~syncFreq = KrNumberEditor(800,[100,12000,\exp]);
|
||||
~amp = KrNumberEditor(0.1,\amp);
|
||||
|
||||
Patch({ arg freq,syncFreq,amp=0.3;
|
||||
SyncSaw.ar(syncFreq,freq) * amp
|
||||
},[
|
||||
~freq,
|
||||
~syncFreq,
|
||||
~amp
|
||||
])
|
||||
|
||||
});
|
||||
|
||||
// setting the gui
|
||||
m.gui = { arg layout,metaPatch;
|
||||
var joy;
|
||||
|
||||
// the same environment is again in place
|
||||
~freq.gui(layout);
|
||||
|
||||
ActionButton(layout,"twitch",{
|
||||
var x,y;
|
||||
// action button now remembers the environment !
|
||||
~freq.setUnmappedValue( x = 1.0.rand );
|
||||
~syncFreq.setUnmappedValue( y = 1.0.rand );
|
||||
joy.x_(x).y_(y).changed;
|
||||
});
|
||||
|
||||
joy = GUI.slider2D.new(layout, 100 @ 100)
|
||||
.action_({ arg sl;
|
||||
// at this time not in environment
|
||||
metaPatch.use({ // use the metaPatch's environment
|
||||
~freq.setUnmappedValue(sl.x);
|
||||
~syncFreq.setUnmappedValue(sl.y );
|
||||
})
|
||||
});
|
||||
|
||||
EZNumber(layout,30 @ 30,"amp",[0.01,0.4,\exp],{ arg ez;
|
||||
metaPatch.use({
|
||||
~amp.value_(ez.value).changed;
|
||||
})
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// creating a gui
|
||||
m.gui
|
||||
|
||||
|
||||
)
|
||||
|
||||
// You can place them on any window
|
||||
(
|
||||
w = GUI.window.new("other",Rect(20,20,700,200));
|
||||
w.front;
|
||||
|
||||
g = m.gui(w,Rect(30,30,500,200));
|
||||
|
||||
g.background = Color.blue(alpha:0.4);
|
||||
)
|
||||
|
||||
|
||||
// MIDI handler installed on play
|
||||
// takes some seconds to start up, then play your midi keyboard
|
||||
(
|
||||
|
||||
Instr([\klankperc,\k2a],{ arg trig=0.0,sfreqScale=1.0,sfreqOffset=0.0,stimeScale=1.0,foldAt=0.1;
|
||||
Klank.ar(
|
||||
`[
|
||||
FloatArray[ 87.041, 198.607 ],
|
||||
nil,
|
||||
FloatArray[ 0.165394, 0.15595 ]
|
||||
],
|
||||
K2A.ar(trig),
|
||||
sfreqScale,sfreqOffset,stimeScale
|
||||
).squared.fold2(foldAt)
|
||||
},[
|
||||
nil,
|
||||
[0.01,100],
|
||||
[0,10000],
|
||||
[0.01,100]
|
||||
]);
|
||||
|
||||
// Create 5 patches, cycle through them on each midi key
|
||||
Interface({ arg quantity=5;
|
||||
|
||||
~quantity = quantity.poll;
|
||||
~a = Array.fill(~quantity,{ arg i;
|
||||
Patch.new([\klankperc,\k2a],
|
||||
[
|
||||
BeatClockPlayer(16),
|
||||
i * (3.midiratio),
|
||||
i * (3.midiratio),
|
||||
1.0,
|
||||
~foldAt = KrNumberEditor(0.1,[1.0,0.01])
|
||||
]);
|
||||
});
|
||||
|
||||
~pool = PlayerPool( ~a,
|
||||
env: Env.asr(0.01,releaseTime: 0.01),
|
||||
round: 0.25);
|
||||
|
||||
|
||||
}).onNoteOn_({ arg note,vel;
|
||||
// the same environment is in place here
|
||||
//~foldAt.setUnmappedValue(vel / 127.0).changed;
|
||||
~pool.select(note % ~quantity)
|
||||
}).play
|
||||
|
||||
)
|
||||
// fast triggering still trips it up. working on it.
|
||||
|
||||
|
||||
// Simple CC example
|
||||
(
|
||||
|
||||
Interface({
|
||||
|
||||
~freq = KrNumberEditor(400,[100,1200,\exp]);
|
||||
~syncFreq = KrNumberEditor(800,[100,12000,\exp]);
|
||||
~amp = KrNumberEditor(0.1,\amp);
|
||||
|
||||
Patch({ arg freq,syncFreq,amp=0.3;
|
||||
SyncSaw.ar(syncFreq,freq) * amp
|
||||
},[
|
||||
~freq,
|
||||
~syncFreq,
|
||||
~amp
|
||||
])
|
||||
|
||||
}).onCC_({ arg src,chan,num,value;
|
||||
if(num == 80,{ ~freq.setUnmappedValue(value/127);});
|
||||
if(num == 81,{ ~syncFreq.setUnmappedValue(value/127);});
|
||||
if(num == 82,{ ~amp.setUnmappedValue(value/127);});
|
||||
})
|
||||
.play
|
||||
|
||||
)
|
||||
(
|
||||
|
||||
Interface({
|
||||
|
||||
~freq = KrNumberEditor(400,[100,1200,\exp]);
|
||||
~syncFreq = KrNumberEditor(800,[100,12000,\exp]);
|
||||
~amp = KrNumberEditor(0.1,\amp);
|
||||
|
||||
Patch({ arg freq,syncFreq,amp=0.3;
|
||||
SyncSaw.ar(syncFreq,freq) * amp
|
||||
},[
|
||||
~freq,
|
||||
~syncFreq,
|
||||
~amp
|
||||
])
|
||||
|
||||
}).onCC_(
|
||||
ResponderArray(
|
||||
// these normally install themselves immediately, but the Interface will be handling that
|
||||
CCResponder(80,{ arg value; ~freq.setUnmappedValue(value/127);},install: false),
|
||||
CCResponder(81,{ arg value; ~syncFreq.setUnmappedValue(value/127);},install: false),
|
||||
CCResponder(82,{ arg value; ~amp.setUnmappedValue(value/127);},install: false)
|
||||
)
|
||||
)
|
||||
.play
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
(
|
||||
// beat juggler
|
||||
|
||||
Interface({ arg sample;
|
||||
|
||||
~beatStart1 = NumberEditor(0.0,[0.0,8.0,\lin,0.25]);
|
||||
~beatStart2 = NumberEditor(0.0,[0.0,8.0,\lin,0.25]);
|
||||
~durations = [ 2.0,2.0];
|
||||
|
||||
~patch = InstrGateSpawner({ arg sample,dur, pchRatio,beatStart,amp=0.3,envadsr,tempo;
|
||||
|
||||
var gate;
|
||||
gate = Trig1.kr(1.0,dur / tempo);
|
||||
|
||||
pchRatio = pchRatio * sample.pchRatioKr;
|
||||
beatStart = beatStart * sample.beatsizeIr;
|
||||
|
||||
PlayBuf.ar(sample.numChannels,
|
||||
sample.bufnumIr,
|
||||
pchRatio,
|
||||
1.0,
|
||||
beatStart,
|
||||
1.0)
|
||||
|
||||
* EnvGen.kr(envadsr, gate,amp,doneAction: 2 )
|
||||
},[
|
||||
sample,
|
||||
// dur uses a Pfunc to ask the delta till the next event
|
||||
Pfunc({ arg igs; (igs.delta * 0.9) }),
|
||||
|
||||
// get an .ir input into the synth function
|
||||
~pchRatio = IrNumberEditor(1.0,[-2,2,\lin,0.25]),
|
||||
|
||||
// patterns naturally create an .ir input
|
||||
Pswitch1([
|
||||
~beatStart1,
|
||||
~beatStart2
|
||||
],Pseq([0,1],inf)) // juggle back and forth
|
||||
|
||||
],
|
||||
// stream of beat durations
|
||||
Pseq(~durations,inf));
|
||||
|
||||
~patch
|
||||
|
||||
},[
|
||||
// a blank sample
|
||||
Sample.new(nil)
|
||||
])
|
||||
.gui_({ arg layout; // we are given a FlowView
|
||||
|
||||
var env,ddsp,bdsp;
|
||||
|
||||
CXLabel(layout,"Click the sample path (nil) to browse for a sample. You can choose new samples even while playing.");
|
||||
layout.startRow;
|
||||
/* the environment from the build function above is available here */
|
||||
~sample.gui(layout,500@100);
|
||||
|
||||
/* but when view actions fire you will be in a different environment
|
||||
so save it here in a variable for use later */
|
||||
env = currentEnvironment;
|
||||
|
||||
// .vert returns an SCVLayoutView so we can stack each 2d over its caption
|
||||
layout.vert({ arg layout;
|
||||
GUI.slider2D.new(layout,100@100)
|
||||
.action_({ arg sl;
|
||||
env.use({
|
||||
// set a 0..1 value, map it to the spec ranges of the NumberEditors
|
||||
~beatStart1.setUnmappedValue(sl.x);
|
||||
~beatStart2.setUnmappedValue(sl.y);
|
||||
bdsp.object_( [~beatStart1.value,~beatStart2.value]).changed;
|
||||
})
|
||||
});
|
||||
GUI.staticText.new(layout,100@13).object_("Beat starts:");
|
||||
bdsp = GUI.staticText.new(layout,100@13).object_([~beatStart1.value,~beatStart2.value].asString);
|
||||
},100@120);
|
||||
|
||||
layout.vert({ arg layout;
|
||||
GUI.slider2D.new(layout,100@100)
|
||||
.action_({ arg sl;
|
||||
env.use({
|
||||
var stride,part;
|
||||
stride = 2 ** [3,4,5,6].at((sl.x * 3).asInteger) * 0.125;
|
||||
part = (stride * (1.0 - sl.y)).round(0.25).clip(0.25,stride - 0.25);
|
||||
~durations.put(0,part);
|
||||
~durations.put(1,stride - part);
|
||||
ddsp.object_(~durations.sum.asString + "=" + ~durations).changed;
|
||||
});
|
||||
});
|
||||
GUI.staticText.new(layout,100@13).object_("beats");
|
||||
ddsp = GUI.staticText.new(layout,100@13).object_(~durations.sum.asString + "=" + ~durations);
|
||||
},100@120);
|
||||
CXLabel(layout,"pchRatio:");
|
||||
~pchRatio.gui(layout);
|
||||
})
|
||||
.gui
|
||||
|
||||
)</textarea>
|
||||
<h2><a class='anchor' name='GUI'>GUI</a></h2>
|
||||
|
||||
<p>You can set a custom gui function. This can use any combination of .gui style and normal Views The Interface can be placed on any other windows of any style. You may decline to customize your gui.<h2><a class='anchor' name='MIDI'>MIDI</a></h2>
|
||||
|
||||
<p>If you set any of these handler functions: onNoteOn onNoteOff onPitchBend onCC then appropriate midi responders will be enabled when the player starts to play and disabled when it stops. This includes if the player is being started/stopped by external mixers, PlayerPool etc.
|
||||
<p>KeyDown/KeyUp keyDownAction keyUpAction (only when guied, only when focus is within the MetaPatch's views)
|
||||
<p>Interface is great for having no gui at all. Personally I use the gui stuff to set up parameters for performing, and then when performing I use no gui, only MIDI controllers and key commands.
|
||||
<p>The function that builds the player is actually an <a href="./../Classes/InterfaceDef.html">InterfaceDef</a>. These can be created and stored in the same fashion as Instr and kept in the same folder. You can then address them by name, supply paramaters as you do for Patch and you will get an Interface which will use the gui and midi functions from the InterfaceDef.<h2><a class='anchor' name='onPlay%20onStop%20onFree'>onPlay onStop onFree</a></h2>
|
||||
<textarea class='editor'>(
|
||||
|
||||
Interface({
|
||||
|
||||
~freq = KrNumberEditor(400,[100,1200,\exp]);
|
||||
~amp = KrNumberEditor(0.1,[0.01,0.4,\exp]);
|
||||
|
||||
Patch({ arg freq,amp;
|
||||
SinOsc.ar(freq) * amp
|
||||
},[
|
||||
~freq,
|
||||
~amp
|
||||
])
|
||||
|
||||
})
|
||||
.onPlay_({
|
||||
"playing".postln;
|
||||
})
|
||||
.onStop_({ // also on command-.
|
||||
"stopping".postln;
|
||||
})
|
||||
.onFree_({
|
||||
"freeing".postln;
|
||||
}).play
|
||||
|
||||
)</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/HelpSource/Classes/Interface.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/crucial-library/HelpSource/Classes/Interface.schelp</a><br>link::Classes/Interface::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
178
doc-schelp/Help-3.12.2/Classes/Interpreter.html
Normal file
|
@ -0,0 +1,178 @@
|
|||
<html><head><title>Interpreter</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#Core>Kernel'>Core>Kernel</a></div>
|
||||
<h1>Interpreter</h1>
|
||||
<div id='summary'>The interpreter defines a context in which interactive commands are compiled and executed.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Kernel.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/Kernel.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../How-to-Use-the-Interpreter">How-to-Use-the-Interpreter</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='#Accessing'>Accessing</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-clearAll'>clearAll</a> </li>
|
||||
</ul><li class='toc2'><a href='#Compile%20&%20Interpret'>Compile & Interpret</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-interpret'>interpret</a> </li>
|
||||
<li class='toc3'><a href='#-interpretPrint'>interpretPrint</a> </li>
|
||||
<li class='toc3'><a href='#-compile'>compile</a> </li>
|
||||
<li class='toc3'><a href='#-compileFile'>compileFile</a> </li>
|
||||
<li class='toc3'><a href='#-executeFile'>executeFile</a> </li>
|
||||
<li class='toc3'><a href='#-cmdLine'>cmdLine</a> </li>
|
||||
<li class='toc3'><a href='#-codeDump'>codeDump</a> </li>
|
||||
<li class='toc3'><a href='#-preProcessor'>preProcessor</a> </li>
|
||||
<li class='toc3'><a href='#-a'>a</a> <a href='#-b'>b</a> <a href='#-c'>c</a> <a href='#-d'>d</a> <a href='#-e'>e</a> <a href='#-f'>f</a> <a href='#-g'>g</a> <a href='#-h'>h</a> <a href='#-i'>i</a> <a href='#-j'>j</a> <a href='#-k'>k</a> <a href='#-l'>l</a> <a href='#-m'>m</a> <a href='#-n'>n</a> <a href='#-o'>o</a> <a href='#-p'>p</a> <a href='#-q'>q</a> <a href='#-r'>r</a> <a href='#-s'>s</a> <a href='#-t'>t</a> <a href='#-u'>u</a> <a href='#-v'>v</a> <a href='#-w'>w</a> <a href='#-x'>x</a> <a href='#-y'>y</a> <a href='#-z'>z</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='#-functionCompileContext'>functionCompileContext</a> </li>
|
||||
<li class='toc3'><a href='#-interpretCmdLine'>interpretCmdLine</a> </li>
|
||||
<li class='toc3'><a href='#-interpretPrintCmdLine'>interpretPrintCmdLine</a> </li>
|
||||
<li class='toc3'><a href='#-shallowCopy'>shallowCopy</a> </li>
|
||||
</ul></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>The interpreter is an object that handles the translation and execution of code at runtime. It is that what runs any program code and defines a context for it.<pre class='code prettyprint lang-sc'>(
|
||||
a = 5 + 7;
|
||||
this.cmdLine.postln;
|
||||
)</pre>
|
||||
<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='Accessing'>Accessing</a></h3>
|
||||
|
||||
<p>In the interpreter, <code class='code prettyprint lang-sc'>this</code> refers to the interpreter itself, e.g.: <code class='code prettyprint lang-sc'>this.postln</code>
|
||||
<p>The interpreter defines global variables (<code class='code prettyprint lang-sc'>a</code> … <code class='code prettyprint lang-sc'>z</code>), that can be used for interactive programming. Except these single letter variables ("interpreter variables"), all variables have to be defined by the keyword <code class='code prettyprint lang-sc'>var</code> (see: <a href="./../Reference/Assignment.html">Assignment Statements</a>, and <a href="./../Reference/Scope.html">Scoping and Closure</a>).<pre class='code prettyprint lang-sc'>// typical usage
|
||||
a = 4;
|
||||
b = 3;
|
||||
b = b + a;
|
||||
|
||||
// some sound
|
||||
a = Synth(\default);
|
||||
g = fork { loop { 0.1.wait; a.set(\freq, 200 + 20.0.rand2.postln) } };
|
||||
g.stop; a.free;
|
||||
|
||||
// an overview of all the variables
|
||||
this.inspect;</pre>
|
||||
<div class='note'><span class='notelabel'>NOTE:</span> Use these variables with a bit of extra care – as they are global, they remain in memory and one piece of code may happen to interfere with another one. The variable <code class='code prettyprint lang-sc'>s</code> is by convention bound to the default server (<a href="./../Classes/Server.html">Server</a>) and should not be changed.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-clearAll' href='./../Overviews/Methods.html#clearAll'>clearAll</a> </h3>
|
||||
<div class='method'>
|
||||
<p>set the values of the variables <code class='code prettyprint lang-sc'>a</code> through <code class='code prettyprint lang-sc'>z</code> to nil.<pre class='code prettyprint lang-sc'>x = 123;
|
||||
x.postln;
|
||||
this.clearAll;
|
||||
x.postln;</pre>
|
||||
</div><h3><a class='anchor' name='Compile%20&%20Interpret'>Compile & Interpret</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-interpret' href='./../Overviews/Methods.html#interpret'>interpret</a> (<span class='argstr'>string</span> <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Compile and execute a <a href="./../Classes/String.html">String</a>.<pre class='code prettyprint lang-sc'>this.interpret("(123 + 4000).postln");</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-interpretPrint' href='./../Overviews/Methods.html#interpretPrint'>interpretPrint</a> (<span class='argstr'>string</span> <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Compile and execute a <a href="./../Classes/String.html">String</a>, printing the result.<pre class='code prettyprint lang-sc'>this.interpretPrint("123 + 4000");</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-compile' href='./../Overviews/Methods.html#compile'>compile</a> (<span class='argstr'>string</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Compile a String and return a <a href="./../Classes/Function.html">Function</a>.<pre class='code prettyprint lang-sc'>(
|
||||
z = this.compile("(123 + 4000).postln");
|
||||
z.postln;
|
||||
z.value;
|
||||
)</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-compileFile' href='./../Overviews/Methods.html#compileFile'>compileFile</a> (<span class='argstr'>pathName</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Reads the file at pathName, compiles it and returns a Function. The file must contain a valid SuperCollider expression, naturally. This will not compile class definitions, only expressions.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-executeFile' href='./../Overviews/Methods.html#executeFile'>executeFile</a> (<span class='argstr'>pathName</span> <span class='argstr'>... args</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Reads the file at pathName, compiles it and executes it, returning the result. The file must contain a valid SuperCollider expression, naturally. This will not compile class definitions, only expressions.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-cmdLine' href='./../Overviews/Methods.html#cmdLine'>cmdLine</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-cmdLine' href='./../Overviews/Methods.html#cmdLine'>cmdLine</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>Returns the previously interpreted code.<pre class='code prettyprint lang-sc'>1 + 2;
|
||||
this.cmdLine</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-codeDump' href='./../Overviews/Methods.html#codeDump'>codeDump</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-codeDump' href='./../Overviews/Methods.html#codeDump'>codeDump</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>this interpreter variable can be set to evaluate a function with any successfully compiled code. see e.g. the class History.<pre class='code prettyprint lang-sc'>a = [ ]; // store all the code evaluated in a
|
||||
this.codeDump = { |code| a = a.add(code) };
|
||||
1 + 3;
|
||||
f = { "hallo" };
|
||||
a.postcs;
|
||||
codeDump = nil; // reset to nil.</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-preProcessor' href='./../Overviews/Methods.html#preProcessor'>preProcessor</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-preProcessor' href='./../Overviews/Methods.html#preProcessor'>preProcessor</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>can be used to modify code before it is interpreted. Given appropriate delimiters, this can be used to implement little languages.<pre class='code prettyprint lang-sc'>// silly but simple: understand a Saw for every SinOsc
|
||||
this.preProcessor = { |code| code.replace("SinOsc", "Saw") };
|
||||
|
||||
{ SinOsc.ar(200) * 0.1 }.play;
|
||||
|
||||
preProcessor = nil; // reset to nil.</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-a' href='./../Overviews/Methods.html#a'>a</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-a' href='./../Overviews/Methods.html#a'>a</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-b' href='./../Overviews/Methods.html#b'>b</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-b' href='./../Overviews/Methods.html#b'>b</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-c' href='./../Overviews/Methods.html#c'>c</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-c' href='./../Overviews/Methods.html#c'>c</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-d' href='./../Overviews/Methods.html#d'>d</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-d' href='./../Overviews/Methods.html#d'>d</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-e' href='./../Overviews/Methods.html#e'>e</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-e' href='./../Overviews/Methods.html#e'>e</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-f' href='./../Overviews/Methods.html#f'>f</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-f' href='./../Overviews/Methods.html#f'>f</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-g' href='./../Overviews/Methods.html#g'>g</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-g' href='./../Overviews/Methods.html#g'>g</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-h' href='./../Overviews/Methods.html#h'>h</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-h' href='./../Overviews/Methods.html#h'>h</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-i' href='./../Overviews/Methods.html#i'>i</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-i' href='./../Overviews/Methods.html#i'>i</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-j' href='./../Overviews/Methods.html#j'>j</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-j' href='./../Overviews/Methods.html#j'>j</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-k' href='./../Overviews/Methods.html#k'>k</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-k' href='./../Overviews/Methods.html#k'>k</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-l' href='./../Overviews/Methods.html#l'>l</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-l' href='./../Overviews/Methods.html#l'>l</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-m' href='./../Overviews/Methods.html#m'>m</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-m' href='./../Overviews/Methods.html#m'>m</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-n' href='./../Overviews/Methods.html#n'>n</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-n' href='./../Overviews/Methods.html#n'>n</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-o' href='./../Overviews/Methods.html#o'>o</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-o' href='./../Overviews/Methods.html#o'>o</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-p' href='./../Overviews/Methods.html#p'>p</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-p' href='./../Overviews/Methods.html#p'>p</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-q' href='./../Overviews/Methods.html#q'>q</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-q' href='./../Overviews/Methods.html#q'>q</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-r' href='./../Overviews/Methods.html#r'>r</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-r' href='./../Overviews/Methods.html#r'>r</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-s' href='./../Overviews/Methods.html#s'>s</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-s' href='./../Overviews/Methods.html#s'>s</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-t' href='./../Overviews/Methods.html#t'>t</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-t' href='./../Overviews/Methods.html#t'>t</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-u' href='./../Overviews/Methods.html#u'>u</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-u' href='./../Overviews/Methods.html#u'>u</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-v' href='./../Overviews/Methods.html#v'>v</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-v' href='./../Overviews/Methods.html#v'>v</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-w' href='./../Overviews/Methods.html#w'>w</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-w' href='./../Overviews/Methods.html#w'>w</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-x' href='./../Overviews/Methods.html#x'>x</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-x' href='./../Overviews/Methods.html#x'>x</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-y' href='./../Overviews/Methods.html#y'>y</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-y' href='./../Overviews/Methods.html#y'>y</a> = value</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-z' href='./../Overviews/Methods.html#z'>z</a></h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-z' href='./../Overviews/Methods.html#z'>z</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>Global variables ("interpreter variables") for interactive programming (see <a href="#Accessing">Accessing</a>).</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='-functionCompileContext' href='./../Overviews/Methods.html#functionCompileContext'>functionCompileContext</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-interpretCmdLine' href='./../Overviews/Methods.html#interpretCmdLine'>interpretCmdLine</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-interpretPrintCmdLine' href='./../Overviews/Methods.html#interpretPrintCmdLine'>interpretPrintCmdLine</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-shallowCopy' href='./../Overviews/Methods.html#shallowCopy'>shallowCopy</a> </h3>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Interpreter.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Interpreter.schelp</a><br>link::Classes/Interpreter::<br>sc version: 3.8.0</div></div></body></html>
|
BIN
doc-schelp/Help-3.12.2/Classes/JPverb-logo-small.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
doc-schelp/Help-3.12.2/Classes/JPverb-logo.jpg
Normal file
After Width: | Height: | Size: 47 KiB |
97
doc-schelp/Help-3.12.2/Classes/Klang.html
Normal file
|
@ -0,0 +1,97 @@
|
|||
<!doctype html><html lang='en'><head><title>Klang | 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 = 'Klang';
|
||||
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'>Klang:</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</span>
|
||||
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>Klang<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'>Sine oscillator bank</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/Klank.html">Klank</a>, <a href="./../Classes/DynKlang.html">DynKlang</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Klang is a bank of fixed frequency sine oscillators. Klang is more efficient than creating individual oscillators but offers less flexibility.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Klang.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>specificationsArrayRef</span>, <span class='argstr'>freqscale: 1.0</span>, <span class='argstr'>freqoffset: 0.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>specificationsArrayRef<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Ref.html">Ref</a> to an <a href="./../Classes/Array.html">Array</a> of three Arrays:<dl>
|
||||
<dt>frequencies:<dd>An Array of oscillator frequencies.<dt>amplitudes:<dd>an Array of oscillator amplitudes, or nil. If nil, then amplitudes default to 1.0.<dt>phases:<dd>an Array of initial phases, or nil. If nil, then phases default to 0.0.</dl>
|
||||
<tr><td class='argumentname'>freqscale<td class='argumentdesc'>
|
||||
<p>A scale factor multiplied by all frequencies at initialization time.<tr><td class='argumentname'>freqoffset<td class='argumentdesc'>
|
||||
<p>An offset added to all frequencies at initialization time.</table><h4>Discussion:</h4>
|
||||
|
||||
<p>The parameters in <code>specificationsArrayRef</code> can't be changed after it has been started. For a modulatable but less efficient version, see <a href="./../Classes/DynKlang.html">DynKlang</a>.</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'>play({ Klang.ar(`[ [800, 1000, 1200], [0.3, 0.3, 0.3], [pi, pi, pi]], 1, 0) * 0.4});
|
||||
|
||||
play({ Klang.ar(`[ [800, 1000, 1200], nil, nil], 1, 0) * 0.25});
|
||||
|
||||
play({ Klang.ar(`[ Array.rand(12, 600.0, 1000.0), nil, nil ], 1, 0) * 0.05 });
|
||||
|
||||
|
||||
|
||||
(
|
||||
{
|
||||
loop({
|
||||
play({
|
||||
Pan2.ar(Klang.ar(`[ Array.rand(12, 200.0, 2000.0), nil, nil ], 1, 0), 1.0.rand)
|
||||
* EnvGen.kr(Env.sine(4), 1, 0.02, doneAction: Done.freeSelf);
|
||||
});
|
||||
2.wait;
|
||||
})
|
||||
}.fork;
|
||||
)
|
||||
|
||||
// Multichannel expansion:
|
||||
|
||||
(
|
||||
{
|
||||
loop({
|
||||
play({
|
||||
var nPartials = 12, nChans = 5, n = nPartials * nChans;
|
||||
Splay.ar(Klang.ar(`[ { { rrand(200.0, 2000.0) } ! nPartials } ! nChans, nil, nil ], 1, 0))
|
||||
* EnvGen.kr(Env.sine(4), 1, 0.02, doneAction: Done.freeSelf);
|
||||
});
|
||||
2.wait;
|
||||
})
|
||||
}.fork;
|
||||
)</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Klang.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Klang.schelp</a><br>link::Classes/Klang::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
276
doc-schelp/Help-3.12.2/Classes/Klank.html
Normal file
|
@ -0,0 +1,276 @@
|
|||
<!doctype html><html lang='en'><head><title>Klank | 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 = 'Klank';
|
||||
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'>Klank:</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</span>
|
||||
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a> | <a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Filters'>Filters</a> > <a href='./../Browse.html#UGens>Filters>Linear'>Linear</a></span>
|
||||
</div><h1>Klank<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'>Bank of resonators</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/DynKlank.html">DynKlank</a>, <a href="./../Classes/Klang.html">Klang</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Klank is a bank of fixed frequency resonators which can be used to simulate the resonant modes of an object. Each mode is given a ring time, which is the time for the mode to decay by 60 dB.<div class='note'><span class='notelabel'>NOTE:</span> for dynamic changes of parameters refer to <a href="./../Classes/DynKlank.html">DynKlank</a></div><div class='note'><span class='notelabel'>NOTE:</span> The amplitude of the resulting signal depends on the server's sample rate. See <a href="./../Classes/Ringz.html#Interaction%20with%20sample%20rate">Ringz: Interaction with sample rate</a> for details.</div>
|
||||
<p>Klank is a bank of Ringz filters. <a href="./../Classes/Formlet.html">Formlet</a> is equivalent to <code>Ringz.ar(... decay...) - Ring.ar(... attack...)</code>. Therefore, a more efficient way to make a bank of fixed-parameter Formlet filters is <code>Klank(`decaySpecs, ...) - Klank.ar(`attackSpecs, ...)</code> or <code>Klank.ar(`specs, ..., decayscale: decay) - Klank.ar(`specs, ..., decayscale: attack)</code>.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Klank.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>specificationsArrayRef</span>, <span class='argstr'>input</span>, <span class='argstr'>freqscale: 1.0</span>, <span class='argstr'>freqoffset: 0.0</span>, <span class='argstr'>decayscale: 1.0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>specificationsArrayRef<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Ref.html">Ref</a> to an <a href="./../Classes/Array.html">Array</a> of three Arrays:<dl>
|
||||
<dt>frequencies:<dd>An Array of filter frequencies.<dt>amplitudes:<dd>an Array of filter amplitudes, or nil. If nil, then amplitudes default to 1.0.<dt>ring times:<dd>an Array of 60 dB decay times in seconds for the filters.</dl>
|
||||
|
||||
<p>All subarrays, if not nil, should have the same length.<tr><td class='argumentname'>input<td class='argumentdesc'>
|
||||
<p>The excitation input to the resonant filter bank.<tr><td class='argumentname'>freqscale<td class='argumentdesc'>
|
||||
<p>A scale factor multiplied by all frequencies at initialization time.<tr><td class='argumentname'>freqoffset<td class='argumentdesc'>
|
||||
<p>An offset added to all frequencies at initialization time.<tr><td class='argumentname'>decayscale<td class='argumentdesc'>
|
||||
<p>A scale factor multiplied by all ring times at initialization time.</table><h4>Discussion:</h4>
|
||||
|
||||
<p>The parameters in <code>specificationsArrayRef</code> can't be changed after it has been started. For a modulatable but less efficient version, see <a href="./../Classes/DynKlank.html">DynKlank</a>.</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>Four resonators each at maximum amplitude of 1.0 and ring times of 1 second, different exciters and no scaling:<div class='note'><span class='notelabel'>NOTE:</span> Watch the ` before the opening bracket of the parameter array! Also see <a href="./../Guides/Multichannel-Expansion.html">Multichannel Expansion</a></div>
|
||||
<p><textarea class='editor'>{ Klank.ar(`[[800, 1071, 1153, 1723], nil, [1, 1, 1, 1]], Impulse.ar(2, 0, 0.1)) }.play;
|
||||
|
||||
{ Klank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], Dust.ar(8, 0.1)) }.play;
|
||||
|
||||
{ Klank.ar(`[[800, 1071, 1353, 1723], nil, [1, 1, 1, 1]], PinkNoise.ar(0.007)) }.play;
|
||||
|
||||
{ Klank.ar(`[[200, 671, 1153, 1723], nil, [1, 1, 1, 1]], PinkNoise.ar([0.007, 0.007])) }.play;</textarea>
|
||||
|
||||
<p>Three resonators at maximum amplitude of 1.0, random frequency and ring times. Excited by two pulses at 2 and 2.5 Hz:<textarea class='editor'>(
|
||||
play({
|
||||
Klank.ar(`[
|
||||
Array.rand(12, 800.0, 4000.0), // frequencies
|
||||
nil, // amplitudes (default to 1.0)
|
||||
Array.rand(12, 0.1, 2) // ring times
|
||||
], Decay.ar(Impulse.ar(4), 0.03, ClipNoise.ar(0.01)))
|
||||
})
|
||||
)</textarea>
|
||||
|
||||
<p><a href="./../Guides/Multichannel-Expansion.html">Multichannel Expansion</a> via an array of specs (note the ` before the opening bracket of the parameter array!):<textarea class='editor'>(
|
||||
{
|
||||
Klank.ar([ // the multichannel-expansion
|
||||
`[[500, 1078, 1201.5, 1723], nil, [1, 1, 0.5, 0.3]], // left channel
|
||||
`[[700, 1071, 1053, 1723], nil, [1, 1, 1, 1]] // right channel
|
||||
], Impulse.ar([1.5, 1.875], 0, 0.1))
|
||||
}.play
|
||||
);
|
||||
|
||||
// expanding specs within the parameter array
|
||||
{ Klank.ar(`[[[800, 6000], 1071, [1153, 8000], 1723], nil, [1, 1, 1, 1]], Impulse.ar([2, 3], 0, 0.1)) }.play;</textarea>
|
||||
|
||||
<p>A SynthDef that generates 4 partials used in different configurations:<textarea class='editor'>(
|
||||
SynthDef(\help_Klank, { arg out=0, i_freq;
|
||||
var klank, n, harm, amp, ring;
|
||||
|
||||
// harmonics
|
||||
harm = \harm.ir(Array.series(4, 1, 1).postln);
|
||||
// amplitudes
|
||||
amp = \amp.ir(Array.fill(4, 0.05));
|
||||
// ring times
|
||||
ring = \ring.ir(Array.fill(4, 1));
|
||||
|
||||
klank = Klank.ar(`[harm, amp, ring], {ClipNoise.ar(0.003)}.dup, i_freq);
|
||||
|
||||
Out.ar(out, klank);
|
||||
}).add;
|
||||
)
|
||||
|
||||
// nothing special yet, just using the default set of harmonics.
|
||||
a = Synth(\help_Klank, [\i_freq, 300]);
|
||||
b = Synth(\help_Klank, [\i_freq, 400]);
|
||||
c = Synth(\help_Klank, [\i_freq, 533.33]);
|
||||
d = Synth(\help_Klank, [\i_freq, 711.11]);
|
||||
|
||||
a.free;
|
||||
b.free;
|
||||
c.free;
|
||||
d.free;
|
||||
|
||||
a = Synth(\help_Klank, [\i_freq, 500, \harm, [4, 1, 3, 5, 7]]);
|
||||
a.free;
|
||||
|
||||
// set geometric series harmonics
|
||||
a = Synth(\help_Klank, [\i_freq, 500, \harm,Array.geom(4, 1, 1.61)]);
|
||||
a.free;
|
||||
|
||||
// set harmonics, ring times and amplitudes
|
||||
(
|
||||
a = Synth(\help_Klank, [
|
||||
\i_freq, 500,
|
||||
\harm, [4, 1, 3, 5, 7],
|
||||
\ring, Array.fill(4, 0.1), // set shorter ring time
|
||||
\amp, Array.fill(4, 0.2) // set louder amps
|
||||
])
|
||||
);</textarea>
|
||||
|
||||
<p>Advanced examples:<textarea class='editor'>// -- overlap texture
|
||||
(
|
||||
SynthDef("help-KlankOverlapTexture",
|
||||
{|out = 0, freqs = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], rings = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], atk = 5, sus = 8, rel = 5, pan = 0|
|
||||
var e = EnvGen.kr(Env.linen(atk, sus, rel, 1, 4), doneAction: Done.freeSelf);
|
||||
var i = Decay.ar(Impulse.ar(Rand(0.8, 2.2)), 0.03, ClipNoise.ar(0.01));
|
||||
var z = Klank.ar(
|
||||
`[freqs, nil, rings], // specs
|
||||
i // input
|
||||
);
|
||||
Out.ar(out, Pan2.ar(z*e, pan));
|
||||
}).add;
|
||||
|
||||
r = Routine{
|
||||
var sustain = 8, transition = 3, overlap = 4;
|
||||
var period = transition * 2 + sustain / overlap;
|
||||
0.5.wait; // wait for the synthdef to be sent to the server
|
||||
inf.do{
|
||||
Synth("help-KlankOverlapTexture", [
|
||||
\atk, transition,
|
||||
\sus, sustain,
|
||||
\rel, transition,
|
||||
\pan, 1.0.rand2,
|
||||
\freqs, {200.0.rrand(4000)}.dup(12),
|
||||
\rings, {0.1.rrand(2)}.dup(12)
|
||||
]);
|
||||
period.wait;
|
||||
}
|
||||
};
|
||||
r.play;
|
||||
)
|
||||
|
||||
r.stop; // stop spawning new synths
|
||||
|
||||
|
||||
|
||||
// -- frequency and decay scaling
|
||||
(
|
||||
SynthDef("help-KlankScaling", {|out = 0, freq = 0, rings = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pan = 0|
|
||||
var e = EnvGen.kr(Env(#[1, 1, 0], #[0.4, 0.01]), doneAction: Done.freeSelf);
|
||||
var i = Decay.ar(Impulse.ar(0), 0.03, ClipNoise.ar(0.01));
|
||||
var z = Klank.ar(
|
||||
`[(1..12), nil, rings], // specs (partials, amplitudes, ringtimes)
|
||||
i, // input
|
||||
freq, // scale to this frequency
|
||||
0, // frequency offset
|
||||
MouseX.kr(0.2, 3) // scale decay times
|
||||
);
|
||||
Out.ar(out, Pan2.ar(z*e, pan));
|
||||
}).add;
|
||||
|
||||
r = Routine{
|
||||
var sustain = 8, transition = 3;
|
||||
var mode = #[0, 2, 4, 5, 7, 9, 11, 12, 14, 16, 17, 19, 21, 23, 24];
|
||||
0.5.wait; // wait for the synthdef to be sent to the server
|
||||
inf.do{|i|
|
||||
Synth("help-KlankScaling", [
|
||||
\freq, (72 + (mode @@ i)).midicps,
|
||||
\rings, {0.1.rrand(2)}.dup(12)
|
||||
]);
|
||||
0.2.wait;
|
||||
}
|
||||
};
|
||||
r.play;
|
||||
)
|
||||
|
||||
r.stop;
|
||||
|
||||
|
||||
// -- overlap texture 2
|
||||
(
|
||||
SynthDef("help-KlankOverlapTexture2",
|
||||
{|out = 0, freqs = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], rings = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], atk = 5, sus = 8, rel = 5, pan = 0|
|
||||
var e = EnvGen.kr(Env.linen(atk, sus, rel, 1, 4), doneAction: Done.freeSelf);
|
||||
var i = BrownNoise.ar(0.0012);
|
||||
var z = Klank.ar(
|
||||
`[freqs, nil, rings], // specs
|
||||
i // input
|
||||
);
|
||||
Out.ar(out, Pan2.ar(z*e, pan));
|
||||
}).add;
|
||||
|
||||
r = Routine{
|
||||
var sustain = 6, transition = 4, overlap = 5;
|
||||
var period = transition*2+sustain/overlap;
|
||||
0.5.wait; // wait for the synthdef to be sent to the server
|
||||
inf.do {
|
||||
Synth("help-KlankOverlapTexture2", [
|
||||
\atk, transition,
|
||||
\sus, sustain,
|
||||
\rel, transition,
|
||||
\pan, 1.0.rand2,
|
||||
\freqs, {6000.0.linrand+80}.dup(12),
|
||||
\rings, {0.1.rrand(3)}.dup(12)
|
||||
]);
|
||||
period.wait;
|
||||
}
|
||||
};
|
||||
r.play;
|
||||
)
|
||||
|
||||
r.stop;
|
||||
|
||||
|
||||
// -- overlap texture 3
|
||||
(
|
||||
SynthDef("help-KlankOverlapTexture3",
|
||||
{|out = 0, freqs = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], rings = #[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pan = 0|
|
||||
var e = EnvGen.kr(Env(#[1, 1, 0], #[18, 3]), doneAction: Done.freeSelf);
|
||||
var i = Decay.ar(Impulse.ar(Rand(0.2, 0.6)), 0.8, ClipNoise.ar(0.001));
|
||||
var z = Klank.ar(
|
||||
`[freqs, 2, rings], // specs
|
||||
i // input
|
||||
);
|
||||
Out.ar(out, Pan2.ar(z*e, pan));
|
||||
}).add;
|
||||
|
||||
r = Routine{
|
||||
0.5.wait; // wait for the synthdef to be sent to the server
|
||||
inf.do {
|
||||
Synth("help-KlankOverlapTexture3", [
|
||||
\pan, 1.0.rand2,
|
||||
\freqs, {12000.0.linrand+80}.dup(12),
|
||||
\rings, {3.rrand(10)}.dup(12)
|
||||
]);
|
||||
3.wait;
|
||||
}
|
||||
};
|
||||
r.play;
|
||||
)
|
||||
|
||||
r.stop;</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Klank.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Klank.schelp</a><br>link::Classes/Klank::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
81
doc-schelp/Help-3.12.2/Classes/LFPulse.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
<!doctype html><html lang='en'><head><title>LFPulse | 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 = 'LFPulse';
|
||||
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'>LFPulse:</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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>LFPulse<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'>pulse 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/LFSaw.html">LFSaw</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A non-band-limited pulse oscillator. Outputs a high value of one and a low value of zero.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>LFPulse.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>freq: 440.0</span>, <span class='argstr'>iphase: 0.0</span>, <span class='argstr'>width: 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'>LFPulse.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>freq: 440.0</span>, <span class='argstr'>iphase: 0.0</span>, <span class='argstr'>width: 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'>freq<td class='argumentdesc'>
|
||||
<p>frequency in Hertz<tr><td class='argumentname'>iphase<td class='argumentdesc'>
|
||||
<p>initial phase offset in cycles ( 0..1 )<tr><td class='argumentname'>width<td class='argumentdesc'>
|
||||
<p>pulse width duty cycle from zero to one.<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><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>a plot:<textarea class='editor'>{ LFPulse.ar(Line.kr(100, 800, 0.1)) }.plot(0.1);</textarea>
|
||||
|
||||
<p>50 Hz wave:<textarea class='editor'>{ LFPulse.ar(50) * 0.1 }.play;</textarea>
|
||||
|
||||
<p>modulating frequency:<textarea class='editor'>{ LFPulse.ar(XLine.kr(1, 200, 10), 0, 0.2, 0.1) }.play;</textarea>
|
||||
|
||||
<p>amplitude modulation:<textarea class='editor'>{ LFPulse.kr(XLine.kr(1, 200, 10), 0, 0.2) * SinOsc.ar(440) * 0.1 }.play;</textarea>
|
||||
|
||||
<p>used as both Oscillator and LFO:<textarea class='editor'>{ LFPulse.ar(LFPulse.kr(3, 0, 0.3, 200, 200), 0, 0.2, 0.1) }.play;</textarea>
|
||||
|
||||
<p>scope:<textarea class='editor'>{ LFPulse.ar(500, 0, MouseX.kr, 0.5) }.scope;</textarea>
|
||||
|
||||
<p>compare with band limited Pulse UGen:<textarea class='editor'>(
|
||||
{
|
||||
[
|
||||
Pulse.ar(100, 0.3, 0.5),
|
||||
LFPulse.ar(100, 0, 0.3, 0.5)
|
||||
] * 0.2
|
||||
}.scope(bufsize: 44100, zoom: 5)
|
||||
)</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LFPulse.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LFPulse.schelp</a><br>link::Classes/LFPulse::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
70
doc-schelp/Help-3.12.2/Classes/LFSaw.html
Normal file
|
@ -0,0 +1,70 @@
|
|||
<!doctype html><html lang='en'><head><title>LFSaw | 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 = 'LFSaw';
|
||||
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'>LFSaw:</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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Deterministic'>Deterministic</a></span>
|
||||
</div><h1>LFSaw<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'>Sawtooth 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='subclasses'>Subclasses: <a href="../Classes/LFCub.html">LFCub</a>, <a href="../Classes/LFPar.html">LFPar</a>, <a href="../Classes/LFTri.html">LFTri</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/LFCub.html">LFCub</a>, <a href="./../Classes/LFPar.html">LFPar</a>, <a href="./../Classes/LFPulse.html">LFPulse</a>, <a href="./../Classes/LFTri.html">LFTri</a>, <a href="./../Classes/Saw.html">Saw</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A non-band-limited sawtooth oscillator. Output ranges from -1 to +1.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>LFSaw.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>freq: 440.0</span>, <span class='argstr'>iphase: 0.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>LFSaw.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>freq: 440.0</span>, <span class='argstr'>iphase: 0.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'>iphase<td class='argumentdesc'>
|
||||
<p>Initial phase offset. For efficiency reasons this is a value ranging from 0 to 2.<div class='note'><span class='notelabel'>NOTE:</span> enter "1" for an initial phase of 0 radians. A value of 0 would start the cycle at pi radians. See the example below.</div><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'>{ LFSaw.ar(500, 1, 0.1) }.play
|
||||
|
||||
// used as both Oscillator and LFO:
|
||||
{ LFSaw.ar(LFSaw.kr(4, 0, 200, 400), 0, 0.1) }.play</textarea>
|
||||
|
||||
<p>Display the special behaviour of the initial phase parameter:<textarea class='editor'> // three channels, three phases
|
||||
{ LFSaw.ar(20, [0, 1, 2]) }.plot(0.1)</textarea>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LFSaw.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LFSaw.schelp</a><br>link::Classes/LFSaw::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
142
doc-schelp/Help-3.12.2/Classes/LPCAnalyzer.html
Normal file
|
@ -0,0 +1,142 @@
|
|||
<html><head><title>LPCAnalyzer</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>LPCAnalyzer</h1>
|
||||
<div id='summary'>Live Linear Predictive Coding Analysis and Resynthesis</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/NCAnalysisUGens/classes/LPCAnalyzer.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/NCAnalysisUGens/classes/LPCAnalyzer.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>
|
||||
<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>Linear predictive coding analysis on any arbitrary input signal. The spectrum of the input signal is modeled, and used to filter the source. This works most successfully if the source is spectrally flat to begin with, ie, an impulse train ( <a href="./../Classes/Impulse.html">Impulse</a> UGen ) or white noise ( <a href="./../Classes/WhiteNoise.html">WhiteNoise</a> UGen ).
|
||||
<p>The two big hits to CPU costs here are large n, causing peaky calculation hits once per window as autocorrelation coefficients are calculated, and p as determining the order of the filter which is fitted, and thus the per sample output calculation cost.
|
||||
<p>(For more technicalities see John Makhoul (1975) <em>"Linear Prediction: A Tutorial Review"</em>. Proceedings of the IEEE 63(4).)<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'>input: 0</span>, <span class='argstr'>source: 0.01</span>, <span class='argstr'>n: 256</span>, <span class='argstr'>p: 10</span>, <span class='argstr'>testE: 0</span>, <span class='argstr'>delta: 0.999</span>, <span class='argstr'>windowtype: 0</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'>input<td class='argumentdesc'>
|
||||
<p>Original signal to analyse with the LPC model<tr><td class='argumentname'>source<td class='argumentdesc'>
|
||||
<p>Excitation to run through LPC derived filter<tr><td class='argumentname'>n<td class='argumentdesc'>
|
||||
<p>Windowsize for analysis in samples; limits of 1<=n<=1024<tr><td class='argumentname'>p<td class='argumentdesc'>
|
||||
<p>Number of poles used to model spectrum of input within one window<tr><td class='argumentname'>testE<td class='argumentdesc'>
|
||||
<p>Whether to test for meeting of error condition, for variable number of poles solution up to p<tr><td class='argumentname'>delta<td class='argumentdesc'>
|
||||
<p>Test value, close to but just below 1.<tr><td class='argumentname'>windowtype<td class='argumentdesc'>
|
||||
<p>Windowing. 0 is rectangular window, abrupt swap of filter coefficients after every n samples. 1 is triangular window, and runs two LPCAnalyzers crossfading, for a smoother ride, at expense of double CPU cost.</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'>{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(440,0,0.2), 256, 50)}.play
|
||||
|
||||
{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(440,0,0.2), 256, 50, windowtype:1)}.play
|
||||
|
||||
{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(440,0,0.2), 128, MouseX.kr(1,128))}.play
|
||||
|
||||
{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(440,0,0.2), 1024, MouseX.kr(1,128), windowtype:1)}.play
|
||||
|
||||
|
||||
{LPCAnalyzer.ar(SoundIn.ar,0.1*WhiteNoise.ar, 256, MouseX.kr(1,256))}.play
|
||||
|
||||
//keep number of poles lower if pushing harder with bigger windows
|
||||
{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(MouseY.kr(100,1000),0,0.2), 1024, MouseX.kr(1,128),1,0.9999, 1)}.play
|
||||
|
||||
|
||||
(
|
||||
{
|
||||
var source,amplitude, freq, hasFreq;
|
||||
|
||||
source= SoundIn.ar;
|
||||
|
||||
//no need, fitted filter tracks amplitudes, essentially
|
||||
//amplitude= Amplitude.kr(source);
|
||||
|
||||
#freq,hasFreq= Pitch.kr(source);
|
||||
|
||||
LPCAnalyzer.ar(source,if(hasFreq,Impulse.ar(freq),0.25*WhiteNoise.ar), 256,MouseX.kr(1,256), windowtype:1)
|
||||
|
||||
}.play
|
||||
)
|
||||
|
||||
|
||||
//singing with myself after three seconds
|
||||
(
|
||||
{
|
||||
var source,amplitude, freq, hasFreq;
|
||||
|
||||
source= SoundIn.ar;
|
||||
|
||||
amplitude= Amplitude.kr(source);
|
||||
|
||||
LPCAnalyzer.ar(source,CombC.ar(source,3.0,3.0,10.0), 256,MouseX.kr(1,256)).dup(2)
|
||||
|
||||
}.play
|
||||
)
|
||||
|
||||
(
|
||||
{
|
||||
var input,source;
|
||||
|
||||
input= Resonz.ar(Saw.ar(SinOsc.kr([0.1,0.11],500,600)),LFNoise1.kr(LFNoise1.kr(4,3.5,7),700,2500),LFNoise2.kr(0.5,0.3,0.4));
|
||||
|
||||
source= SoundIn.ar;
|
||||
|
||||
LPCAnalyzer.ar(input,source, 64,MouseX.kr(1,64), windowtype:1)
|
||||
|
||||
}.play
|
||||
)
|
||||
|
||||
|
||||
//test variable order
|
||||
{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(MouseX.kr(10,1000,'exponential'),0,0.2), 256, 256,1,0.999)}.play
|
||||
|
||||
{LPCAnalyzer.ar(SoundIn.ar,Impulse.ar(MouseX.kr(10,1000,'exponential'),0,0.2), 256, 256,1,MouseY.kr(0.9,1.0).sqrt)}.play
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
//residual test assumes windowtype 0)
|
||||
(
|
||||
{
|
||||
var input,source;
|
||||
var delaytime= 1024.0/SampleRate.ir;
|
||||
|
||||
input= SoundIn.ar;
|
||||
|
||||
source= Impulse.ar(delaytime.reciprocal);
|
||||
|
||||
(DelayN.ar(input,delaytime, delaytime)- LPCAnalyzer.ar(input,source,1024,MouseX.kr(1,256))).poll(10000)
|
||||
|
||||
}.play
|
||||
)</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/NCAnalysisUGens/HelpSource/Classes/LPCAnalyzer.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/NCAnalysisUGens/HelpSource/Classes/LPCAnalyzer.schelp</a><br>link::Classes/LPCAnalyzer::<br>sc version: 3.8.0</div></div></body></html>
|
76
doc-schelp/Help-3.12.2/Classes/LPF.html
Normal file
|
@ -0,0 +1,76 @@
|
|||
<!doctype html><html lang='en'><head><title>LPF | 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 = 'LPF';
|
||||
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'>LPF:</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> > <a href='./../Browse.html#UGens>Filters'>Filters</a> > <a href='./../Browse.html#UGens>Filters>Linear'>Linear</a></span>
|
||||
</div><h1>LPF<span id='superclasses'> : <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'>2nd order Butterworth lowpass filter</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Filter.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Filter.sc'>Filter.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/HPF.html">HPF</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/BPF.html">BPF</a>, <a href="./../Classes/BRF.html">BRF</a>, <a href="./../Classes/HPF.html">HPF</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A second order low pass filter.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>LPF.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in: 0.0</span>, <span class='argstr'>freq: 440.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>LPF.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>in: 0.0</span>, <span class='argstr'>freq: 440.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'>in<td class='argumentdesc'>
|
||||
<p>The input signal.<tr><td class='argumentname'>freq<td class='argumentdesc'>
|
||||
<p>Cutoff frequency in Hertz. 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'>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'>{ LPF.ar(Saw.ar(200,0.1), SinOsc.kr(XLine.kr(0.7,300,20),0,3600,4000)) }.play;
|
||||
|
||||
// kr:
|
||||
(
|
||||
{ var ctl = LPF.kr(LFPulse.kr(8), SinOsc.kr(XLine.kr(1, 30, 5)) + 2);
|
||||
SinOsc.ar(ctl * 200 + 400)
|
||||
}.play;
|
||||
)
|
||||
|
||||
(
|
||||
{ var ctl = LPF.kr(LFPulse.kr(8), MouseX.kr(2, 50, 1));
|
||||
SinOsc.ar(ctl * 200 + 400)
|
||||
}.play;
|
||||
)</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LPF.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LPF.schelp</a><br>link::Classes/LPF::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
77
doc-schelp/Help-3.12.2/Classes/LanguageConfig.html
Normal file
|
@ -0,0 +1,77 @@
|
|||
<html><head><title>LanguageConfig</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#Language'>Language</a></div>
|
||||
<h1>LanguageConfig</h1>
|
||||
<div id='summary'>Access and modify interpreter configuration</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/LanguageConfig.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Core/LanguageConfig.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Object.html">Object</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='#*store'>store</a> </li>
|
||||
<li class='toc2'><a href='#Library%20Path%20Handling'>Library Path Handling</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*includePaths'>includePaths</a> </li>
|
||||
<li class='toc3'><a href='#*addIncludePath'>addIncludePath</a> </li>
|
||||
<li class='toc3'><a href='#*removeIncludePath'>removeIncludePath</a> </li>
|
||||
<li class='toc3'><a href='#*excludePaths'>excludePaths</a> </li>
|
||||
<li class='toc3'><a href='#*addExcludePath'>addExcludePath</a> </li>
|
||||
<li class='toc3'><a href='#*removeExcludePath'>removeExcludePath</a> </li>
|
||||
<li class='toc3'><a href='#*currentPath'>currentPath</a> </li>
|
||||
</ul><li class='toc2'><a href='#Compiler%20Warnings'>Compiler Warnings</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*postInlineWarnings'>postInlineWarnings</a> </li>
|
||||
</ul><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='#Configuration%20File%20Format'>Configuration File Format</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>The LanguageConfig class provides access to the interpreter configuration.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*store' href='./../Overviews/Methods.html#store'>store</a> (<span class='argstr'>file</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Store the current configuration to file.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>file<td class='argumentdesc'>
|
||||
<p>Path to the configuration file to store. If the value is <code class='code prettyprint lang-sc'>nil</code> it defaults to <code class='code prettyprint lang-sc'>Platform.userConfigDir +/+ "sclang_conf.yaml"</code></table></div><h3><a class='anchor' name='Library%20Path%20Handling'>Library Path Handling</a></h3>
|
||||
|
||||
<p>The language configuration mechanism provides a way to add or exclude specific paths for the class library.<div class='note'><span class='notelabel'>NOTE:</span> Changes to the class library paths won't have any effect before the configuration file is stored and the class library is recompiled.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*includePaths' href='./../Overviews/Methods.html#includePaths'>includePaths</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Return the class library include paths.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*addIncludePath' href='./../Overviews/Methods.html#addIncludePath'>addIncludePath</a> (<span class='argstr'>aPath</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Add new class library include path.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*removeIncludePath' href='./../Overviews/Methods.html#removeIncludePath'>removeIncludePath</a> (<span class='argstr'>aPath</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Remove path from class library include paths.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*excludePaths' href='./../Overviews/Methods.html#excludePaths'>excludePaths</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Return the class library exclude paths.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*addExcludePath' href='./../Overviews/Methods.html#addExcludePath'>addExcludePath</a> (<span class='argstr'>aPath</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Add new class library exclude path.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*removeExcludePath' href='./../Overviews/Methods.html#removeExcludePath'>removeExcludePath</a> (<span class='argstr'>aPath</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Remove path from class library exclude paths.</div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*currentPath' href='./../Overviews/Methods.html#currentPath'>currentPath</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Return the current config file path.</div><h3><a class='anchor' name='Compiler%20Warnings'>Compiler Warnings</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*postInlineWarnings' href='./../Overviews/Methods.html#postInlineWarnings'>postInlineWarnings</a></h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*postInlineWarnings' href='./../Overviews/Methods.html#postInlineWarnings'>postInlineWarnings</a> = <span class='argstr'>aBoolean</span></h3>
|
||||
<div class='method'>
|
||||
<p>Get or set the compiler flag, whether warnings should be posted if a FunctionDef cannot be inlined.</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='Configuration%20File%20Format'>Configuration File Format</a></h2>
|
||||
|
||||
<p>The configuration file is stored in YAML format, which contains one dictionary. The semantics of the dictionary is listed in the following table:<dl>
|
||||
<dt><code>includePaths</code><dd>List of class library paths.<dt><code>excludePaths</code><dd>List of paths to exclude from the class library files (overrides <code>includePaths</code>).<dt><code>postInlineWarnings</code><dd>Boolean flag to post warnings about missing inline opportunities.</dl>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LanguageConfig.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LanguageConfig.schelp</a><br>link::Classes/LanguageConfig::<br>sc version: 3.8.0</div></div></body></html>
|
63
doc-schelp/Help-3.12.2/Classes/Latoocarfian2DC.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
<html><head><title>Latoocarfian2DC</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>Stochastic'>UGens>Generators>Stochastic</a></div>
|
||||
<h1>Latoocarfian2DC</h1>
|
||||
<div id='summary'>latoocarfian 2D chaotic generator</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/BhobUGens/classes/bhobChaos.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/BhobUGens/classes/bhobChaos.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Latoocarfian2DN.html">Latoocarfian2DN</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/Latoocarfian2DN.html">Latoocarfian2DN</a>, <a href="./../Classes/Latoocarfian2DL.html">Latoocarfian2DL</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> <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><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>x(n+1) = sin(by(n)) + c*sin(bx(n))
|
||||
y(n+1) = sin(ay(n)) + d*sin(ax(n))</pre>
|
||||
|
||||
<p>x values determine frequencies; y values determine amplitudes. Stable ranges for <strong>a</strong> & <strong>b</strong> tend to be between -3 to + 3. <strong>c</strong> & <strong>d</strong> between 0.5 and 1.5. There are combinations within these ranges that are unstable, so be prepared to tweak this oscillator.<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'>minfreq: 11025</span>, <span class='argstr'>maxfreq: 22050</span>, <span class='argstr'>a: 1</span>, <span class='argstr'>b: 3</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>d: 0.5</span>, <span class='argstr'>x0: 0.34082301375036</span>, <span class='argstr'>y0: -0.38270086971332</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/Latoocarfian2DN.html'>Latoocarfian2DN</a></div>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>minfreq: 40</span>, <span class='argstr'>maxfreq: 100</span>, <span class='argstr'>a: 1</span>, <span class='argstr'>b: 3</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>d: 0.5</span>, <span class='argstr'>x0: 0.34082301375036</span>, <span class='argstr'>y0: -0.38270086971332</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/Latoocarfian2DN.html'>Latoocarfian2DN</a></div>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>minfreq, maxfreq<td class='argumentdesc'>
|
||||
<p>iteration frequency in Hertz<tr><td class='argumentname'>a, b, c, d<td class='argumentdesc'>
|
||||
<p>equation variables<tr><td class='argumentname'>x0<td class='argumentdesc'>
|
||||
<p>initial value of x<tr><td class='argumentname'>y0<td class='argumentdesc'>
|
||||
<p>initial value of y</table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
|
||||
<div id='inheritedclassmets'></div><h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
||||
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
|
||||
<div id='inheritedinstmets'></div><h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>(
|
||||
{ Latoocarfian2DC.ar(
|
||||
SampleRate.ir/8,
|
||||
SampleRate.ir/2,
|
||||
LFNoise2.kr(2.dup, 1.5, 1.5),
|
||||
d:LFNoise2.kr(2.dup, 0.5, 1.5),
|
||||
mul:0.2
|
||||
) }.play(s);
|
||||
)</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/BhobUGens/HelpSource/Classes/Latoocarfian2DC.schelp'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/BhobUGens/HelpSource/Classes/Latoocarfian2DC.schelp</a><br>link::Classes/Latoocarfian2DC::<br>sc version: 3.8.0</div></div></body></html>
|
88
doc-schelp/Help-3.12.2/Classes/LatoocarfianL.html
Normal file
|
@ -0,0 +1,88 @@
|
|||
<html><head><title>LatoocarfianL</title>
|
||||
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
|
||||
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
|
||||
<link rel='stylesheet' href='./../custom.css' type='text/css' />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
|
||||
<script src='./../scdoc.js' type='text/javascript'></script>
|
||||
<script src='./../docmap.js' type='text/javascript'></script>
|
||||
<script src='./../prettify.js' type='text/javascript'></script>
|
||||
<script src='./../lang-sc.js' type='text/javascript'></script>
|
||||
<script type='text/javascript'>var helpRoot='./..';</script>
|
||||
</head>
|
||||
<ul id='menubar'></ul>
|
||||
<body onload='fixTOC();prettyPrint()'>
|
||||
<div class='contents'>
|
||||
<div class='header'>
|
||||
<div id='label'>SuperCollider CLASSES</div>
|
||||
<div id='categories'><a href='./../Browse.html#UGens>Generators>Chaotic'>UGens>Generators>Chaotic</a></div>
|
||||
<h1>LatoocarfianL</h1>
|
||||
<div id='summary'>Latoocarfian chaotic generator</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/LatoocarfianN.html">LatoocarfianN</a> : <a href="../Classes/ChaosGen.html">ChaosGen</a> : <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/LatoocarfianC.html">LatoocarfianC</a>, <a href="./../Classes/LatoocarfianN.html">LatoocarfianN</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*ar'>ar</a> </li>
|
||||
<li class='toc2'><a href='#Inherited%20class%20methods'>Inherited class methods</a></li>
|
||||
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
|
||||
</ul><li class='toc1'><a href='#examples'>Examples</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A linear-interpolating sound generator based on a function given in Clifford Pickover's book Chaos In Wonderland, pg 26. The function is:<pre> x(n+1) = sin(b * y(n)) + c * sin(b * x(n))
|
||||
y(n+1) = sin(a * x(n)) + d * sin(a * y(n))</pre>
|
||||
<p>According to Pickover, parameters <code class='code prettyprint lang-sc'>a</code> and <code class='code prettyprint lang-sc'>b</code> should be in the range from -3 to +3, and parameters <code class='code prettyprint lang-sc'>c</code> and <code class='code prettyprint lang-sc'>d</code> should be in the range from 0.5 to 1.5. The function can, depending on the parameters given, give continuous chaotic output, converge to a single value (silence) or oscillate in a cycle (tone).
|
||||
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
|
||||
var a = 1, b = 3, c = 0.5, d = 0.5, xi = 0.5, yi = 0.5, size = 64;
|
||||
plot(size.collect { var x = xi;
|
||||
xi = sin(b * yi) + (c * sin(b * xi));
|
||||
yi = sin(a * x) + (d * sin(a * yi));
|
||||
xi
|
||||
});
|
||||
)</pre>
|
||||
<div class='note'><span class='notelabel'>NOTE:</span> This UGen is experimental and not optimized currently, so is rather hoggish of CPU.</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*ar' href='./../Overviews/Methods.html#ar'>ar</a> (<span class='argstr'>freq: 22050</span>, <span class='argstr'>a: 1</span>, <span class='argstr'>b: 3</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>d: 0.5</span>, <span class='argstr'>xi: 0.5</span>, <span class='argstr'>yi: 0.5</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/LatoocarfianN.html'>LatoocarfianN</a></div>
|
||||
<div class='method'><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>freq<td class='argumentdesc'>
|
||||
<p>Iteration frequency in Hertz<tr><td class='argumentname'>a<td class='argumentdesc'>
|
||||
<p>Equation variable<tr><td class='argumentname'>b<td class='argumentdesc'>
|
||||
<p>Equation variable<tr><td class='argumentname'>c<td class='argumentdesc'>
|
||||
<p>Equation variable<tr><td class='argumentname'>d<td class='argumentdesc'>
|
||||
<p>Equation variable<tr><td class='argumentname'>xi<td class='argumentdesc'>
|
||||
<p>Initial value of x<tr><td class='argumentname'>yi<td class='argumentdesc'>
|
||||
<p>Initial value of y</table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
|
||||
<div id='inheritedclassmets'></div><h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
||||
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
|
||||
<div id='inheritedinstmets'></div><h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<pre class='code prettyprint lang-sc'>// default initial params
|
||||
{ LatoocarfianL.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);</pre>
|
||||
<pre class='code prettyprint lang-sc'>// randomly modulate all params
|
||||
(
|
||||
{ LatoocarfianL.ar(
|
||||
SampleRate.ir/4,
|
||||
LFNoise2.kr(2,1.5,1.5),
|
||||
LFNoise2.kr(2,1.5,1.5),
|
||||
LFNoise2.kr(2,0.5,1.5),
|
||||
LFNoise2.kr(2,0.5,1.5)
|
||||
) * 0.2 }.play(s);
|
||||
)</pre>
|
||||
<pre class='code prettyprint lang-sc'>(
|
||||
{ LatoocarfianL.ar(
|
||||
SampleRate.ir/4,
|
||||
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||||
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2),
|
||||
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||||
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2),
|
||||
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||||
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2),
|
||||
[LFDNoise0,LFClipNoise,LFDNoise1,LFDNoise3,
|
||||
LFNoise0,LFNoise1,LFNoise2].choose.kr(rrand(2,20),rrand(2,20)*0.1,rrand(2,20)*0.2)
|
||||
) * 0.2 !2}.play;
|
||||
)</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LatoocarfianL.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LatoocarfianL.schelp</a><br>link::Classes/LatoocarfianL::<br>sc version: 3.8.0</div></div></body></html>
|
136
doc-schelp/Help-3.12.2/Classes/LatoocarfianTrig.html
Normal file
|
@ -0,0 +1,136 @@
|
|||
<html><head><title>LatoocarfianTrig</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#Undocumented classes'>Undocumented classes</a>, <a href='./../Browse.html#UGens>Undocumented'>UGens>Undocumented</a></div>
|
||||
<h1>LatoocarfianTrig</h1>
|
||||
<div id='summary'>(Undocumented class)</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/BhobUGens/classes/bhobChaos.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/BhobUGens/classes/bhobChaos.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>
|
||||
<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>
|
||||
<li class='toc2'><a href='#Undocumented%20class%20methods'>Undocumented class methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*ar'>ar</a> </li>
|
||||
<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='#Help%20template'>Help template</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>This class is missing documentation.<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='cmethodname'><span class='methprefix'>*</span><a name='*ar' href='./../Overviews/Methods.html#ar'>ar</a> (<span class='argstr'>minfreq: 5</span>, <span class='argstr'>maxfreq: 10</span>, <span class='argstr'>a: 1</span>, <span class='argstr'>b: 3</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>d: 0.5</span>, <span class='argstr'>x0: 0.34082301375036</span>, <span class='argstr'>y0: -0.38270086971332</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 0</span>)</h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>minfreq: 5</span>, <span class='argstr'>maxfreq: 10</span>, <span class='argstr'>a: 1</span>, <span class='argstr'>b: 3</span>, <span class='argstr'>c: 0.5</span>, <span class='argstr'>d: 0.5</span>, <span class='argstr'>x0: 0.34082301375036</span>, <span class='argstr'>y0: -0.38270086971332</span>, <span class='argstr'>mul: 1</span>, <span class='argstr'>add: 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='Help%20template'>Help template</a></h2>
|
||||
|
||||
<p>Copy and paste the text below and save to HelpSource/Classes/LatoocarfianTrig.schelp<pre class='code prettyprint lang-sc'>TITLE:: LatoocarfianTrig
|
||||
summary:: (put short description here)
|
||||
categories:: Undocumented classes, UGens>Undocumented
|
||||
related:: Classes/SomeRelatedClass, Reference/SomeRelatedStuff, etc.
|
||||
|
||||
DESCRIPTION::
|
||||
(put long description here)
|
||||
|
||||
|
||||
CLASSMETHODS::
|
||||
|
||||
METHOD:: kr
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: minfreq
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: maxfreq
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: a
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: b
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: c
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: d
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: x0
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: y0
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: mul
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: add
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
METHOD:: ar
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: minfreq
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: maxfreq
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: a
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: b
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: c
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: d
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: x0
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: y0
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: mul
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: add
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
|
||||
INSTANCEMETHODS::
|
||||
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
code::
|
||||
(some example code)
|
||||
::
|
||||
</pre>
|
||||
<div class='doclink'>link::Classes/LatoocarfianTrig::<br>sc version: 3.8.0</div></div></body></html>
|
60
doc-schelp/Help-3.12.2/Classes/Library.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
<!doctype html><html lang='en'><head><title>Library | 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 = 'Library';
|
||||
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'>Library:</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='#*postTree'>postTree</a> </li>
|
||||
<li class='toc3'><a href='#*put'>put</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='#*global'>global</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#Collections'>Collections</a></span>
|
||||
</div><h1>Library<span id='superclasses'> : <a href="../Classes/LibraryBase.html">LibraryBase</a> : <a href="../Classes/MultiLevelIdentityDictionary.html">MultiLevelIdentityDictionary</a> : <a href="../Classes/Collection.html">Collection</a> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>keeping objects in a central place</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/Library.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/Library.sc'>Library.sc</a></div><div id='related'>See also: <a href="./../Classes/Archive.html">Archive</a>, <a href="./../Classes/LibraryBase.html">LibraryBase</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Library is a global MultiLevelIdentityDictionary. The Library can be used as a place to store data that you want globally accessible. It is an alternative to using class variables. It is a nice place to store menus, annotations, and commonly reusable functions.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Library.</span><a class='method-name' name='*postTree' href='./../Overviews/Methods.html#postTree'>postTree</a></h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/LibraryBase.html'>LibraryBase</a></div>
|
||||
<div class='method'>
|
||||
<p>Post a formatted description of the entire library.<pre class='code prettyprint lang-sc'>Library.postTree;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>Library.</span><a class='method-name' name='*put' href='./../Overviews/Methods.html#put'>put</a>( <span class='argstr'>... args</span>)</h3>
|
||||
<div class='supmethod'>From superclass: <a href='./../Classes/LibraryBase.html'>LibraryBase</a></div>
|
||||
<div class='method'>
|
||||
<p>The last argument to put is the object being inserted:<pre class='code prettyprint lang-sc'>Library.put(\multi, \level, \addressing, \system, "i'm the thing you are putting in here");
|
||||
Library.at(\multi, \level, \addressing, \system).postln;
|
||||
Library.atList([\multi, \level, \addressing, \system]).postln;</pre>
|
||||
</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'>Library.</span><a class='method-name' name='*global' href='./../Overviews/Methods.html#global'>global</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Library.</span><a class='method-name' name='*global' href='./../Overviews/Methods.html#global'>global</a> = <span class='argstr'>obj</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><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Library.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Library.schelp</a><br>link::Classes/Library::<br></div></div></body></html>
|
86
doc-schelp/Help-3.12.2/Classes/LinCongC.html
Normal file
|
@ -0,0 +1,86 @@
|
|||
<!doctype html><html lang='en'><head><title>LinCongC | 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 = 'LinCongC';
|
||||
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'>LinCongC:</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 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> > <a href='./../Browse.html#UGens>Generators'>Generators</a> > <a href='./../Browse.html#UGens>Generators>Chaotic'>Chaotic</a></span>
|
||||
</div><h1>LinCongC<span id='superclasses'> : <a href="../Classes/LinCongN.html">LinCongN</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></span>
|
||||
</h1>
|
||||
<div id='summary'>Linear congruential chaotic generator</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Chaos.sc'>Chaos.sc</a></div><div id='related'>See also: <a href="./../Classes/LinCongN.html">LinCongN</a>, <a href="./../Classes/LinCongL.html">LinCongL</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>A cubic-interpolating sound generator based on the difference equation:<pre> x(n+1) = (a * x(n) + c) % m</pre>
|
||||
<p>The output signal is automatically scaled to a range of [-1, 1].
|
||||
<p>sclang code translation:<pre class='code prettyprint lang-sc'>(
|
||||
var a = 1.1, c = 0.13, m = 1, xi = 0, size = 64;
|
||||
plot(size.collect { xi = (a * xi + c) % m });
|
||||
)</pre>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>LinCongC.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>freq: 22050</span>, <span class='argstr'>a: 1.1</span>, <span class='argstr'>c: 0.13</span>, <span class='argstr'>m: 1</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/LinCongN.html'>LinCongN</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>Multiplier amount<tr><td class='argumentname'>c<td class='argumentdesc'>
|
||||
<p>Increment amount<tr><td class='argumentname'>m<td class='argumentdesc'>
|
||||
<p>Modulus amount<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'>// default initial params
|
||||
{ LinCongC.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);</pre>
|
||||
<pre class='code prettyprint lang-sc'>// randomly modulate params
|
||||
(
|
||||
{ LinCongC.ar(
|
||||
LFNoise2.kr(1, 1e4, 1e4),
|
||||
LFNoise2.kr(0.1, 0.5, 1.4),
|
||||
LFNoise2.kr(0.1, 0.1, 0.1),
|
||||
LFNoise2.kr(0.1)
|
||||
) * 0.2 }.play(s);
|
||||
)</pre>
|
||||
<pre class='code prettyprint lang-sc'>// as frequency control...
|
||||
(
|
||||
{
|
||||
SinOsc.ar(
|
||||
LinCongC.ar(
|
||||
40,
|
||||
LFNoise2.kr(0.1, 0.1, 1),
|
||||
LFNoise2.kr(0.1, 0.1, 0.1),
|
||||
LFNoise2.kr(0.1),
|
||||
0, 500, 600
|
||||
)
|
||||
) * 0.4 }.play(s);
|
||||
)</pre>
|
||||
|
||||
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LinCongC.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LinCongC.schelp</a><br>link::Classes/LinCongC::<br></div></div></body></html>
|
101
doc-schelp/Help-3.12.2/Classes/LinLin.html
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!doctype html><html lang='en'><head><title>LinLin | 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 = 'LinLin';
|
||||
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'>LinLin:</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> > <a href='./../Browse.html#UGens>Maths'>Maths</a></span>
|
||||
</div><h1>LinLin<span id='superclasses'> : <a href="../Classes/Object.html">Object</a></span>
|
||||
</h1>
|
||||
<div id='summary'>Map a linear range to another linear range</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Line.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Line.sc'>Line.sc</a></div><div id='related'>See also: <a href="./../Classes/LinExp.html">LinExp</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Maps a linear range of values to another linear range of values.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>LinLin.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>in: 0</span>, <span class='argstr'>srclo: 0</span>, <span class='argstr'>srchi: 1</span>, <span class='argstr'>dstlo: 1</span>, <span class='argstr'>dsthi: 2</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>LinLin.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>in: 0</span>, <span class='argstr'>srclo: 0</span>, <span class='argstr'>srchi: 1</span>, <span class='argstr'>dstlo: 1</span>, <span class='argstr'>dsthi: 2</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>in<td class='argumentdesc'>
|
||||
<p>The input signal to convert.<tr><td class='argumentname'>srclo<td class='argumentdesc'>
|
||||
<p>Lower limit of input range.<tr><td class='argumentname'>srchi<td class='argumentdesc'>
|
||||
<p>Upper limit of input range.<tr><td class='argumentname'>dstlo<td class='argumentdesc'>
|
||||
<p>Lower limit of output range.<tr><td class='argumentname'>dsthi<td class='argumentdesc'>
|
||||
<p>Upper limit of output range.</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'>// examples:
|
||||
|
||||
(
|
||||
{
|
||||
var mod = SinOsc.kr(Line.kr(1, 10, 10));
|
||||
SinOsc.ar(LinLin.kr(mod, -1,1, 100, 900)) * 0.1
|
||||
}.play;
|
||||
)
|
||||
|
||||
// modulating destination values.
|
||||
(
|
||||
{
|
||||
var mod = LFNoise2.ar(80);
|
||||
SinOsc.ar(LinLin.ar(mod, -1,1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1
|
||||
}.play;
|
||||
)
|
||||
|
||||
// modulating source and destination values.
|
||||
(
|
||||
{
|
||||
var mod = LFNoise2.ar(80);
|
||||
SinOsc.ar(
|
||||
LinLin.ar(mod,
|
||||
SinOsc.kr(0.2), SinOsc.kr(0.2543),
|
||||
MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1)
|
||||
)
|
||||
) * 0.1
|
||||
}.play;
|
||||
)</pre>
|
||||
|
||||
<p>linlin and range can be used to create a LinLin implicitly from a ugen, mapping its output values from linear range to an exponential one. The rate is derived from the ugen.<pre class='code prettyprint lang-sc'>// linlin
|
||||
(
|
||||
{
|
||||
var mod = LFNoise2.ar(80);
|
||||
SinOsc.ar(mod.linlin(-1,1, MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1))) * 0.1
|
||||
}.play;
|
||||
)
|
||||
|
||||
// range
|
||||
(
|
||||
{
|
||||
var mod = LFNoise2.ar(80).range(MouseX.kr(200, 8000, 1), MouseY.kr(200, 8000, 1));
|
||||
SinOsc.ar(mod) * 0.1
|
||||
}.play;
|
||||
)</pre>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LinLin.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/LinLin.schelp</a><br>link::Classes/LinLin::<br></div></div></body></html>
|
71
doc-schelp/Help-3.12.2/Classes/Line.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
<!doctype html><html lang='en'><head><title>Line | 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 = 'Line';
|
||||
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'>Line:</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>
|
||||
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-canFreeSynth'>canFreeSynth</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</span>
|
||||
| <span id='categories'><a href='./../Browse.html#UGens'>UGens</a> > <a href='./../Browse.html#UGens>Envelopes'>Envelopes</a></span>
|
||||
</div><h1>Line<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'>Line generator.</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Line.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Line.sc'>Line.sc</a></div><div id='related'>See also: <a href="./../Classes/XLine.html">XLine</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Generates a line from the start value to the end value.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>Line.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>start: 0.0</span>, <span class='argstr'>end: 1.0</span>, <span class='argstr'>dur: 1.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>, <span class='argstr'>doneAction: 0</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>Line.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>start: 0.0</span>, <span class='argstr'>end: 1.0</span>, <span class='argstr'>dur: 1.0</span>, <span class='argstr'>mul: 1.0</span>, <span class='argstr'>add: 0.0</span>, <span class='argstr'>doneAction: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>start<td class='argumentdesc'>
|
||||
<p>Starting value.<tr><td class='argumentname'>end<td class='argumentdesc'>
|
||||
<p>Ending value.<tr><td class='argumentname'>dur<td class='argumentdesc'>
|
||||
<p>Duration in seconds.<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.<tr><td class='argumentname'>doneAction<td class='argumentdesc'>
|
||||
<p>A doneAction to be evaluated when the Line is completed. See
|
||||
<p><a href="./../Classes/Done.html">Done</a> for more detail.</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='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-canFreeSynth' href='./../Overviews/Methods.html#canFreeSynth'>canFreeSynth</a></h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/canFreeSynth.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/canFreeSynth.sc</a></div>
|
||||
<h2><a class='anchor' name='examples'>Examples</a></h2>
|
||||
<textarea class='editor'>// XLine is usually better than Line for frequency
|
||||
play({ SinOsc.ar(Line.kr(200,17000,10),0,0.1) });</textarea>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Line.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Line.schelp</a><br>link::Classes/Line::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
99
doc-schelp/Help-3.12.2/Classes/Link.html
Normal file
|
@ -0,0 +1,99 @@
|
|||
<html><head><title>Link</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#Undocumented classes'>Undocumented classes</a>, <a href='./../Browse.html#UGens>Undocumented'>UGens>Undocumented</a></div>
|
||||
<h1>Link</h1>
|
||||
<div id='summary'>(Undocumented class)</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.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>
|
||||
<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>
|
||||
<li class='toc2'><a href='#Undocumented%20class%20methods'>Undocumented class methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*enable'>enable</a> </li>
|
||||
<li class='toc3'><a href='#*kr'>kr</a> </li>
|
||||
<li class='toc3'><a href='#*quantum'>quantum</a> </li>
|
||||
<li class='toc3'><a href='#*setTempo'>setTempo</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='#Help%20template'>Help template</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>This class is missing documentation.<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='cmethodname'><span class='methprefix'>*</span><a name='*enable' href='./../Overviews/Methods.html#enable'>enable</a> (<span class='argstr'>tempo: 60</span>)</h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> </h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*quantum' href='./../Overviews/Methods.html#quantum'>quantum</a> </h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*setTempo' href='./../Overviews/Methods.html#setTempo'>setTempo</a> (<span class='argstr'>tempo</span>, <span class='argstr'>lagTime: 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='Help%20template'>Help template</a></h2>
|
||||
|
||||
<p>Copy and paste the text below and save to HelpSource/Classes/Link.schelp<pre class='code prettyprint lang-sc'>TITLE:: Link
|
||||
summary:: (put short description here)
|
||||
categories:: Undocumented classes, UGens>Undocumented
|
||||
related:: Classes/SomeRelatedClass, Reference/SomeRelatedStuff, etc.
|
||||
|
||||
DESCRIPTION::
|
||||
(put long description here)
|
||||
|
||||
|
||||
CLASSMETHODS::
|
||||
|
||||
METHOD:: enable
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: tempo
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
METHOD:: setTempo
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: tempo
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: lagTime
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
METHOD:: kr
|
||||
(describe method here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
METHOD:: quantum
|
||||
(describe method here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
|
||||
INSTANCEMETHODS::
|
||||
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
code::
|
||||
(some example code)
|
||||
::
|
||||
</pre>
|
||||
<div class='doclink'>link::Classes/Link::<br>sc version: 3.8.0</div></div></body></html>
|
78
doc-schelp/Help-3.12.2/Classes/LinkLane.html
Normal file
|
@ -0,0 +1,78 @@
|
|||
<html><head><title>LinkLane</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#Undocumented classes'>Undocumented classes</a>, <a href='./../Browse.html#UGens>Undocumented'>UGens>Undocumented</a></div>
|
||||
<h1>LinkLane</h1>
|
||||
<div id='summary'>(Undocumented class)</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.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>
|
||||
<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>
|
||||
<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='#Help%20template'>Help template</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>This class is missing documentation.<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='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>div: 1</span>, <span class='argstr'>max: 4</span>, <span class='argstr'>lane</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='Help%20template'>Help template</a></h2>
|
||||
|
||||
<p>Copy and paste the text below and save to HelpSource/Classes/LinkLane.schelp<pre class='code prettyprint lang-sc'>TITLE:: LinkLane
|
||||
summary:: (put short description here)
|
||||
categories:: Undocumented classes, UGens>Undocumented
|
||||
related:: Classes/SomeRelatedClass, Reference/SomeRelatedStuff, etc.
|
||||
|
||||
DESCRIPTION::
|
||||
(put long description here)
|
||||
|
||||
|
||||
CLASSMETHODS::
|
||||
|
||||
METHOD:: kr
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: div
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: max
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: lane
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
|
||||
INSTANCEMETHODS::
|
||||
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
code::
|
||||
(some example code)
|
||||
::
|
||||
</pre>
|
||||
<div class='doclink'>link::Classes/LinkLane::<br>sc version: 3.8.0</div></div></body></html>
|
75
doc-schelp/Help-3.12.2/Classes/LinkTempo.html
Normal file
|
@ -0,0 +1,75 @@
|
|||
<html><head><title>LinkTempo</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#Undocumented classes'>Undocumented classes</a>, <a href='./../Browse.html#UGens>Undocumented'>UGens>Undocumented</a></div>
|
||||
<h1>LinkTempo</h1>
|
||||
<div id='summary'>(Undocumented class)</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.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>
|
||||
<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>
|
||||
<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='#Help%20template'>Help template</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>This class is missing documentation.<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='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>tempo</span>, <span class='argstr'>env</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='Help%20template'>Help template</a></h2>
|
||||
|
||||
<p>Copy and paste the text below and save to HelpSource/Classes/LinkTempo.schelp<pre class='code prettyprint lang-sc'>TITLE:: LinkTempo
|
||||
summary:: (put short description here)
|
||||
categories:: Undocumented classes, UGens>Undocumented
|
||||
related:: Classes/SomeRelatedClass, Reference/SomeRelatedStuff, etc.
|
||||
|
||||
DESCRIPTION::
|
||||
(put long description here)
|
||||
|
||||
|
||||
CLASSMETHODS::
|
||||
|
||||
METHOD:: kr
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: tempo
|
||||
(describe argument here)
|
||||
|
||||
ARGUMENT:: env
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
|
||||
INSTANCEMETHODS::
|
||||
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
code::
|
||||
(some example code)
|
||||
::
|
||||
</pre>
|
||||
<div class='doclink'>link::Classes/LinkTempo::<br>sc version: 3.8.0</div></div></body></html>
|
72
doc-schelp/Help-3.12.2/Classes/LinkTrig.html
Normal file
|
@ -0,0 +1,72 @@
|
|||
<html><head><title>LinkTrig</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#Undocumented classes'>Undocumented classes</a>, <a href='./../Browse.html#UGens>Undocumented'>UGens>Undocumented</a></div>
|
||||
<h1>LinkTrig</h1>
|
||||
<div id='summary'>(Undocumented class)</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.sc'>/Users/zzk/Library/Application Support/SuperCollider/Extensions/LinkUGen/Classes/Link.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>
|
||||
<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>
|
||||
<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='#Help%20template'>Help template</a></li>
|
||||
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>This class is missing documentation.<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='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>division: 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='Help%20template'>Help template</a></h2>
|
||||
|
||||
<p>Copy and paste the text below and save to HelpSource/Classes/LinkTrig.schelp<pre class='code prettyprint lang-sc'>TITLE:: LinkTrig
|
||||
summary:: (put short description here)
|
||||
categories:: Undocumented classes, UGens>Undocumented
|
||||
related:: Classes/SomeRelatedClass, Reference/SomeRelatedStuff, etc.
|
||||
|
||||
DESCRIPTION::
|
||||
(put long description here)
|
||||
|
||||
|
||||
CLASSMETHODS::
|
||||
|
||||
METHOD:: kr
|
||||
(describe method here)
|
||||
|
||||
ARGUMENT:: division
|
||||
(describe argument here)
|
||||
|
||||
returns:: (describe returnvalue here)
|
||||
|
||||
|
||||
INSTANCEMETHODS::
|
||||
|
||||
|
||||
EXAMPLES::
|
||||
|
||||
code::
|
||||
(some example code)
|
||||
::
|
||||
</pre>
|
||||
<div class='doclink'>link::Classes/LinkTrig::<br>sc version: 3.8.0</div></div></body></html>
|
295
doc-schelp/Help-3.12.2/Classes/List.html
Normal file
|
@ -0,0 +1,295 @@
|
|||
<!doctype html><html lang='en'><head><title>List | 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 = 'List';
|
||||
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'>List:</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='#*copyInstance'>copyInstance</a> </li>
|
||||
<li class='toc3'><a href='#*newUsing'>newUsing</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='#-asArray'>asArray</a> </li>
|
||||
<li class='toc3'><a href='#-array'>array</a> </li>
|
||||
<li class='toc3'><a href='#-array'>array</a> </li>
|
||||
<li class='toc3'><a href='#-at'>at</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='#-put'>put</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='#-add'>add</a> </li>
|
||||
<li class='toc3'><a href='#-addFirst'>addFirst</a> </li>
|
||||
<li class='toc3'><a href='#-insert'>insert</a> </li>
|
||||
<li class='toc3'><a href='#-pop'>pop</a> </li>
|
||||
<li class='toc3'><a href='#-grow'>grow</a> </li>
|
||||
<li class='toc3'><a href='#-removeAt'>removeAt</a> </li>
|
||||
<li class='toc3'><a href='#-fill'>fill</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='#-pairsDo'>pairsDo</a> </li>
|
||||
<li class='toc3'><a href='#-copyRange'>copyRange</a> </li>
|
||||
<li class='toc3'><a href='#-copySeries'>copySeries</a> </li>
|
||||
<li class='toc3'><a href='#-putSeries'>putSeries</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='#-pyramid'>pyramid</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='#-wrapExtend'>wrapExtend</a> </li>
|
||||
<li class='toc3'><a href='#-foldExtend'>foldExtend</a> </li>
|
||||
<li class='toc3'><a href='#-slide'>slide</a> </li>
|
||||
<li class='toc3'><a href='#-dump'>dump</a> </li>
|
||||
<li class='toc3'><a href='#-clear'>clear</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='#-asList'>asList</a> </li>
|
||||
<li class='toc3'><a href='#-copy'>copy</a> </li>
|
||||
<li class='toc3'><a href='#-doAdjacentPairs'>doAdjacentPairs</a> </li>
|
||||
<li class='toc3'><a href='#-first'>first</a> </li>
|
||||
<li class='toc3'><a href='#-last'>last</a> </li>
|
||||
<li class='toc3'><a href='#-rotate'>rotate</a> </li>
|
||||
<li class='toc3'><a href='#-setCollection'>setCollection</a> </li>
|
||||
<li class='toc3'><a href='#-size'>size</a> </li>
|
||||
<li class='toc3'><a href='#-swap'>swap</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#Collections'>Collections</a> > <a href='./../Browse.html#Collections>Ordered'>Ordered</a></span>
|
||||
</div><h1>List<span id='superclasses'> : <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'>list of items of variable size</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/List.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Collections/List.sc'>List.sc</a></div><div id='subclasses'>Subclasses: <a href="../Classes/SortedList.html">SortedList</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/Array.html">Array</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>List is a subclass of SequenceableCollection with unlimited growth in size. Although not a subclass of <a href="./../Classes/Array.html">Array</a> or its superclass <a href="./../Classes/ArrayedCollection.html">ArrayedCollection</a> it uses an Array in its implementation and is in many cases interchangeable with one. (List implements many of the same methods as Array.)
|
||||
<p>Arrays have a fixed maximum size. If you add beyond that size a new Array is created and returned, but you must use an assignment statement or the new array will be lost. (See the <a href="./../Classes/Array.html">Array</a> helpfile.) List has no size limitation and is thus more flexible, but has slightly more overhead.<pre class='code prettyprint lang-sc'>(
|
||||
x = Array.new(3);
|
||||
y = List.new(3);
|
||||
5.do({ arg i; z = x.add(i); y.add(i); });
|
||||
x.postln; z.postln; y.postln;
|
||||
)</pre>
|
||||
|
||||
<p>Many of List's methods are inherited from <a href="./../Classes/SequenceableCollection.html">SequenceableCollection</a> or <a href="./../Classes/Collection.html">Collection</a> and are documented in those helpfiles.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>List.</span><a class='method-name' name='*new' href='./../Overviews/Methods.html#new'>new</a>(<span class='argstr'>size: 8</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a List with the initial capacity given by <strong>size</strong>.</div><h3 class='method-code'><span class='method-prefix'>List.</span><a class='method-name' name='*newClear' href='./../Overviews/Methods.html#newClear'>newClear</a>(<span class='argstr'>size: 0</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a List with the initial capacity given by <strong>size</strong> and slots filled with nil.</div><h3 class='method-code'><span class='method-prefix'>List.</span><a class='method-name' name='*copyInstance' href='./../Overviews/Methods.html#copyInstance'>copyInstance</a>(<span class='argstr'>aList</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a List by copying <strong>aList</strong>'s array variable.</div><h3 class='method-code'><span class='method-prefix'>List.</span><a class='method-name' name='*newUsing' href='./../Overviews/Methods.html#newUsing'>newUsing</a>(<span class='argstr'>anArray</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Creates a List using <strong>anArray</strong>.</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='-asArray' href='./../Overviews/Methods.html#asArray'>asArray</a></h3>
|
||||
<div class='method'>
|
||||
<p>Returns a new <a href="./../Classes/Array.html">Array</a> based upon this List.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-array' href='./../Overviews/Methods.html#array'>array</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-array' href='./../Overviews/Methods.html#array'>array</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>Returns the List's Array, allowing it to be manipulated directly. This should only be necessary for exotic manipulations not implemented in List or its superclasses.<pre class='code prettyprint lang-sc'>(
|
||||
x = List[1, 2, 3];
|
||||
x.array.add("foo");
|
||||
x.postln;
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-array' href='./../Overviews/Methods.html#array'>array</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-array' href='./../Overviews/Methods.html#array'>array</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>Sets the List's Array.</div><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'>i</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Return the item at <strong>index</strong>.<pre class='code prettyprint lang-sc'>List[ 1, 2, 3 ].at(0).postln;</pre>
|
||||
</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'>i</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <a href="#-at">-at</a>, but values for <strong>index</strong> greater than the size of the List will be clipped to the last index.<pre class='code prettyprint lang-sc'>y = List[ 1, 2, 3 ];
|
||||
y.clipAt(13).postln;</pre>
|
||||
</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'>i</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <a href="#-at">-at</a>, but values for <strong>index</strong> greater than the size of the List will be wrapped around to 0.<pre class='code prettyprint lang-sc'>y = List[ 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</pre>
|
||||
</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'>i</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <a href="#-at">-at</a>, but values for <strong>index</strong> greater than the size of the List will be folded back.<pre class='code prettyprint lang-sc'>y = List[ 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</pre>
|
||||
</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'>i</span>, <span class='argstr'>item</span>)</h3>
|
||||
<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='-clipPut' href='./../Overviews/Methods.html#clipPut'>clipPut</a>(<span class='argstr'>i</span>, <span class='argstr'>item</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <a href="#-put">-put</a>, but values for <strong>index</strong> greater than the size of the List 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'>i</span>, <span class='argstr'>item</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <a href="#-put">-put</a>, but values for <strong>index</strong> greater than the size of the List 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'>i</span>, <span class='argstr'>item</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Same as <a href="#-put">-put</a>, but values for <strong>index</strong> greater than the size of the List will be folded back.</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='method'>
|
||||
<p>Adds an <strong>item</strong> to the end of the List.</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='method'>
|
||||
<p>Inserts the <strong>item</strong> at the beginning of the List.</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='method'>
|
||||
<p>Inserts the <strong>item</strong> into the contents of the List at the indicated <strong>index</strong>.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pop' href='./../Overviews/Methods.html#pop'>pop</a></h3>
|
||||
<div class='method'>
|
||||
<p>Remove and return the last element of the List.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-grow' href='./../Overviews/Methods.html#grow'>grow</a>(<span class='argstr'>sizeIncrease</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Increase the size of the List by <strong>sizeIncrease</strong> number of slots.</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='method'>
|
||||
<p>Remove and return the element at <strong>index</strong>, shrinking the size of the List.<pre class='code prettyprint lang-sc'>y = List[ 1, 2, 3 ];
|
||||
y.removeAt(1);
|
||||
y.postln;</pre>
|
||||
</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'>item</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Inserts the item into the contents of the receiver, possibly returning a new collection.<div class='note'><span class='notelabel'>NOTE:</span> the difference between this and <a href="./../Classes/Collection.html#fill">Collection's *fill</a>.</div>
|
||||
<p><pre class='code prettyprint lang-sc'>(
|
||||
var z;
|
||||
z = List[1, 2, 3, 4];
|
||||
z.fill(4).postln;
|
||||
z.fill([1,2,3,4]).postln;
|
||||
)</pre>
|
||||
</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='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.<pre class='code prettyprint lang-sc'>List['a', 'b', 'c'].do({ arg item, i; [i, item].postln; });</pre>
|
||||
</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='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.<pre class='code prettyprint lang-sc'>List['a', 'b', 'c'].reverseDo({ arg item, i; [i, item].postln; });</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-pairsDo' href='./../Overviews/Methods.html#pairsDo'>pairsDo</a>(<span class='argstr'>function</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Calls function for each subsequent pair of elements in the List. The function is passed the two elements and an index.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4, 5, 6].pairsDo({ arg a, b; [a, b].postln; });</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-copyRange' href='./../Overviews/Methods.html#copyRange'>copyRange</a>(<span class='argstr'>start</span>, <span class='argstr'>end</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Return a new List which is a copy of the indexed slots of the receiver from start to end.<pre class='code prettyprint lang-sc'>(
|
||||
var y, z;
|
||||
z = List[1, 2, 3, 4, 5];
|
||||
y = z.copyRange(1,3);
|
||||
z.postln;
|
||||
y.postln;
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-copySeries' href='./../Overviews/Methods.html#copySeries'>copySeries</a>(<span class='argstr'>first</span>, <span class='argstr'>second</span>, <span class='argstr'>last</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Return a new List consisting of the values starting at <strong>first</strong>, then every step of the distance between <strong>first</strong> and <strong>second</strong>, up until <strong>last</strong>.<pre class='code prettyprint lang-sc'>(
|
||||
var y, z;
|
||||
z = List[1, 2, 3, 4, 5, 6];
|
||||
y = z.copySeries(0, 2, 5);
|
||||
y.postln;
|
||||
)</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-putSeries' href='./../Overviews/Methods.html#putSeries'>putSeries</a>(<span class='argstr'>first</span>, <span class='argstr'>second</span>, <span class='argstr'>last</span>, <span class='argstr'>value</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Put <strong>value</strong> at every index starting at <strong>first</strong>, then every step of the distance between <strong>first</strong> and <strong>second</strong>, up until <strong>last</strong>.<pre class='code prettyprint lang-sc'>(
|
||||
var y, z;
|
||||
z = List[1, 2, 3, 4, 5, 6];
|
||||
y = z.putSeries(0, 2, 5, "foo");
|
||||
y.postln;
|
||||
)</pre>
|
||||
</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>Return a new List whose elements are reversed.<pre class='code prettyprint lang-sc'>(
|
||||
var y, z;
|
||||
z = List[1, 2, 3, 4];
|
||||
y = z.reverse;
|
||||
z.postln;
|
||||
y.postln;
|
||||
)</pre>
|
||||
</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 List whose elements have been scrambled. The receiver is unchanged.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4, 5, 6].scramble.postln;</pre>
|
||||
</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 List which is the receiver made into a palindrome. The receiver is unchanged.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4].mirror.postln;</pre>
|
||||
</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 List 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.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4].mirror1.postln;</pre>
|
||||
</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 List which is the receiver concatenated with a reversal of itself. The center element is duplicated. The receiver is unchanged.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4].mirror2.postln;</pre>
|
||||
</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 List whose elements are repeated <strong>n</strong> times. The receiver is unchanged.<pre class='code prettyprint lang-sc'>List[1, 2, 3].stutter(2).postln;</pre>
|
||||
|
||||
<p>rotate Return a new List whose elements are in rotated order. Negative <strong>n</strong> values rotate left, positive <strong>n</strong> values rotate right. The receiver is unchanged.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4, 5].rotate(1).postln;
|
||||
List[1, 2, 3, 4, 5].rotate(-1).postln;
|
||||
List[1, 2, 3, 4, 5].rotate(3).postln;</pre>
|
||||
</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 List whose elements have been reordered via one of 10 "counting" algorithms. The algorithms are numbered 1 through 10. Run the examples to see the algorithms.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4].pyramid(1).postln;
|
||||
|
||||
(
|
||||
10.do({ arg i;
|
||||
List[1, 2, 3, 4].pyramid(i + 1).postcs;
|
||||
});
|
||||
)</pre>
|
||||
</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 List whose elements are interlaced sequences of the elements of the receiver's subcollections, up to size <strong>length</strong>. The receiver is unchanged.<pre class='code prettyprint lang-sc'>(
|
||||
x = List[ [1, 2, 3], 6, List["foo", 'bar']];
|
||||
y = x.lace(12);
|
||||
x.postln;
|
||||
y.postln;
|
||||
)</pre>
|
||||
</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 List whose elements are the <strong>nthPermutation</strong> of the elements of the receiver. The receiver is unchanged.<pre class='code prettyprint lang-sc'>(
|
||||
x = List[ 1, 2, 3];
|
||||
6.do({|i| x.permute(i).postln;});
|
||||
)</pre>
|
||||
</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 List whose elements are repeated sequences of the receiver, up to size <strong>length</strong>. The receiver is unchanged.<pre class='code prettyprint lang-sc'>(
|
||||
x = List[ 1, 2, 3, "foo", 'bar' ];
|
||||
y = x.wrapExtend(9);
|
||||
x.postln;
|
||||
y.postln;
|
||||
)</pre>
|
||||
</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 <a href="#-wrapExtend">-wrapExtend</a> but the sequences fold back on the list elements.<pre class='code prettyprint lang-sc'>(
|
||||
x = List[ 1, 2, "foo"];
|
||||
y = x.foldExtend(9);
|
||||
x.postln;
|
||||
y.postln;
|
||||
)</pre>
|
||||
</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 List whose elements are repeated subsequences from the receiver. Easier to demonstrate than explain.<pre class='code prettyprint lang-sc'>List[1, 2, 3, 4, 5, 6].slide(3, 1).postcs;
|
||||
List[1, 2, 3, 4, 5, 6].slide(3, 2).postcs;
|
||||
List[1, 2, 3, 4, 5, 6].slide(4, 1).postcs;</pre>
|
||||
</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-dump' href='./../Overviews/Methods.html#dump'>dump</a></h3>
|
||||
<div class='method'>
|
||||
<p>Dump the List's Array.</div><h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-clear' href='./../Overviews/Methods.html#clear'>clear</a></h3>
|
||||
<div class='method'>
|
||||
<p>Replace the List's Array with a new empty one.</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='-asList' href='./../Overviews/Methods.html#asList'>asList</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-copy' href='./../Overviews/Methods.html#copy'>copy</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-doAdjacentPairs' href='./../Overviews/Methods.html#doAdjacentPairs'>doAdjacentPairs</a>(<span class='argstr'>function</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-first' href='./../Overviews/Methods.html#first'>first</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-last' href='./../Overviews/Methods.html#last'>last</a></h3>
|
||||
<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>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-setCollection' href='./../Overviews/Methods.html#setCollection'>setCollection</a>(<span class='argstr'>aColl</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>.</span><a class='method-name' name='-size' href='./../Overviews/Methods.html#size'>size</a></h3>
|
||||
<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='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/List.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/List.schelp</a><br>link::Classes/List::<br></div></div></body></html>
|
128
doc-schelp/Help-3.12.2/Classes/MIDIExplorer.html
Normal file
|
@ -0,0 +1,128 @@
|
|||
<!doctype html><html lang='en'><head><title>MIDIExplorer | SuperCollider 3.11.1 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 = 'MIDIExplorer';
|
||||
var scdoc_sc_version = '3.11.1';
|
||||
</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'>MIDIExplorer:</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='#*postSrcInfo'>postSrcInfo</a> </li>
|
||||
<li class='toc3'><a href='#*start'>start</a> </li>
|
||||
<li class='toc3'><a href='#*postObs'>postObs</a> </li>
|
||||
<li class='toc3'><a href='#*stop'>stop</a> </li>
|
||||
<li class='toc3'><a href='#*deviceName'>deviceName</a> </li>
|
||||
<li class='toc3'><a href='#*instructions'>instructions</a> </li>
|
||||
<li class='toc3'><a href='#*compile'>compile</a> </li>
|
||||
<li class='toc3'><a href='#*openDoc'>openDoc</a> </li>
|
||||
<li class='toc3'><a href='#*compileDesc'>compileDesc</a> </li>
|
||||
<li class='toc3'><a href='#*verbose'>verbose</a> </li>
|
||||
<li class='toc3'><a href='#*trace'>trace</a> </li>
|
||||
<li class='toc3'><a href='#*allMsgTypes'>allMsgTypes</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 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#Libraries'>Libraries</a> > <a href='./../Browse.html#Libraries>Modality'>Modality</a></span>
|
||||
</div><h1>MIDIExplorer<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'>Explore a MIDI device</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/Classes/MIDI/MIDIExplorer.sc' title='/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/Classes/MIDI/MIDIExplorer.sc'>MIDIExplorer.sc</a></div><div id='related'>See also: <a href="./../Overviews/Modality.html">Modality</a>, <a href="./../Classes/MKtl.html">MKtl</a>, <a href="./../Classes/MIDIMKtlDevice.html">MIDIMKtlDevice</a>, <a href="./../Reference/MKtl_description_files.html">MKtl description files</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>The functionality of <a href="./../Classes/MKtl.html">MKtl</a> relies on descriptions of the used devices. For some Controllers, and while many descriptions are already available, your device may not yet be among them. With MIDIExplorer, it is easy to create such a file for a MIDI device. For more info on how to use it, see <a href="./../Tutorials/How_to_create_a_description_file.html">How to create a description file</a>.<textarea class='editor'>MKtl.find(\midi);
|
||||
|
||||
// to pick a specific device you want to explore:
|
||||
MIDIExplorer.postSrcInfo;
|
||||
|
||||
// and enter its uid here
|
||||
MIDIExplorer.start( -476939297 );
|
||||
|
||||
// or to get the uid of e.g. the first connected MIDI device:
|
||||
MIDIClient.sources[0].uid.postln;
|
||||
MIDIExplorer.start(MIDIClient.sources[0].uid);
|
||||
|
||||
// if only a single device is connected, you can also just do
|
||||
MIDIExplorer.start;
|
||||
|
||||
// check we are listening to the intended device only:
|
||||
MIDIExplorer.observedSrcID;
|
||||
MIDIExplorer.deviceName;
|
||||
|
||||
|
||||
// now play with all elements to generate info for the device.
|
||||
// To get info for every incoming control, do:
|
||||
MIDIExplorer.verbose = true;
|
||||
// to post only an overview/count when a new one comes in:
|
||||
MIDIExplorer.verbose = false;
|
||||
|
||||
// if no more new controllers are found, do:
|
||||
MIDIExplorer.openDoc;
|
||||
MIDIExplorer.compile;
|
||||
|
||||
|
||||
|
||||
// and save here:
|
||||
MKtlDesc.openFolder;</textarea>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*postSrcInfo' href='./../Overviews/Methods.html#postSrcInfo'>postSrcInfo</a></h3>
|
||||
<div class='method'>
|
||||
<p>post info on currently available sources, mainly to access uid number.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*start' href='./../Overviews/Methods.html#start'>start</a>(<span class='argstr'>srcID</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>start exploration, i.e. collecting statistics on all incoming MIDI messages.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>srcID<td class='argumentdesc'>
|
||||
<p>an optional source ID - if not nil, only messages from the identified source will be collected.</table></div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*postObs' href='./../Overviews/Methods.html#postObs'>postObs</a>(<span class='argstr'>post: false</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>post info on the current state of observation</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*stop' href='./../Overviews/Methods.html#stop'>stop</a>(<span class='argstr'>srcID</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>stop exploration.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*deviceName' href='./../Overviews/Methods.html#deviceName'>deviceName</a></h3>
|
||||
<div class='method'>
|
||||
<p>find the deviceName for the observed srcID</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*instructions' href='./../Overviews/Methods.html#instructions'>instructions</a></h3>
|
||||
<div class='method'>
|
||||
<p>return instructions string to put on top of desc file.
|
||||
<p>MIDIExplorer.instructions</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*compile' href='./../Overviews/Methods.html#compile'>compile</a></h3>
|
||||
<div class='method'>
|
||||
<p>compile the discovered elements as an evaluable string, which can be saved as a description file, and then read as a description dict.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>(includeSpecs)<td class='argumentdesc'></table><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>a String containing a a dict which works as a description, and contains raw list of elements</div></div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*openDoc' href='./../Overviews/Methods.html#openDoc'>openDoc</a>(<span class='argstr'>name</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>opens a new document containing a description string made with MIDIExplorer.compile.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*compileDesc' href='./../Overviews/Methods.html#compileDesc'>compileDesc</a>(<span class='argstr'>includeSpecs: false</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>compile the elementsDesc from data collected by MIDIExplorer.</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*verbose' href='./../Overviews/Methods.html#verbose'>verbose</a></h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*verbose' href='./../Overviews/Methods.html#verbose'>verbose</a> = value</h3>
|
||||
<div class='method'>
|
||||
<p>get and set flag whether to post info</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*trace' href='./../Overviews/Methods.html#trace'>trace</a>(<span class='argstr'>flag: true</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>set verbose flag, default flag is true</div><h3 class='method-code'><span class='method-prefix'>MIDIExplorer.</span><a class='method-name' name='*allMsgTypes' href='./../Overviews/Methods.html#allMsgTypes'>allMsgTypes</a></h3>
|
||||
<div class='method'>
|
||||
<p>list of midi message types to catch</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/Modality-toolkit/Modality/HelpSource/Classes/MIDIExplorer.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/Modality-toolkit/Modality/HelpSource/Classes/MIDIExplorer.schelp</a><br>link::Classes/MIDIExplorer::<br></div></div><script src='./../editor.js' type='text/javascript'></script>
|
||||
</body></html>
|
195
doc-schelp/Help-3.12.2/Classes/Main.html
Normal file
|
@ -0,0 +1,195 @@
|
|||
<html><head><title>Main</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#Core>Kernel'>Core>Kernel</a></div>
|
||||
<h1>Main</h1>
|
||||
<div id='summary'>The concrete instance of Process</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/DefaultLibrary/Main.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/DefaultLibrary/Main.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/Process.html">Process</a> : <a href="../Classes/Object.html">Object</a></div>
|
||||
<div id='related'>See also: <a href="./../Classes/StartUp.html">StartUp</a></div>
|
||||
</div>
|
||||
<div id='toc'>
|
||||
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#.thisProcess'>thisProcess</a> </li>
|
||||
</ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
|
||||
<ul class='toc'><li class='toc2'><a href='#SuperCollider%20version'>SuperCollider version</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#*version'>version</a> </li>
|
||||
<li class='toc3'><a href='#*versionAtLeast'>versionAtLeast</a> </li>
|
||||
<li class='toc3'><a href='#*versionAtMost'>versionAtMost</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='#*overwriteMsg'>overwriteMsg</a> </li>
|
||||
<li class='toc3'><a href='#*packages'>packages</a> </li>
|
||||
<li class='toc3'><a href='#*scVersionMajor'>scVersionMajor</a> </li>
|
||||
<li class='toc3'><a href='#*scVersionMinor'>scVersionMinor</a> </li>
|
||||
<li class='toc3'><a href='#*scVersionPostfix'>scVersionPostfix</a> </li>
|
||||
</ul></ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
|
||||
<ul class='toc'><li class='toc3'><a href='#-startup'>startup</a> </li>
|
||||
<li class='toc3'><a href='#-shutdown'>shutdown</a> </li>
|
||||
<li class='toc3'><a href='#-run'>run</a> </li>
|
||||
<li class='toc3'><a href='#-addOSCRecvFunc'>addOSCRecvFunc</a> </li>
|
||||
<li class='toc3'><a href='#-removeOSCRecvFunc'>removeOSCRecvFunc</a> </li>
|
||||
<li class='toc3'><a href='#-replaceOSCRecvFunc'>replaceOSCRecvFunc</a> </li>
|
||||
<li class='toc3'><a href='#-openUDPPort'>openUDPPort</a> </li>
|
||||
<li class='toc3'><a href='#-openPorts'>openPorts</a> </li>
|
||||
<li class='toc3'><a href='#-pid'>pid</a> </li>
|
||||
<li class='toc3'><a href='#-recompile'>recompile</a> </li>
|
||||
<li class='toc3'><a href='#-platform'>platform</a> </li>
|
||||
<li class='toc3'><a href='#-argv'>argv</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='#-applicationStart'>applicationStart</a> </li>
|
||||
<li class='toc3'><a href='#-escapeWindow'>escapeWindow</a> </li>
|
||||
<li class='toc3'><a href='#-exitFullScreen'>exitFullScreen</a> </li>
|
||||
<li class='toc3'><a href='#-hardStop'>hardStop</a> </li>
|
||||
<li class='toc3'><a href='#-isSleeping'>isSleeping</a> </li>
|
||||
<li class='toc3'><a href='#-platformClass'>platformClass</a> </li>
|
||||
<li class='toc3'><a href='#-recvOSCmessage'>recvOSCmessage</a> </li>
|
||||
<li class='toc3'><a href='#-showClassBrowser'>showClassBrowser</a> </li>
|
||||
<li class='toc3'><a href='#-showHelp'>showHelp</a> </li>
|
||||
<li class='toc3'><a href='#-showHelpBrowser'>showHelpBrowser</a> </li>
|
||||
<li class='toc3'><a href='#-showHelpSearch'>showHelpSearch</a> </li>
|
||||
<li class='toc3'><a href='#-sleep'>sleep</a> </li>
|
||||
<li class='toc3'><a href='#-stop'>stop</a> </li>
|
||||
<li class='toc3'><a href='#-wake'>wake</a> </li>
|
||||
</ul></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Main is the concrete instance of <a href="./../Classes/Process.html">Process</a> (the runtime environment for the virtual machine and interpreter). Main overrides some methods of Process. There are two methods of interest. One is named startup and is called after the class library has been compiled. The other is called shutdown which gets called when the library gets re-compiled.<h3 class='imethodname'><span class='methprefix'> </span><a name='.thisProcess' href='./../Overviews/Methods.html#thisProcess'>thisProcess</a> </h3>
|
||||
<div class='method'>
|
||||
<p>The singleton instance of Main is available through the special keyword thisProcess. For example, to find out what platform you're on:<pre class='code prettyprint lang-sc'>thisProcess.platform; // --> e.g. "an OSXPlatform", "a LinuxPlatform", ...</pre>
|
||||
</div><h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3><a class='anchor' name='SuperCollider%20version'>SuperCollider version</a></h3>
|
||||
|
||||
<p>These class methods tell you which version of SuperCollider you are running and whether that version complies to your required minimum / maximum settings:<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*version' href='./../Overviews/Methods.html#version'>version</a> </h3>
|
||||
<div class='method'>
|
||||
<p><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>the current version as a human readable string</div></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*versionAtLeast' href='./../Overviews/Methods.html#versionAtLeast'>versionAtLeast</a> (<span class='argstr'>maj</span>, <span class='argstr'>min</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>check if we are running at least version maj.min<pre class='code prettyprint lang-sc'>Main.versionAtLeast( 3, 1 );</pre>
|
||||
|
||||
<p><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>true or false</div></div><h3 class='cmethodname'><span class='methprefix'>*</span><a name='*versionAtMost' href='./../Overviews/Methods.html#versionAtMost'>versionAtMost</a> (<span class='argstr'>maj</span>, <span class='argstr'>min</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>check if we are running version maj.min or older<pre class='code prettyprint lang-sc'>Main.versionAtMost( 3, 1 );</pre>
|
||||
|
||||
<p><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>true or false</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='cmethodname'><span class='methprefix'>*</span><a name='*overwriteMsg' href='./../Overviews/Methods.html#overwriteMsg'>overwriteMsg</a> </h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*packages' href='./../Overviews/Methods.html#packages'>packages</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Quarks/packages.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Quarks/packages.sc</a></div>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*scVersionMajor' href='./../Overviews/Methods.html#scVersionMajor'>scVersionMajor</a> </h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*scVersionMinor' href='./../Overviews/Methods.html#scVersionMinor'>scVersionMinor</a> </h3>
|
||||
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*scVersionPostfix' href='./../Overviews/Methods.html#scVersionPostfix'>scVersionPostfix</a> </h3>
|
||||
<h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-startup' href='./../Overviews/Methods.html#startup'>startup</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Called after the class library has been compiled.<h4>Discussion:</h4>
|
||||
|
||||
<p>This calls the superclass' startup, which among other things initializes the <a href="./../Classes/AppClock.html">AppClock</a> and the top-level <a href="./../Classes/Environment.html">Environment</a>.
|
||||
<p>Main's startup then stores Server.default in the interpreter variable s, sets the platform default's <a href="./../Classes/GUI.html">GUI</a> kit, calls a <a href="./../Classes/Platform.html">Platform</a> specific startup method (for example OSXPlatform's startup opens the server windows), and finally invokes StartUp.run.
|
||||
<p>To add your own startup functionalities, you could either edit the special startup-file (discussed in <a href="./../Reference/StartupFile.html">Sclang Startup File</a>), or use StartUp.add as discussed in the <a href="./../Classes/StartUp.html">StartUp</a> help file.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-shutdown' href='./../Overviews/Methods.html#shutdown'>shutdown</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Called after SuperCollider is quit or the class library is about to be re-compiled.<h4>Discussion:</h4>
|
||||
|
||||
<p>This will quit all audio <a href="./../Classes/Server.html">Server</a> instances, perform a platform specific shutdown (e.g. the HID subsystem is released), finally Process' shutdown method is called, resulting in successive calls to UI.shutdown, NetAddr.disconnectAll, File.closeAll, and Archive.write. To register your own shutdown code, use a call like this:<pre class='code prettyprint lang-sc'>ShutDown.add({ "Good bye!!".postln });</pre>
|
||||
</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-run' href='./../Overviews/Methods.html#run'>run</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Override this to do whatever you want, e. g. add a class extension file like this to the class library:<pre class='code prettyprint lang-sc'>+ Main {
|
||||
run { "myPatch.rtf".load }
|
||||
}</pre>
|
||||
<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>(newFunc)<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Function.html">Function</a> or similar object to be set. When evaluated, this function will be passed the arguments time, replyAddr, and message, corresponding to the time the message was sent, the <a href="./../Classes/NetAddr.html">NetAddr</a> of the sender, and the message itself as an <a href="./../Classes/Array.html">Array</a>.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-addOSCRecvFunc' href='./../Overviews/Methods.html#addOSCRecvFunc'>addOSCRecvFunc</a> (<span class='argstr'>func</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Register a <a href="./../Classes/Function.html">Function</a> to be evaluated whenever SuperCollider language (the client) receives an OSC message. This will not overwrite any previously registered functions.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Function.html">Function</a> or similar object to be added. When evaluated, this function will be passed the arguments msg, time, replyAddr, and recvPort, corresponding to the message itself as an <a href="./../Classes/Array.html">Array</a>, the time the message was sent, the <a href="./../Classes/NetAddr.html">NetAddr</a> of the sender, and the port on which the message was received. Note that this order differs from that used by the deprecated method <a href="#-recvOSCfunc">-recvOSCfunc</a>.<pre class='code prettyprint lang-sc'>// post all incoming traffic except the server status messages
|
||||
// basically the same as OSCFunc.trace
|
||||
(
|
||||
f = { |msg, time, replyAddr, recvPort|
|
||||
if(msg[0] != '/status.reply') {
|
||||
"At time %s received message % from % on port%\n".postf( time, msg, replyAddr, recvPort )
|
||||
}
|
||||
};
|
||||
thisProcess.addOSCRecvFunc(f);
|
||||
);
|
||||
|
||||
// stop posting.
|
||||
thisProcess.removeOSCRecvFunc(f);</pre>
|
||||
</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-removeOSCRecvFunc' href='./../Overviews/Methods.html#removeOSCRecvFunc'>removeOSCRecvFunc</a> (<span class='argstr'>func</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Remove a <a href="./../Classes/Function.html">Function</a> from the list of those evaluated whenever SuperCollider language (the client) receives an OSC message. This will leave any other registered functions in place.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Function.html">Function</a> or similar object to be removed.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-replaceOSCRecvFunc' href='./../Overviews/Methods.html#replaceOSCRecvFunc'>replaceOSCRecvFunc</a> (<span class='argstr'>func</span>, <span class='argstr'>newFunc</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Replace a <a href="./../Classes/Function.html">Function</a> in the list of those evaluated whenever SuperCollider language (the client) receives an OSC message with a different one. This will leave any other registered functions in place.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>func<td class='argumentdesc'>
|
||||
<p>The <a href="./../Classes/Function.html">Function</a> or similar object to be replaced.<tr><td class='argumentname'>newFunc<td class='argumentdesc'>
|
||||
<p>A <a href="./../Classes/Function.html">Function</a> or similar object to be replace the one being removed. When evaluated, this function will be passed the arguments time, replyAddr, recvPort, and message, corresponding to the time the message was sent, the <a href="./../Classes/NetAddr.html">NetAddr</a> of the sender, the port on which the message was received, and the message itself as an <a href="./../Classes/Array.html">Array</a>.</table></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-openUDPPort' href='./../Overviews/Methods.html#openUDPPort'>openUDPPort</a> (<span class='argstr'>portNum</span>)</h3>
|
||||
<div class='method'>
|
||||
<p>Attempt to open a new UDP port for receiving OSC traffic. If another application has already bound to the requested port this will fail. Once opened, ports remain bound until SC is recompiled.
|
||||
<p>If the port was already opened by SC it will return true directly without trying to open the port again.<h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>portNum<td class='argumentdesc'>
|
||||
<p>An <a href="./../Classes/Integer.html">Integer</a> indicating the port to attempt to bind.</table><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>A <a href="./../Classes/Boolean.html">Boolean</a> indicating whether the attempt was successful.<pre class='code prettyprint lang-sc'>thisProcess.openUDPPort(3000); // will return true or false.
|
||||
thisProcess.openPorts; // returns all open ports</pre>
|
||||
</div></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-openPorts' href='./../Overviews/Methods.html#openPorts'>openPorts</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Get a collection of all active UDP ports, including the main sclang port <code class='code prettyprint lang-sc'>NetAddr.langPort</code>.<h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>A <a href="./../Classes/Set.html">Set</a>.</div></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-pid' href='./../Overviews/Methods.html#pid'>pid</a> </h3>
|
||||
<div class='method'>
|
||||
<p><h4>Returns:</h4>
|
||||
<div class='returnvalue'>
|
||||
<p>The operating system's pid (process ID) for the process.</div></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-recompile' href='./../Overviews/Methods.html#recompile'>recompile</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Recompiles the class library. This is equivalent to restarting SC. Currently OSX (SuperCollider.app) only.</div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-platform' href='./../Overviews/Methods.html#platform'>platform</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Get the current <a href="./../Classes/Platform.html">Platform</a></div><h3 class='imethodname'><span class='methprefix'>-</span><a name='-argv' href='./../Overviews/Methods.html#argv'>argv</a> </h3>
|
||||
<div class='method'>
|
||||
<p>Get the command-line arguments passed to sclang.</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='-applicationStart' href='./../Overviews/Methods.html#applicationStart'>applicationStart</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-escapeWindow' href='./../Overviews/Methods.html#escapeWindow'>escapeWindow</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-exitFullScreen' href='./../Overviews/Methods.html#exitFullScreen'>exitFullScreen</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-hardStop' href='./../Overviews/Methods.html#hardStop'>hardStop</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-isSleeping' href='./../Overviews/Methods.html#isSleeping'>isSleeping</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-platformClass' href='./../Overviews/Methods.html#platformClass'>platformClass</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-recvOSCmessage' href='./../Overviews/Methods.html#recvOSCmessage'>recvOSCmessage</a> (<span class='argstr'>time</span>, <span class='argstr'>replyAddr</span>, <span class='argstr'>recvPort</span>, <span class='argstr'>msg</span>)</h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-showClassBrowser' href='./../Overviews/Methods.html#showClassBrowser'>showClassBrowser</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-showHelp' href='./../Overviews/Methods.html#showHelp'>showHelp</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-showHelpBrowser' href='./../Overviews/Methods.html#showHelpBrowser'>showHelpBrowser</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-showHelpSearch' href='./../Overviews/Methods.html#showHelpSearch'>showHelpSearch</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-sleep' href='./../Overviews/Methods.html#sleep'>sleep</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc</a></div>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-stop' href='./../Overviews/Methods.html#stop'>stop</a> </h3>
|
||||
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-wake' href='./../Overviews/Methods.html#wake'>wake</a> </h3>
|
||||
<div class='extmethod'>From extension in <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Platform/osx/extMain.sc</a></div>
|
||||
<div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Main.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/Main.schelp</a><br>link::Classes/Main::<br>sc version: 3.8.0</div></div></body></html>
|
75
doc-schelp/Help-3.12.2/Classes/ModDif.html
Normal file
|
@ -0,0 +1,75 @@
|
|||
<!doctype html><html lang='en'><head><title>ModDif | 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 = 'ModDif';
|
||||
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'>ModDif:</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> <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></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> > <a href='./../Browse.html#UGens>Maths'>Maths</a></span>
|
||||
</div><h1>ModDif<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'>Minimum difference of two values in modulo arithmetics</div>
|
||||
</div>
|
||||
<div class='subheader'>
|
||||
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc' title='/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc'>Trig.sc</a></div><div id='related'>See also: <a href="./../Classes/Clip.html">Clip</a>, <a href="./../Classes/Wrap.html">Wrap</a></div>
|
||||
</div>
|
||||
<h2><a class='anchor' name='description'>Description</a></h2>
|
||||
|
||||
<p>Returns the minimum difference of two values in modulo arithmetics. On a circle, there are two distances between two points. This UGen returns the smaller value of the two.<pre class='code prettyprint lang-sc'>{ var a = Line.ar(0, 4, 0.01), d = ModDif.ar(a); [a, d] }.plot;
|
||||
{ var a = Line.ar(0, 4, 0.01); ModDif.ar(a, 0, (1..4)) }.plot;
|
||||
{ var a = Line.ar(0, 4, 0.01); ModDif.ar(a, (0, 0.25 .. 1), 1) }.plot;</pre>
|
||||
<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
|
||||
<h3 class='method-code'><span class='method-prefix'>ModDif.</span><a class='method-name' name='*ar' href='./../Overviews/Methods.html#ar'>ar</a>(<span class='argstr'>x: 0</span>, <span class='argstr'>y: 0</span>, <span class='argstr'>mod: 1</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>ModDif.</span><a class='method-name' name='*kr' href='./../Overviews/Methods.html#kr'>kr</a>(<span class='argstr'>x: 0</span>, <span class='argstr'>y: 0</span>, <span class='argstr'>mod: 1</span>)</h3>
|
||||
<h3 class='method-code'><span class='method-prefix'>ModDif.</span><a class='method-name' name='*ir' href='./../Overviews/Methods.html#ir'>ir</a>(<span class='argstr'>x: 0</span>, <span class='argstr'>y: 0</span>, <span class='argstr'>mod: 1</span>)</h3>
|
||||
<div class='method'>
|
||||
<p><h4>Arguments:</h4>
|
||||
<table class='arguments'>
|
||||
<tr><td class='argumentname'>x<td class='argumentdesc'>
|
||||
<p>First input value<tr><td class='argumentname'>y<td class='argumentdesc'>
|
||||
<p>Second input value<tr><td class='argumentname'>mod<td class='argumentdesc'>
|
||||
<p>Modulo (maximum value, double of the maximal difference).<pre class='code prettyprint lang-sc'>// different moduli
|
||||
(
|
||||
{
|
||||
var sig = LFSaw.ar(10);
|
||||
var dist = ModDif.kr(sig, 0, (0..8) * MouseX.kr(0, 1/5));
|
||||
Splay.ar(SinOsc.ar(dist * 4000 + 400)) * 0.1
|
||||
}.play;
|
||||
)
|
||||
|
||||
// wrapping amplitude crossfade
|
||||
(
|
||||
{
|
||||
var numChan = 12;
|
||||
var x = SinOsc.ar({ rrand(300.0, 800.0) } ! numChan);
|
||||
var dist = ModDif.kr(MouseX.kr(0, numChan * 2), (0..numChan-1), numChan);
|
||||
x = x * max(0, 1 - dist);
|
||||
Splay.ar(x) * 0.1
|
||||
}.play;
|
||||
)</pre>
|
||||
</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:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/ModDif.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/ModDif.schelp</a><br>link::Classes/ModDif::<br></div></div></body></html>
|