shave a few more bytes off the qr code
All checks were successful
/ build (push) Successful in 34s

This commit is contained in:
Nycki 2025-07-07 17:46:15 -07:00
parent 779a1fe15c
commit 4d99f68b5c
3 changed files with 4 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -15,7 +15,7 @@
<p>paste ZZT music code in this box, then click the button to #play!</p>
<!-- snip here -->
<meta name=viewport content=width=device-width,initial-scale=1>
<meta name=viewport content=scale=1>
<textarea id=f></textarea><br>
<button onclick="
/*qrplay v2a, nycki & SArpnt, 2025*/
@ -84,8 +84,8 @@ window.location.search = "?"+f.value.replaceAll(" ","%20").replaceAll("\n","%0a"
</table>
<p>qrplay v2a</p>
<img src="qrplay-v2a.png">
<textarea>data:text/html,&lt;meta%20name=viewport%20content=width=device-width,initial-scale=1&gt;&lt;textarea%20id=f&gt;&lt;/textarea&gt;&lt;br&gt;&lt;button%20onclick="/*qrplay%20v2a,%20nycki%20&%20SArpnt,%202025*/f.A?.close();B=new%20GainNode(f.A=A=new%20AudioContext,{gain:0.1});B.connect(A.destination);r=.4;l=1;T=[];v=f.value;W=A.createBuffer(1,s=A.sampleRate,s);for(i=0;i++&lt;2*s;W.getChannelData(0)[i]=Math.random()*2-1);p=n=&gt;(n.connect(B),n.start(t*r),t+=l,n.stop(t*r));for(i=o=k=t=Z=0;c=v[i++],d=v[i],c;z&lt;0?0:!z?(o=0,l=1/8):z&lt;3?o+=g:z&gt;28?k=z-29:k?0:z&gt;27?(T[Z]=t,Z=+v.slice(i,i+=2),t=T[Z]||0):z&gt;18?p((w=A.createBufferSource(),w.buffer=W,w.loop=1,w)):z&gt;17?t+=l:z&1?l=g:p(new%20OscillatorNode(A,{type:'square',detune:100*(g+o+(d=='%23')-(d=='!'))})))%20g=[,-12,12,4,-9,2,-7,1,-5,.5,-4,.25,-2,1/8,0,l/3,2,l*1.5][z=`@-+wchdqeifsgta3b.x012456789z\npovukr'`.indexOf(c.toLowerCase())]"&gt;%23play&lt;/button&gt;%20&lt;button%20onclick=f.A.close()&gt;%23stop&lt;/button&gt;</textarea>
<img src="qrplay-v2a2.png">
<textarea>data:text/html,&lt;meta name=viewport content=scale=1&gt;&lt;textarea id=f&gt;&lt;/textarea&gt;&lt;br&gt;&lt;button onclick="/*qrplay v2a, nycki & SArpnt, 2025*/f.A?.close();B=new GainNode(f.A=A=new AudioContext,{gain:0.1});B.connect(A.destination);r=.4;l=1;T=[];v=f.value;W=A.createBuffer(1,s=A.sampleRate,s);for(i=0;i++&lt;2*s;W.getChannelData(0)[i]=Math.random()*2-1);p=n=&gt;(n.connect(B),n.start(t*r),t+=l,n.stop(t*r));for(i=o=k=t=Z=0;c=v[i++],d=v[i],c;z&lt;0?0:!z?(o=0,l=1/8):z&lt;3?o+=g:z&gt;28?k=z-29:k?0:z&gt;27?(T[Z]=t,Z=+v.slice(i,i+=2),t=T[Z]||0):z&gt;18?p((w=A.createBufferSource(),w.buffer=W,w.loop=1,w)):z&gt;17?t+=l:z&1?l=g:p(new OscillatorNode(A,{type:'square',detune:100*(g+o+(d=='%23')-(d=='!'))}))) g=[,-12,12,4,-9,2,-7,1,-5,.5,-4,.25,-2,1/8,0,l/3,2,l*1.5][z=`@-+wchdqeifsgta3b.x012456789z\npovukr'`.indexOf(c.toLowerCase())]"&gt;%23play&lt;/button&gt; &lt;button onclick=f.A.close()&gt;%23stop&lt;/button&gt;</textarea>
<p>we will rock you</p>
<textarea id="rock">U137V40

View file

@ -1 +1 @@
<meta name=viewport content=width=device-width,initial-scale=1><textarea id=f></textarea><br><button onclick="/*qrplay v2a, nycki & SArpnt, 2025*/f.A?.close();B=new GainNode(f.A=A=new AudioContext,{gain:0.1});B.connect(A.destination);r=.4;l=1;T=[];v=f.value;W=A.createBuffer(1,s=A.sampleRate,s);for(i=0;i++<2*s;W.getChannelData(0)[i]=Math.random()*2-1);p=n=>(n.connect(B),n.start(t*r),t+=l,n.stop(t*r));for(i=o=k=t=Z=0;c=v[i++],d=v[i],c;z<0?0:!z?(o=0,l=1/8):z<3?o+=g:z>28?k=z-29:k?0:z>27?(T[Z]=t,Z=+v.slice(i,i+=2),t=T[Z]||0):z>18?p((w=A.createBufferSource(),w.buffer=W,w.loop=1,w)):z>17?t+=l:z&1?l=g:p(new OscillatorNode(A,{type:'square',detune:100*(g+o+(d=='#')-(d=='!'))}))) g=[,-12,12,4,-9,2,-7,1,-5,.5,-4,.25,-2,1/8,0,l/3,2,l*1.5][z=`@-+wchdqeifsgta3b.x012456789z\npovukr'`.indexOf(c.toLowerCase())]">#play</button> <button onclick=f.A.close()>#stop</button>
<meta name=viewport content=scale=1><textarea id=f></textarea><br><button onclick="/*qrplay v2a, nycki & SArpnt, 2025*/f.A?.close();B=new GainNode(f.A=A=new AudioContext,{gain:0.1});B.connect(A.destination);r=.4;l=1;T=[];v=f.value;W=A.createBuffer(1,s=A.sampleRate,s);for(i=0;i++<2*s;W.getChannelData(0)[i]=Math.random()*2-1);p=n=>(n.connect(B),n.start(t*r),t+=l,n.stop(t*r));for(i=o=k=t=Z=0;c=v[i++],d=v[i],c;z<0?0:!z?(o=0,l=1/8):z<3?o+=g:z>28?k=z-29:k?0:z>27?(T[Z]=t,Z=+v.slice(i,i+=2),t=T[Z]||0):z>18?p((w=A.createBufferSource(),w.buffer=W,w.loop=1,w)):z>17?t+=l:z&1?l=g:p(new OscillatorNode(A,{type:'square',detune:100*(g+o+(d=='%23')-(d=='!'))}))) g=[,-12,12,4,-9,2,-7,1,-5,.5,-4,.25,-2,1/8,0,l/3,2,l*1.5][z=`@-+wchdqeifsgta3b.x012456789z\npovukr'`.indexOf(c.toLowerCase())]">%23play</button> <button onclick=f.A.close()>%23stop</button>