This commit is contained in:
parent
37457b694e
commit
779a1fe15c
2 changed files with 25 additions and 2 deletions
BIN
static/qrplay/qrplay-v2a.png
Normal file
BIN
static/qrplay/qrplay-v2a.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
|
@ -35,7 +35,7 @@ for(
|
|||
// loop over input, look ahead one character for sharp/flat
|
||||
// see bottom of loop for z and g initializers
|
||||
c=v[i++],d=v[i],c;
|
||||
|
||||
|
||||
z<0?0: // unknown character, ignore
|
||||
!z?(o=0,l=1/8): // @ reset
|
||||
z<3?o+=g: // -+ change octave
|
||||
|
@ -83,13 +83,36 @@ window.location.search = "?"+f.value.replaceAll(" ","%20").replaceAll("\n","%0a"
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<p>qrplay v2a</p>
|
||||
<img src="qrplay-v2a.png">
|
||||
<textarea>data:text/html,<meta%20name=viewport%20content=width=device-width,initial-scale=1><textarea%20id=f></textarea><br><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++<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%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())]">%23play</button>%20<button%20onclick=f.A.close()>%23stop</button></textarea>
|
||||
|
||||
<p>we will rock you</p>
|
||||
<textarea id="rock">U137V40
|
||||
@s.9x9x6xxx9x9x6xxx9x9x6xxx9x9x6xxx
|
||||
@s.deedi.es.eei.des.de
|
||||
@s.edi.es.eeedi.eags.g-b+dx
|
||||
@s.ei.es.dexxdexexe
|
||||
@s.xxxdddxdd-bxage+eq.x
|
||||
@q.gf#eds.exex6xxx9x9x6xxx
|
||||
@q.gf#eds.exex6xxx9x9x6xxx
|
||||
@s.deedi.es.eei.des.de
|
||||
@s.edi.es.eeedi.eags.g-b+dx
|
||||
@s.ei.es.dexxdexexe
|
||||
@s.xxxdddxdd-bxage+eq.x
|
||||
@q.gf#eds.exex6xxx9x9x6xxx
|
||||
@q.gf#eds.exex6xxx9x9x6xxx
|
||||
@q.gf#eds.exex6xxx9x9x6xxx
|
||||
@q.gf#eds.exex6xxx9x9x6xxx
|
||||
</textarea>
|
||||
|
||||
<p>for security reasons, your phone probably won't open these as links. you'll have to copy and paste the text into your browser's uri input.</p>
|
||||
|
||||
<script>
|
||||
// set default value for input
|
||||
f.value=(f.value
|
||||
|| window.location.search.slice(1).replaceAll('%20', ' ').replaceAll('%0a','\n').replaceAll('%0A','\n').replaceAll('%23', '#')
|
||||
|| s.value
|
||||
|| rock.value
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Reference in a new issue