[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] PlayBuf and Patterns
again a newbie-question:
how can i control the playbackRate in PlayBuf with a pattern-stream?
i.e. stream1 controls the *rate* and stream2 the *duration* for each rate.
//from PlayBank examples, PlayBuf would work similar
(
var b, s, t;
b = SampleBank.new;
b.readAll(":Sounds:", ["floating_1","sinking_1"]); //..add some more..
s = Pseq([1, 2, 1, 3], inf).asStream;
t = Pseq([0.3, 1, 0.1, 3], inf).asStream;
{
Spawn.ar({ arg sp, i;
sp.nextTime = t.next;
Cutoff.ar(PlayBank.ar(b, 0, s.next, 0, 1, 1), 0.2, 0)
}, 2, 0.13)
}.scope;
)