/////Ascii= [ ; , l, k, j, h, g, f]

p=ProxySpace.push(s.boot;s.latency=0.01;)

p.fadeTime=1.2;

~mc.play;
NodeProxy.audio(s, 2);

a=Buffer.alloc(s, s.sampleRate * 2, 1);
b=Buffer.alloc(s, s.sampleRate * 1, 1);
c=Buffer.alloc(s, s.sampleRate * 3, 1);
d=Buffer.alloc(s, s.sampleRate * 8, 1);
f=Buffer.alloc(s, s.sampleRate * 27, 1);
g=Buffer.alloc(s, s.sampleRate * 3, 1);
h=Buffer.alloc(s, s.sampleRate * 5, 1);

a.free;
b.free;
c.free;
d.free;
f.free;
g.free;

~rec1={RecordBuf.ar(SoundIn.ar(1), h.bufnum, loop: 0, doneAction:2)};

(
w=SCWindow("paQUEescribas", Rect(400,200,300,500)).front;
w.view.keyDownAction={|view, char, modifiers, unicode, keycode|
                            [char, keycode].postln;
                            };

~env1={Pan2.ar(SinOsc.ar([80, 120]) * PlayBuf.ar(1, a.bufnum, trigger: KeyState.kr(38, 0, 1, 0.001), loop: 1), -0.3) * 0.4};

~env2={Pan2.ar(PlayBuf.ar(1, b.bufnum, trigger: KeyState.kr(40, 0, 1, 0.001), startPos:0, loop: 1), 0)};

~env3={Pan2.ar(PlayBuf.ar(1, c.bufnum, trigger: KeyState.kr(37, 0, 1, 0.001), startPos:5000, loop: 1), 0)};

~env2={Splay.ar(FreeVerb.ar(PitchShift.ar(PlayBuf.ar(1, c.bufnum, trigger: KeyState.kr(37, 0, 1, 0.001), startPos: 5000, loop: 1), 1, Demand.kr(Impulse.kr(2), 0, Dseq([ 0.3, 0.5], inf)), 0, 1), 0.3, 0.9, 0.01), 0.8)};

~env4={Splay.ar(FreeVerb.ar(VarSaw.ar(Demand.kr(Impulse.kr(TRand.kr(4, 12, Impulse.kr(8))), 0, Dxrand([550/3, 0, 150/2, 0, 350 * 16, 0, 550], inf))) * PitchShift.ar(PlayBuf.ar(1, d.bufnum, trigger: KeyState.kr(41, 0, 1, 0.001), startPos: 5000, loop: 1), 1, 0.5, 0, 0.1), 0.3, 0.5, 0.1), 1) * 2};

~env5={Pan2.ar(PlayBuf.ar(1, f.bufnum, trigger: KeyState.kr(4, 0, 1, 0.001),startPos: d.numFrames.rand), 0) * 2};
,
~env6={Pan2.ar(PlayBuf.ar(1, g.bufnum, trigger: KeyState.kr(5, 0, 1, 0.001)),[-1, -0.5, 0, 0.5].choose) * 2};

~env7={Pan2.ar(PlayBuf.ar(1, h.bufnum, trigger: KeyState.kr(3, 0, 1, 0.001)),[1, 0.5].choose) *1.5};
ffffffggh
)

~mc=  ~env2 + ~env6 + ~env5 + ~env7 + ~env3 

p.clear(10);

s.record;
s.stopRecording;