Mini Music
August 2017 - February 2018
A tiny music-drawing app with tiny JS export
August 2017: 2 versions developped, with and without chords (DEMO)
February 2018 update: 1kb version golfed and submitted to JS1K 2018!
- Github
<body id=b>
<script>
d = document;
for(_="[i]__=f_[~arGsquGeF`:`Ki,CJ?`I=1:1thonor(dive=intextGeatrianglesawtoo><{wid8style=[]${value siz2 =<putC=0;C<90;C++)mouse clickd_[C] id==o([J]},is,background;fi;i<26;i++)f(``+t./1e3).replace(`0.`,`.`)} typradio namw =w='d.write`<c/pbr>z440> Hz / t200> ms /' checked>seF'>F'>'><px cols=90 rows=5/pbuttp>PLAY & EXPORT<>#b{mGgem}#c00px}p{cleG:bo}.npx;height8px;float:left;borderpx solid}[l=\"13\"]{:#aaa`;d;w=h=``d_,m=h+=`< class=n l=i} 0) over1) =:#(!C&&[1,3,6,8,11,13,15,18,20,23].cludes(i-1))I000`:(j==0||i=3)IKddd`}/>`;c.nerHTML=h; down= up=>m^;o=(J,t,f)=>C&&(f&&m?:f||(^),t..=I#000`3==iI#aaaK#ddd`);p.=>{fif()f.push([J]);k;v;fi f)k~0],v~1];eval(x.=`wi(new AudioCtext)[k}].map((v,i)=>{wi(createOscillat))v&&stGt([v}]_*,cnect(destati),frequency.setValueAtTime(z.}*1.06**(12-v),0)wI,typ'w}'K`}),stop(e+)})`)}";G=/[-I-KFG~_]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
</script>