-
... p.position.y.clip(0, height), 0); }; win.front; CmdPeriod.doOnce({win.close}); Routine({ var nextTime; while({win.isClosed.not}, { nextTime= Main.elapsedTime+(1/60); usr.refresh; (nextTime-Main.elapsedTime).max(0.001).wait; }); }).play(App ...
-
... 3; (1..n).do { |num| { num.rand }.dup(200).postcs }; ) // in streams, tasks and routines, this works just as well: ( fork { var n = 14; (1..n).do { |num| { num.rand }.dup(200).postcs; 1.wait; }; } ) ( fork { var str = Routine { |in| 10.do { ...
-
... ar <sceneWidth, <sceneHeight, <cellSize; var <entManager, <repManager; var <mainRoutine; var <edgeWalls, <edgeWallsActive = false; *new{ arg sceneWidth = 40, sceneHeight = 40, cellSize = 1; if(instance.isNil, { ^super.newCopyArgs(sceneWidth ...
-
... time... ( var b,buf, clock; clock= ExternalClock(TempoClock(2.1)); clock.play; Routine.run({ b=BBCutBuffer(Platform.resourceDir +/+ "sounds/break.aiff",8); buf= BBCutBuffer.alloc(s,44100*4,1); //allow 4 seconds worth of buffer space, ie up ...
-
... , 1); x.put(x.size.rand, 8+0.1.rand2); Pseq(x, 1); }); x = Pn(a, inf).asStream; Routine({ loop({ Synth(\help_sinegrain, [\freq, (x.next*5+70).midicps]); 0.13.wait; }) }).play; ) // using event streams ( a = Plazy({ var x, y; x = Array.serie ...
-
... odul.outPlusOne; toModul.inPlusOne; if(nodeSynths[[hor,ver].asString] == nil, { Routine({ nodeSynths.put( [ver,hor].asString, Dictionary.newFrom(List[ \synth, Synth( \SGME_patchNode, [ \fromBus, fromBus, \toBus, toBus, \ganancy, ganancy ], ...
-
... { rrand(3, 5) }, Pseq([1, 2, 3, 4, 5, 6], inf) * 4 + 65), inf); b = c.asStream; Routine({ loop({ Synth(\help_sinegrain, [\freq, b.next.midicps]); 0.12.wait; }) }).play; ) // or, more concisely: p = Pbind( \instrument, \help_sinegrain, \midi ...
-
... mod(size).linlin(0,4,-1,1), amp/(size.squared * 2) ) }).play }); ~task = Routine( { var t = 0; var sz = 0; loop { t = t + 45; sz = sz + ((t/250).sin.abs * 5); ~sliders.do({ |i,n| i.background = 0.5.coin.if({ Color.rand }, { ...
-
... chucking demo" ).front; // voicerproxies -- creating this gui is time sensitive Routine ({ 6.do({ |i| VoicerProxy .new => VP .prNew(i); 3.do({ VP (i).v.addControlProxy( nil , true ) }); VP (i).v.gui(~voicerFlow); 0.2.wait; ~voicerFlow.recur ...
-
... chucking demo" ).front; // voicerproxies -- creating this gui is time sensitive Routine ({ 6.do({ |i| VoicerProxy .new => VP .prNew(i); 3.do({ VP (i).v.addControlProxy( nil , true ) }); VP (i).v.gui(~voicerFlow); 0.2.wait; ~voicerFlow.recur ...