Mini Synth

February 2019

A piano and guitar synth, made in 1Kb for JS1k 2019.

- Github

- Demo

- Commented source code

- making-of

<body id=b>
<script>
for(_='inZ<ZputYufferXvalueW="1emVlengthv.++)pxtep>=1i,?0:p+1]=.5*(i*6.28))*w(n),i=0;i<checked id=~~P00(non;height:	.ZnerHTMLstylev[p),=A.creaBX441b,,Y type=radio name=Ub..margZV";b..ftV Arial";for==>{for($=d.W,u=o.,v=[],p=c=0,b=(,e,t)=>sZ/*e+t)w=(,i)=>u?sZ/*+0)**2+.75*.25)+.1*.5:(P=/r=0,<+?(v.push(2*random()-1v[-1]):(>=-1]+]=&&(p<1+?c%1>=~~(1*(P-&&(r,+1v[0]++1]c:rp=r,]D=[]*$;iD[i]=i<88?i/88.2:(1-(i-88.2)/(*($-.2)**(u?(.5*log(1e4*n/**2:1);A=new AudioCxt,m(1,1e6,m.getChannelData(0).set(DsSource(s.bX=m,s.cnect(A.destZatis.start()}b="<h1>MZiSynth</h1>< o>Piano>Guitar<No : Yd W=2 size> secds<<div"36;ip+=`<div =\'width:30	2;float:left;border:1 solid;cursor:poZr;left:${i/2*37+8};${f30.81*1.06**[1,3,6,8,10].Zcludes(i%12)?"background:#0;positi:absolu	99":0}\'click=n(${f})>`';G=/[-V-Z]/.exec(_);)with(_.split(G))_=join(shift());with(Math)eval(_)
</script>