-
>> pl 1 drums1 == radpost == ~buffer0 = Buffer.read(s, "<RadiclesFiles>/SoundFiles/Play/0/drums1.wav", bufnum: 0); Ndef('block1', {arg rate=1 , trigger=1 , startPos=0 , mul=1 ; PlayBuf.ar(~buffer0.numChannels, ~buffer0, rate, trigger, start ...
-
... .kr(1)); var pos= \pos.kr({1.0.rand}!this.numChannels)%1*BufFrames.ir(buf); var loop= \loop.kr(1); var rand= Impulse.kr(1/BufDur.ir(buf)*rate*LFNoise1.kr(0.1, 0.2, 0.6), 0, 1-loop); ( PlayBuf.ar(1, buf, rate*BufRateScale.ir(buf), \trig.tr+r ...
-
... X // example s.boot; ( a = GetMouseX (20, 40); b = GetMouseY (300, 400); fork { loop { 0.1.wait; [a.value, b.value].postln } } )
-
... , 20, -0.25); //dim,grav,maxvel,damp //--system sys= RedParticleSystem.new; //--loop w.draw{ world.gravity= RedVector2D.newFrom(w.mouse/([width, height])-0.5); //--add new particles and update old sys.add(RedParticle(world, w.mouse+5.rand2, ...
-
... dth, 20].rand, 0, 0, mass, mass*5); //world,loc,vel,acc,mass,size }.dup(n); //--loop w.draw{ world.objects.do{|o| o.addForce(world.gravity); o.update; world.contain(o); //--render Pen.strokeColor= Color.grey(o.mass/4); Pen.strokeRect(Rect.a ...
-
... width*scale, height*scale)).front; widthCartPlane= 16; heightCartPlane= 16; //--loop w.draw{ cnt= cnt+0.05%(width*scale); dx= widthCartPlane/(width*scale); dy= heightCartPlane/(height*scale); x= widthCartPlane.neg/2; (width*scale).do{|i| y= ...
-
... ld, RedVector2D[130, 30], RedVector2D[1.5, 1], RedVector2D[0, 0], 1.5, 10); //--loop w.draw{ rep.loc= w.mouse; obj.addForce(obj.gravityForce(rep).neg); obj.update; world.contain(obj); //--render Pen.strokeColor= Color.green; Pen.strokeRect( ...
-
... Stream, state; parse { msg = Array[]; msgArgStream = CollStream(); state = nil; loop { this.parseByte(port.read) }; } finishArg { var msgArg = msgArgStream.contents; msgArgStream.reset; if (msgArg.notEmpty) { if (msgArg.first.isDecDigit) { ...
-
... le CPU cores. 50.do({ reverb <<+ AlgaNode(\sines); }); //Print CPU usage fork { loop { ("CPU: " ++ s.avgCPU.asStringPrec(4) ++ " %").postln; 1.wait; } } } ) //Boot Alga with the supernova server //Alga will automatically spread the load acr ...
-
... ght*0.4, width, 40); //area with viscosity vv= -0.13; //amount of viscosity //--loop w.draw{ if(visc.containsPoint(obj.loc.asPoint), { obj.addForce(obj.viscosityForce(vv)); }); obj.update; world.contain(obj); //--render Pen.fillColor= Color ...