Server.killAll s.boot a=Buffer.alloc(s,196000); b=Buffer.alloc(s,196000); ~test.play ~test={RecordBuf.ar(PinkNoise.ar,a,loop:0)}; ~rec={|r| { n=AudioIn.ar(8); SendTrig.kr(DelayN.kr(DC.kr(1),1.5,1.5),0,PeakFollower.ar(n)); e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); RecordBuf.ar(n*e,r,loop:0); Silent.ar }.play}; ~play={|p,x| { e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); PlayBuf.ar(1,p,startPos: 1436)*x*e}.play}; ~pulse={ e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); RecordBuf.ar(Pulse.ar(100,0.01).range(-1,1)*e*0.4,a,0,loop:0)}; ~sine={ e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); RecordBuf.ar(SinOsc.ar(100,0,0.4)*e,a,0,loop:0)}; ~imd={ e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); RecordBuf.ar(SinOsc.ar([100,666],0,0.22).sum*e,a,0,loop:0)}; ~ext={ e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); RecordBuf.ar(AudioIn.ar(7)*e,a,0,loop:0)}; ~pink={ e=EnvGen.kr(Env.linen(0.1,1.8,0.1)); RecordBuf.ar(PinkNoise.ar*e,a,loop:0)}; ~plot={|it,n,c| it.plot(c.asSymbol, Rect(0,640-(n*200),400,200),minval: -1, maxval: 1)}; ~pulse.play ~pink.play ~rec.(b) b.plot ~x ~x=1.1 a.free;b.free; a=Buffer.alloc(s,196000); b=Buffer.alloc(s,196000); ~x=1; o = OSCFunc({ arg msg, time; y=msg[3].postln; (y>0.35).if{~x=0.95}; (y<0.35).if{~x=1}; ~x.postln; },'/tr', s.addr); { ~run="rme_comp"; i=4; r=Routine{ ~one=~ext.play; ~two=~rec.(b); 2.wait; ~one.free; ~two.free; ~plot.(a,0,0); a.write("/Users/glatko/Desktop/tests/"++~run++"__0__.aiff"); ~plot.(b,1,1); 0.2.wait; 2.do{ ~one=~play.(b,~x); ~two=~rec.(a); 2.wait; ~one.free; ~two.free; 0.2.wait; ~one=~play.(a,~x); ~two=~rec.(b); 2.wait; ~one.free; ~two.free; 0.2.wait; }; ~plot.(b,2,5); 4.do{ ~one=~play.(b,~x); ~two=~rec.(a); 2.wait; ~one.free; ~two.free; 0.2.wait; ~one=~play.(a,~x); ~two=~rec.(b); 2.wait; ~one.free; ~two.free; 0.2.wait; }; ~plot.(b,3,13); 8.do{ ~one=~play.(b,~x); ~two=~rec.(a); 2.wait; ~one.free; ~two.free; 0.2.wait; ~one=~play.(a,~x); ~two=~rec.(b); 2.wait; ~one.free; ~two.free; 0.2.wait; }; ~plot.(b,4,29); 35.do{ ~one=~play.(b,~x); ~two=~rec.(a); 2.wait; ~one.free; ~two.free; 0.2.wait; ~one=~play.(a,~x); ~two=~rec.(b); 2.wait; ~one.free; ~two.free; 0.2.wait; }; ~plot.(b,5,99); b.write("/Users/glatko/Desktop/tests/"++~run++"__99_.aiff"); }; AppClock.play(r)}.();