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

182 lines
16 KiB
HTML
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
<!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>