/* Lessons learnt from this session. (a) portamento is Lag.kr (b) ?? (c) side chaining is with Compander, where slopeAbove is <1 (d) you can play a buffer as many times as you want in a single synth/note, with its trigger signal going non-positive to positive (this resets it to its start) */ s.boot; ~loadStereo = {|file|Buffer.readChannel(s,file,channels:({|i|i}!SoundFile.openRead(file).numChannels).lace(2))}; // https://freesound.org/people/almela/sounds/250547/ b=~loadStereo.("/Users/grault/Downloads/250547__almela__kick-bass-drum.wav") ( SynthDef(\synth, {|gate=1,out=0,amp=1| n=Lag.kr(Duty.kr(LFTri.kr(1/pi,mul:1/8,add:1/4),0,Dseq('LUCK'.ascii,inf))); k=PlayBuf.ar(2, b.bufnum, trigger:n-('L'.ascii)!2); g=Saw.ar(n.midicps); Out.ar(out, ((3*k)+Compander.ar(GVerb.ar( LPF.ar(g+FreqShift.ar(g,5,SinOsc.ar(50,mul:200)),2000), roomsize:10, revtime:2 ),3*k,slopeAbove:0.2)) *amp *EnvGen.kr(Env.asr(releaseTime:2),gate,doneAction:Done.freeSelf) ); }).add; ) Pdef(\foo,Pfindur(10,Pmono(\synth))) Pdef(\foo).record("/tmp/2018-12-18.wav")