s.boot;
p = “/Users/jsimon/Music/tedsound/prosim/nolap_firstofthese/slices/ntfot82.aif”;
b = Buffer.read(s, p);
b = Buffer.read(s, p, bufnum: 0);
b.play;
b.free;
(
SynthDef(\mybuf, { |out, bufnum, sig, rate=1, slices=16, slice=16|
var myenv, env, start, len;
len = BufFrames.kr(bufnum);
start = (len / slices * slice);
myenv = Env.linen(0.01, 0.2, 0.1);
sig = PlayBuf.ar(2, bufnum, BufRateScale.kr(bufnum) * rate, startPos: start, loop: 1);
env = EnvGen.kr(myenv, Impulse.kr(0), doneAction: 2);
Out.ar(out, sig * env)
}).add;
)
(
a = Pbind(
\instrument, \mybuf,
\slice, Prand((1 .. 16), inf)
);
)
a.play;
(
b = Pbind(
\instrument, \mybuf,
\slice, Pseq((1 .. 16).scramble, inf)
);
)
b.play;
(
c = Pbind(
\instrument, \mybuf,
\slice, Pseq((1 .. 16).pyramid, inf)
);
)
c.play;
TempoClock.default.tempo = 160/60;
(
d = Pbind(
\instrument, \mybuf,
\slice, Pseq((1 .. 16).pyramid(9), 1),
\dur, 0.5
);
)
d.play;