Puse
this class can be used to access the current event
inside a Pbind to create more complex modifications.
it is maybe avoidable.
(
#{
var pat;
pat = Pbind(
\ugenFunc, { arg freq, sustain, amp=0.2;
SinOsc.ar(freq)*Line.kr(amp, 0, sustain)
},
\legato, Pseq([0.1, 0.1, Prand([0.5, 0.1], 2)], inf),
\freq,
Pseq([
Puse({
if(0.8.coin, { ~legato = rrand(4, 2.9) });
~legato * 500 + 300
}, 16),
Pshuf([1300, 1400, 1500], 4),
], inf),
\dur, Pshuf([0.2, 0.6, 0.4, 0.1]/2, 2)
);
{ Pseq([pat], inf).ar(2) }.play;
}.send;
)
//Julian Rohrhuber 1/2001
Puse : Pattern {
var <>func, <>repeats;
*new { arg func, repeats = 1;
^super.newCopyArgs(func, repeats)
}
asStream {
^Routine.new({ arg inval;
repeats.value.do({
inval.use(func).yield
})
})
}
}
Links to this Page
- enter. last edited on 29 January 2003 at 10:46 pm by 203.14.169.19
- Test Patches last edited on 20 November 2002 at 8:25 pm by cg-228.noc.valueweb.com
- Test Paper last edited on 8 November 2004 at 3:13 pm by 192.168.0.69