-
... th, height], wgrav, 30, 0.8); //dim,grav,maxvel,damp //--objects { var mass= 2.rrand(5); RedObject(world, RedVector2D[width.rand, height.rand], RedVector2D[0, 0], RedVector2D[0, 0], mass, mass*2); }.dup(n); sprs= world.objects.collect{|obj, ...
-
... w is something like this: // Find/make a dataset of points: x = 15.collect{[1.0.rand, 1.0.rand]}; // Append the index onto the end, for later reference x = x.collect{|data, i| data ++ i }; // Use the KDTree quark and the .makeBufferData met ...
-
... rue ); // set a value: m.elAt( \led ).value_( 0.6 ); m.elAt( \led ).value_( 1.0.rand ); // set and send in original value range of the device: m.elAt( \led ).deviceValue_( 256.rand.postln ); // cleanup: m.free; ⧉ ✔ Collective input Some OSC ...
-
... s b = [ // array of possible impulse excitation behaviours { Impulse.ar(2 + 0.2.rand, 0.3) }, // slow phasing { Dust.ar(0.5, 0.3) }, // "wind chimes" { Impulse.ar(SinOsc.kr(0.05+0.1.rand, 2pi.rand, 5, 5.2), 0.3) } // races ].choose; // choo ...
-
... 0, 0], 1), { |pat, i| var list; list = pat.list; pat.list = list.put(list.size.rand, 2); }, inf); x = a.asStream; 30.do({ x.next.postln }); ) // Ppatmod used to modify a pattern that produces a sequence of pitches: ( SynthDef(\help_sinegra ...
-
... //number of children s.waitForBoot{ var parent0, parent1; g= RedGAGenome([ 0.9.rrand(1), 0, 0, 1, [0.679.rrand(0.74), 0.99, 1, 0.679].wchoose([0.7, 0.1, 0.1, 0.1]), 0.1.linrand, 0.5.rand ]++{1.0.rand}.dup(6.rrand(20))); g.chromosome.postln; ...
-
... (VLayout( *( 100.collect { Slider().orientation_(\horizontal).background_(Color.rand) } ) )); view.front; ) // combining HLayout and VLayout ( w = Window().front; a = { { Button(w) } ! 10 } ! 10; w.layout = HLayout(*a.collect { |x| VLayout( ...
-
... t_(HLayout( *( 100.collect { Slider().orientation_(\vertical).background_(Color.rand) } ) )); view.front; ) // combining HLayout and VLayout ( w = Window().front; a = { { Button(w) } ! 10 } ! 10; w.layout = HLayout(*a.collect { |x| VLayout( ...
-
... "); b = Button(w, Rect(90, 20, 200, 30)) .states_([ ["sine", Color.black, Color.rand], ["saw", Color.black, Color.rand], ["noise", Color.black, Color.rand], ["pulse", Color.black, Color.rand] ]) .action_({ |butt| butt.value.postln; }); w.fr ...
-
... 2D[0, 0], RedVector2D[0, 0], 1.5, 10); obj2= RedObject(world, RedVector2D[width.rand, height.rand], RedVector2D[0, 0], RedVector2D[0, 0], 2, 10); trg= RedObject(world, RedVector2D[width*0.5, height*0.5], RedVector2D[0, 0], RedVector2D[0, 0] ...