Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- Buffer.freeAll;
- s.waitForBoot({
- //buffers
- b = Dictionary.new;
- PathName(PathName(thisProcess.nowExecutingPath).pathOnly+/+"buffers").entries.do{
- arg subfolder;
- b.add(
- subfolder.folderName.asSymbol ->
- Array.fill(
- subfolder.entries.size,
- {
- arg i;
- Buffer.read(s, subfolder.entries[i].fullPath);
- }
- )
- );
- };
- //SynthDefs
- SynthDef(\playmono,{
- arg atk=0.001, sus=0.2, rel=0.06, c1=1, c2=(-1),
- buf=0, rate=1, spos=0, amp=1, pan=(-1), out=0;
- var sig, env;
- env = Env([0,1,1,0],[atk,sus,rel],[c1,0,c2]).kr(2);
- sig = PlayBuf.ar(1, buf, rate, startPos:spos);
- sig = sig*env;
- sig = Pan2.ar(sig, pan, amp);
- Out.ar(out, sig);
- }).add;
- })
- )
- (
- a = Pbind(*[
- instrument: \playmono,
- buf: Pseq(b[\shakers] [(1..6)],inf),
- pan: Pwhite(-1.0,1.0),
- dur: Pkey(\buf).collect(_.duration)+1,
- amp: Pwhite(0.01,0.5),
- out: 0
- ]).play;
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement