Hello, I am sure there is several way to approach this but that’s really tricky to me. For a museum piece I need to build an automated random sample player that runs infinitely. The thing is that I need to set up three layers of durations (two with Rest() ) to make it interesting ; I am gone try to explain this.
The first layer play a random sample with a random stuttered value that depends of the \dur of the original Pbind, that’s classic. (see the code). BUT when the stuttered seq is done I would like a first Rest(), let’s say between 1.5 and 4 sec, before picking up a new stuttered Seq with another random sample.
So, so far we have two level of \dur, the one that order the repetition of the sample and a Rest() before allowing a new stuttered seq, with a new sample.
But now I would like also to Stutter this previous action (Stuttered seq + Rest) randomly (let’s say between 3 or 6 times) and then Rest() randomly between 2 or 3 minutes ! ( of silence ) before repeating all this again.
Is a Pbind of a Pbind of a Pbind is possible ? I would like to keep the Pbind method if possible, and set up each layer of silence with this form
Pseq([Pwhite(1, 1.5, 1), Pwhite(2, 4, 1).collect(Rest(_))], inf)),
I hope my description of his problem is clear
Here is the patch, that is just playing the first step
(
~bells = Array.new;
~folder = PathName(" My path");
~folder.entries.do({ | path |
~bells = ~bells.add(Buffer.read(s, path.fullPath));
});
)
(
SynthDef(\RDM, { | freq |
var sig = PlayBuf.ar(2, \buf.ir);
Out.ar(0, sig);
}).add;
)
(
Pbindef(\ZZZ,
\instrument, \RDM,
\index, Pstutter(Prand([1, 1, 2, 4], inf), Pxrand( (0..~bells.size-1), inf )),
\dur, Pfunc{|ev| ~bells[ev.index].duration },
\buf, Pfunc{|ev| ~bells[ev.index] }
).play;
)
Pseq([Pwhite(1.5, 2, 1), Pwhite(4, 5, 1).collect(Rest(_))], inf)
But then I would like another Rest() layer. I would like another Stutter