-
... ed class methods Instance Methods Inherited instance methods Examples ( // Dust randomly triggers Decay to create an exponential // decay envelope for the WhiteNoise input source { z = Decay.ar(Dust.ar(1, 0.5), 0.3, WhiteNoise.ar); DelayC.a ...
-
... .ar(z, pan)); }).add; s.sync; //--objects { var loc= RedVector2D[width, height].rand; //initial xy location var mass= 1.rrand(10); RedAgent(world, loc, RedVector2D[0.001, 0.001].rand2, nil, mass, mass) //world,loc,vel,acc,mass,size .maxForc ...
-
... RedVector2D[px+15, py+15]; var obj= RedAgent(world, loc, RedVector2D[0.5, 0.5].rand2, nil, 1, 10); //world,loc,vel,acc,mass,size obj.state= (\cell: 2.rand, \neighbours: 0); px= px+(obj.size*2-1); if(px>(width*0.9), { px= 0; py= py+(obj.siz ...
-
... Part= RedParticle(world, RedVector2D[width*0.5, height*0.9], 0, RedVector2D[0.5.rand2, -5.0.rrand(-10)], 1, 3.0.rand).age_(1000); sys.add(newPart); //add it to the system Synth(\noise, [ //create a corresponding synth \freq, newPart.size.li ...
-
... r .alloc(s, 2048); b.zero; c.zero; d.zero; ) ( 50.do({ |it| c.set(20*it+10, 1.0.rand); }); 3.do({ |it| b.set(400*it+100, 1); }); 20.do({ |it| d.set(40*it+20, 1); }); ) ( SynthDef ( \conv_test , { arg kernel, t_trig = 0; var input; input = I ...
-
... lean logical And boolean || boolean logical Or When a function is the second operand, these operators perform short-circuiting (i.e., the function is executed only when its result would influence the result of the operation). This is recomm ...
-
... register = IdentityDictionary.new, asuuid = { arg uuid; (uuid ?? {9999999999999.rand}).asSymbol; }, get = { arg uuid; var p = register[uuid.asSymbol]; if(p.isNil, { Error("Player not in registery:" + uuid.asCompileString).throw; }); p }, se ...
-
... ng index (default: 0) clear set the buffer slot to zero. This is important when randomly acessing buffer slots (e.g. with a BufRd) or not overwriting them. Clear is not an efficient real time operation for larger buffers, so it should be on ...
-
... d.new; //dim,grav,maxvel,damp //--objects { var loc= RedVector2D[width, height].rand; var vel= RedVector2D[0.5, 0.5].rand2; var mass= 1; RedBoid(~world, loc, vel, 0, mass, mass*5) //world,loc,vel,acc,mass,size .maxForce_(0.6.rrand(1.6)); }. ...
-
... 'tdefNdef').end; // end sound and tdef // set params by hand: // note center of random range: Ndef('tdefNdef').set(\note, 24.rand2); // amount of random deviation Ndef('tdefNdef').set(\notedev, 24.rand); Ndef('tdefNdef').set(\pan, 1.0); Nde ...