-
... to get the next item, which is embedded and so on. p = Pseq([Pseries(0, 1, 3), Pgeom(10, 2, 3)], 1).asStream; p.next; // Pseq is embedded; first item is Pseries(0...), also embedded // Control is now in the Pseries p.next; // second item f ...
-
... 8 b = a.asStream; 9.do({ b.next.postln; }); // print 9 values from stream ) ⧉ ✔ Pgeom is a Pattern that generates a geometric series. ( var a, b; a = Pgeom.new(10, 3, 8); // stream starts at 10, steps by factor of 3 and has length 8 b = a.a ...
-
... Pdict , Penvir , Pevent , Peventmod , Pfhn , Pfunc , Pfuncn , Pgauss , Pgbman , Pgeom , Pget , Phenon , Pif , Pindex , Pkey , Platoo , Plazy , Plet , PlinCong , Plorenz , Pmono , Pnaryop , Ppatmod , Ppoisson , Pprob , Pproto , Pquad , Prout ...
-
... te duration to get the sustain time. ( // changing duration Pbind( \dur, Pseq([ Pgeom(0.05, 1.1, 24), Pgeom(0.5, 0.909, 24) ], inf), \midinote, Pseq(#[60, 58], inf) ).play ) ( // changing legato value Pbind( \dur, 0.2, \legato, Pseq([ Pseri ...
-
... . One use case is -endless . a = EventPatternProxy.new; a.source = Pbind(\freq, Pgeom(100, Pwhite(1.01, 1.2), 4)); r = Routine { |inval| loop { a.embedInStream(inval) } }; r.nextN(12, ()); // the next 12 values from r a.source = Pbind(\freq ...
-
... value; // Patterns, Streams, UGens, and Proxies are AbstractFunctions, too: a = Pgeom(1, 2, 5).neg; a.asStream.nextN(8); { a = LFNoise1.ar(1500); [a, a.neg] }.plot; ⧉ ✔ . reciprocal a = { 10.rand.postln }; b = a.reciprocal; b.value; a = Pge ...
-
... = outval.yield; }; cleanup.exit(inval); } }; p = Plazy { Pmono(\default, \note, Pgeom(rrand(1, 1.5), rrand(1.05, 2), inf), \harmonic, [0.78, 1, 1.2], \dur, 1/rrand(4, 7), \amp, 0.4) }; x = f.(p, { |outval| outval[\note] < 20 }); // always s ...
-
... cond - first, third - second, and so on. Array.geom(20, 1, 1.01).differentiate; Pgeom(1, 1.01, 20).differentiate.do { |x| x.postln }; ⧉ ✔ Miscellaneous calculation patterns These are some other numeric calculations that don't exactly fall i ...
-
... functions. Pseries (start, step, length) arithmetic series, e.g., 1, 2, 3, 4, 5 Pgeom (start, grow, length) geometric series, e.g., 1, 2, 4, 8, 16 Pwhite (lo, hi, length) random number generator, uses rrand(lo, hi) -- equal distribution Pex ...
-
... in the function, otherwise it will loop forever. ( a = ( pattern: Pbind(\note, Pgeom(1, 1.1, { 20.rand }), \dur, 0.05), embedInStream: { |event, inevent| event[\pattern].embedInStream(inevent) } ); b = (note: [3, 5]); c = (freq: 402, dur: ...