-
//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;
-
... LFNoise1 .kr(0.3,0.1,0.1), amp)); 6.do({ out = AllpassN .ar(out, 0.040, [0.040.rand,0.040.rand], 2) }); Out .ar(0,out) }).play(s); ) ( SynthDef ( "pitchFollow2" ,{ var in, amp, freq, hasFreq, out; in = Mix .new( SoundIn .ar([0,1])); amp = ...
-
... ://twitter.com/#!/codehop/status/106521929359433729 fork{loop{play{f=_*3.pow(17.rand/13);e=EnvGen.ar(Env.perc,1,0.3,0,1,2);PMOsc.ar(f.([438,442]),f.(880),f.(e))*e};[1/6,1/3].choose.wait}}
-
/* 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 ...
-
... am ⧉ ✔ Inherited instance methods Examples ( a = Pbind( x: Pseq([1, 2, 3]), y: Prand([100, 300, 200], inf), zzz: 99 ); x = a.asStream; ) x.next(()); // pass in an event () x.next(()); x.next(()); x.next(()); // end: nil ⧉ ✔ // sound example ...
-
... dup(100) }.dup(5).plot("Some 2-d data"); // 3-channel interlaced data b = [{1.0.rand}.dup(50), { 20.0.rand - 30 }.dup(50),{ 10.0.rand }.dup(50)].lace(150); b.plot(numChannels:3); // Common rescaling b.plot(numChannels:3, separately: false); ...
-
... Ndef(\lv, { Mix( LeakDC.ar( LotkaVolterra.ar(SampleRate.ir*0.5, a: {LFNoise2.ar(Rand(0.000174, 0.00174)).range(0.49, 0.5)}!3, b: \b.kr(1.5, 0.1), c: {LFNoise2.ar(Rand(0.000174, 0.00174)).range(2, 4)}!4, // \c.kr(0.5, 0.1), a: {LFNoise2.ar(R ...
-
... 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 ...