-
... rd structure determined by a single interval parameter p = PHSpar(h, switchDur: Pfunc { ~swTmMid * (1 + rand2(~swTmDev)) }, switchIndex: Pseq([0,1], inf), pbindArgs: [ 0.15, [ \midinote, Pkey(\thisVal) + Pfunc { [~int.neg, 0, ~int] } ]], sw ...
-
... am : AbstractFunction : Object Stream of a function Source: Stream.sc See also: Pfunc Description FuncStream is one of the most basic ways to describe a stream: it has a function that is called for each next stream value. // make a stream t ...
-
... and multichannel expand them Source: Ppatmod.sc See also: Plazy , PlazyEnvir , Pfunc Description Evaluates a function that returns a pattern and embeds it in a stream. In difference to Plazy , the function is evaluated using the environmen ...
-
... }; ~freq[5] = ~ctl1.wrap2(~ctl2) * ~ctl1 / (~ctl2 + ~ctl1); ~pat = Pbind(\freq, Pfunc({ 1.2.rand })); ~z = 9; ~out.set(\freq, 760, \ffreq, 20); ) p.asCompileString; // the document message creates a new document which it posts the code into ...
-
... t({|n| f.noteChips(n).choose ?? Rest(0.2)}, Pseq([f.notes.choose], inf)), \dur, Pfunc({|e| (e[\end] - e[\start])/f.buffer.sampleRate}), \amp, Penv([0, 0.5, 0], [0.2, 4], 'sine'), \stretch, 0.5, ).play ) p.stop //crazy rate envelope ( p = Pb ...
-
... grees = (0..7); // occasional direct repetitions... Pdef('mem', Pbind( \degree, Pfunc({ var choices = ~mem.filter(~degrees); var next = choices.choose; "next: % from: %\n".postf(next, choices); ~mem.add(next); next }), \dur, 0.25 )).play; / ...
-
... notes p = Pbind( \freq, Pwhite(0, log(32)).exp.round(1) * 36.midicps, \detune, Pfunc({ |ev| ev[\freq] * rand(0.01) }), \sustain, Pwhite(log(0.1), log(20)).exp, \dur, Prand([0.1, 0.1, 0.1, 0.1, 0.2, 1, 2], inf), \db, Pstep(Pseq([-20, -30, - ...
-
... ar startTime; p = (Psync(Pbind( \dur, 0.25, // total duration = infinite \time, Pfunc { startTime = startTime ? (thisThread.clock.beats.debug("time")) } ), 1, 4) ++ Pfuncn({ thisThread.clock.beats.debug("finish time"); (thisThread.clock.bea ...
-
... "); ) // comparison: emulate a linrand ( var a, b, x, y; a = Pprob([1, 0]); x = Pfunc({ 1.0.linrand }); b = a.asStream; y = x.asStream; postf("Pprob mean: % linrand mean: % \n", b.nextN(800).mean, y.nextN(800).mean); b.nextN(800).sort.plot( ...
-
... move = (view.value * 4 - 2).round; }) .value_(0.5); window.front; p = Pbind( // Pfunc is the direction to move through the array // it could be anything // - could read from MIDI or HID and convert it into a step // - could be a GUI control ...