-
//k-means clustering2 //points in space moving around at random - kmeans find central point and draw a blob ( var width= 640, height= 480, w, wgrav, world, n= 100, kmeans; //--world w= RedWindow("k-means2", Rect(128, 64, width, height)).fro ...
-
... (); q.local = currentEnvironment; q.local.pattern = Pbind(\note, Pbrown(0, { 17.rand + 1 } ! 12), \dur, 0.05, \amp, 0.01); //-- PLAY q.local.player = q.local.pattern.play; //-- STOP q.local.player.stop; //-- FREE q.local = nil;
-
/* make a little Rand button that auto-moves a controller. ( w = Window("autorand").front; w.addFlowLayout; e = EZSlider(w, 300@20, \freq, \freq); AutoRand(e, e.controlSpec, 0.2).makeButton(w, Rect(0,0,20,20)); f = EZSlider(w, 300@20, \freq ...
-
... = 0.3| var env, sound; sound = SinOsc.ar(freq, 0.5pi); env = EnvGen.ar(Env.perc(Rand(0.01, 0.02), sustain * Rand(1, 1.5))); Out.ar(out, DirtPan.ar(env * sound, ~dirt.numChannels, pan, amp) ) }).add; ); d1 $ slow 2 $ sound "testnote*16" # n ...
-
... new particle and update the old ones var newPart= RedParticle(world, w.mouse+5.rand2, 0, RedVector2D[2.rand2, -10.rand], 1.5, 5.rand).age_(40.rrand(50)); sys.add(newPart); //add it to the system synths.put(newPart.hash, Synth(\sine)); //cr ...
-
... * ( t = Steno.new; VarDiff.new.install(t); t.diff.diff1; t.quelle(\a, { Blip.ar(Rand(4, 16)) * 0.2 }); t.quelle(\b, { Saw.ar(Rand(400, 700)) * 0.2 }); t.filter(\f, { |input| CombL.ar(input, 0.2, Rand(0.01, 0.02), Rand(0.4, 2) ) }); t.diff.d ...
-
ArrayGeneratorDef( \random, { |f, n = 1| var range; range = f.get( \range ); thisThread.randSeed = f.get( \seed ); n.collect({ |i| range[0] rrand: range[1] }); }, [ \range, [0.0,1.0], \seed, 12345 ], { |f, obj| [ \range, if( obj.minItem == ...
-
PRand UGenPatterns quark library superclass: Pattern based on Rand PRand(lo, hi, length) lo (default: 0) hi (default: 1) length number of values produced (default: inf) // example s.boot; a= Pbind ( \dur , 1/3, \legato , 0.4, \midinote , PR ...
-
ArrayGeneratorDef( \linrand, { |f, n = 1| var range; range = f.get( \range ); thisThread.randSeed = f.get( \seed ); n.collect({ |i| 1.0.linrand.linlin(0,1,*range); }); }, [ \range, [0.0,1.0], \seed, 12345 ], { |f, obj| [ \range, if( obj.min ...
-
... rrent < lonext } { current = current.fold(lonext,hinext); direction = 1; }; }, \rand, { arr = (lo.next..(hi.next)); amb = arr.last - arr.first; hist.do({ |item| arr.remove( item ) }); current = arr.choose; hist = hist.addFirst( current )[.. ...