n1=random(),
clockLen=200000,
sample= t%clockLen==0?floor(n1*200+40):sample,

n3=random()*40,
sample2= t%clockLen==0?floor(n3):sample2,

vol=t%clockLen==0?1:vol-.1,
bufLen=sample,
buf=t==0?[]:buf,
bufFreq= sample2,
bufPos=t%bufLen,

n2=random()*1000,


init=(source)=>source[t]=t<bufLen?n1:source[t],
initTrig= init(buf),
delay = (source) => (t%clockLen<(clockLen/2.5))?
	source[(bufPos+bufFreq)%bufLen]=t>=(bufLen?source[bufPos]+source[(bufPos+bufFreq)%bufLen]:source[(bufPos+bufFreq)%bufLen]):
	source[bufPos]=source[bufPos]-1,
initDelay = delay(buf),
impulse = (source, signal) => source[bufPos] = signal,
initImpulse =n2>998 && (bufPos%bufLen>0&&bufPos%bufLen<(bufLen/2.5))? impulse(buf, n1):-1,
t*buf[bufPos]*.00001