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

168 lines
No EOL
9 KiB
HTML

<html><head><title>WarpCutProc1</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>WarpCutProc1</h1>
<div id='summary'>Oscillator-rate breakbeat cutting</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/bbcutprocs/WarpCutProc.sc'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/classes/bbcutprocs/WarpCutProc.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='#-initWarpCutProc1'>initWarpCutProc1</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>Cutups in the style of Aphex Twin/ Bogdan Raczynski/ u-ziq etc, that is, sometimes so fast that a pitch is heard. With this procedure you must specifiy the sizes of allowed blocks. Each block then has some probability to be a simple statement, or some type of roll (fast set of repetitions), either even or geometric series timed.
<p>For additional data on the algorithm see
<p>Nick Collins, "further automatic BreakBeat cutting methods",
<p>Proceedings of Generative Art 2001
<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'>blocksizefunc</span>, <span class='argstr'>rollfunc</span>, <span class='argstr'>probs</span>, <span class='argstr'>phraselength: 12</span>, <span class='argstr'>accel: 0.9</span>, <span class='argstr'>bpsd: 0.5</span>)</h3>
<div class='method'>
<p>Create a WarpCutProc1 object with the given parameters.<h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>blocksizefunc<td class='argumentdesc'>
<p>A function (or something else responding to value) returning the next block size. The function will be passed the number of beatsleft in the current phrase, and the current phrase length in case judgement is to depend on position within a phrase.<tr><td class='argumentname'>rollfunc<td class='argumentdesc'>
<p>A function returning the number of cuts to subdivide a block in a roll. This function is passed the current blocklength as argument in case you want a decision to take account of how much space you divide.<tr><td class='argumentname'>probs<td class='argumentdesc'>
<p>An array of three probabilities (0.0 to 1.0). They are [prob of simple statement, prob of even roll, prob of accelerando rather than decelerando geometric series]. The algorithm cascades through one prob at a time. If a block is not simple, then it is a roll. If it isn't an even roll it is a geometric roll. <tr><td class='argumentname'>phraselength<td class='argumentdesc'>
<p>Next length of phrase in beats.<tr><td class='argumentname'>accel<td class='argumentdesc'>
<p>a parameter to control the acceleration rate of the geometric series. Good values are 0.5 to 0.99. Do not pass 0.0 or 1.0 without expecting a crash.<tr><td class='argumentname'>bpsd<td class='argumentdesc'>
<p>beats per sub division. Sets a primitive cut size resolution for choose offset messages. </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='-initWarpCutProc1' href='./../Overviews/Methods.html#initWarpCutProc1'>initWarpCutProc1</a> (<span class='argstr'>bsf</span>, <span class='argstr'>rf</span>, <span class='argstr'>p</span>, <span class='argstr'>acc: 0.9</span>)</h3>
<div class='method'>
<p>Called internally after a new.
<p>Other methods are overrides of BBCutProc base class behaviour. WarpCutProc1 will flag rolls for synthesis.</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 perhaps, but the Warp cutter creates such bizarre effects that it's fun on any source. <pre class='code prettyprint lang-sc'>( //defaults
var sf;
Routine.run({
sf= BBCutBuffer("sounds/a11wlk01.wav",4);
s.sync;
//144 bpm
BBCut2(CutBuf1(sf),WarpCutProc1.new).play(2.4);
});
)
( //oddness on AudioIn
BBCut2(CutStream1.new,WarpCutProc1({[1,2,4].wchoose([0.7,0.2,0.1])},{[9,19,29].choose},[0.0,0.5,0.5],100.0,{0.8+(0.15.rand)})).play(2.2);
)
//roll through a sound with UI control
(
var w;
var slider, num, data;
var sf, bbcutter, clock;
data= //control spec data for ui controls
[
["tempo",2,3,\lin,0.1,2.5],
["blocklength", 0, 2,\lin,1,1],
["roll", 0, 6,\lin,1,0],
["simpleprob", 0.0, 1.0,\lin,0.1,0.5],
["evenprob", 0.0, 1.0,\lin,0.1,0.5],
["accelprob", 0.0, 1.0,\lin,0.1,0.5],
["phraselength", 1.0, 5.0,\lin,1.0,2.0],
["accelparam", 0.5, 0.99,\lin,0.01,0.9],
["restchance", 0.0, 1.0,\lin,0.1,0.0],
["ampvariation", 0.0, 1.0,\lin,0.01,1.0],
["panvariation", 0.0, 1.0,\lin,0.01,0.0],
["randomoffset", 0.0, 1.0,\lin,0.01,0.0]
];
w = SCWindow("WarpCutProc1 demo N.M.Collins 23/08/03", Rect.new(100, 500, 500, (30*(data.size))));
slider= Array.fill(data.size, {arg i; DDSlider.performList(\new,[w, Rect(5,30*i, 300, 30)]++ data.at(i))});
slider.at(1).slider.action_({arg sl;
var val; val = slider.at(1).spec.map(sl.value);
val= [1,3,5].at(val.round(1.0).asInteger);
slider.at(1).string.string_(val);
slider.at(1).lastval=val;
});
slider.at(1).lastval= 3;
slider.at(2).string.string_(3);
slider.at(2).slider.action_({arg sl;
var val; val = slider.at(2).spec.map(sl.value);
val= [3,5,7,11,13,17,19].at(val.round(1.0).asInteger);
slider.at(2).string.string_(val);
slider.at(2).lastval=val;
});
slider.at(2).lastval= 3;
slider.at(2).string.string_(3);
w.front;
Routine.run({
sf= BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8);
s.sync;
bbcutter= BBCut2([
CutBuf1(sf,
slider.at(11) //randomoffsetchance
),
CutMixer(0,1.0,{
if(slider.at(8).value.coin, //restchance
{0},
{
rrand(slider.at(9).value,1.0)} //amp variation
)},
{rrand(-1.0*(slider.at(10).value),slider.at(10).value)} //panvariation
)
],
WarpCutProc1(
slider.at(1), //block
slider.at(2), //rollcut
[slider.at(3),slider.at(4),slider.at(5)], //probs
slider.at(6), //phraselength
slider.at(7) //accelparam
)
);
clock=ExternalClock(slider.at(0).lastval).play;
bbcutter.play(clock);
//update tempo ten times a second
SystemClock.sched(0.0,{clock.tempoclock.tempo_(slider.at(0).lastval); 0.1});
});
)</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/WarpCutProc1.schelp'>/Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/BBCut/HelpSource/Classes/WarpCutProc1.schelp</a><br>link::Classes/WarpCutProc1::<br>sc version: 3.8.0</div></div></body></html>