-
... om James Harkins' "A Practical Guide to Patterns": s.boot p = Pbind( \midinote, Pif(Pwhite(0.0, 1.0, inf) < 0.7, Pwhite(60, 80.5, inf), Pwhite(45, 55.5, inf)), \dur, Prand([0.125, 0.25, 0.5], inf) ); p.play ⧉ ✔ Add the next 40 Events in our ...
-
... ; } } PChanged : FilterPattern { *new {|pattern, threshold= 0, mul= 1, add= 0| ^Pif(PHPZ1(pattern, mul, add).abs>threshold, 1, 0); } } PLPZ2 : FilterPattern { var <>mul, <>add; *new {|pattern, mul= 1, add= 0| ^super.newCopyArgs(pattern, mul ...
-
... ods . asEvent Examples Using Rest instances in a pitch stream ( Pbind( \degree, Pif( 0.1.loop.coin, Pseq([Rest(), 7], inf), // every second is a Rest Pseries(0, 1, inf).fold(-7, 7) ), \dur, 0.125 ).play ) ⧉ ✔ Using a Rest instance in a dura ...
-
... dex]) / ev[\rate] }); }), // rest if 0, else give synthdef name // \instrument, Pif(Pkey(\amp) > 0, ~makePattern.(\def, inf), \rest), \instrument, Pif(Pkey(\amp) > 0, ~makeDefPattern.(inf), \rest), \chan, Pfunc({ ~chan }), \latencyAdjust, P ...
-
... rest, need a placeholder // note, no placeholder for \def because it's inside a Pif below (sourceKey != \def and: { amps[0] == 0 }).if({ outArray.add(0) }); amps.do({ |amp| (amp > 0).if({ outArray.add(array.wrapAt(i)); i = i + 1; }); }); if ...
-
... ten this way (see PG_06e_Language_Control for an explanation of the conditional Pif ): ( // first, pitches ascending by 1-3 semitones, until 2 octaves are reached var pitches = Pseries (0, Pconst (24, Pwhite (1, 3, inf )), inf ).asStream.al ...
-
... n, amp) }, args: [ freq: BPStream ( \freq ), amp: Pwhite (0.3, 0.7, inf ), dur: Pif ( Pwhite (0.0, 1.0, inf ) <= 0.7, Pwhite (0.08, 0.11, inf ), Pwhite (0.15, 0.25, inf )), pan: BPStream ( \pan ) ] ), saw: ( def: { |freq, amp, dur, pan, ffr ...
-
... n, amp) }, args: [ freq: BPStream ( \freq ), amp: Pwhite (0.3, 0.7, inf ), dur: Pif ( Pwhite (0.0, 1.0, inf ) <= 0.7, Pwhite (0.08, 0.11, inf ), Pwhite (0.15, 0.25, inf )), pan: BPStream ( \pan ) ] ), saw: ( def: { |freq, amp, dur, pan, ffr ...
-
... (see Pattern Guide 06e: Language Control for an explanation of the conditional Pif ): ( // first, pitches ascending by 1-3 semitones, until 2 octaves are reached var pitches = Pseries(0, Pconst(24, Pwhite(1, 3, inf)), inf).asStream.all, // ...
-
... 2 notes per beat postDefaults: Pbind( // must be above \dcy2 below \retrigFreq, Pif( Pbinop('==', Pkey(\dcy2), 0.04), BPStream(\retrigFreq) * TempoClock.tempo, 0 // normal case, 0 suppresses roll ), \sustain, Pkey(\dur) * 0.9, \dcy2, min(Pk ...