nycki.net/static/qrplay/min.html
nycki cbc23f8723
All checks were successful
/ build (push) Successful in 40s
v2 full release
2025-07-10 15:26:45 -07:00

64 lines
1.4 KiB
HTML

<meta name=viewport content=initial-scale=1>
<center>
<p><a href=http://nycki.net/qrplay>qrplay v2c</a></p>
<textarea id=f style=width:min(40em,99%);height:9lh>; #title nupa's theme
; #authors nycki bsp
z00
@qcceg hcqeg dcdc d#h.d
@qcceg hcqeg dcd#d wc
z01
@-wc b! a a!
@-wc b! haqa!g w-c
</textarea><p>
<button onclick='
s=`@`+f.value.toLowerCase();
f.A?.close();
A=f.A=new AudioContext;
T=[];L=[];
u=137;
v=40;
for(
c=t=k=Z=0;D=s[c+1],E=D+s[c+2],C=s[c++];
z<0?0:
z<2?k=z:k?0:
z<4?o+=C+1|0:
z<5?l*=3/2:
z<6?l/=3:
z<14?(
z-=6,
O=new OscillatorNode(A,{
type:`square`,
detune:100*(z*2-(z>2)-(D==`!`)+(D==`#`)+12*o-9)
}),
G=new GainNode(A,{gain:z<7&&.5**(12-v/5)}),
O.connect(G),
G.connect(A.destination),
O.start(t),
O.stop(t+=7.5*l/u)
):
z<23?(
s=`z99o06${[
"+g",
"-b+c#deff#gg#aa#b+cc#d",
"g++ddb--g++ddb--g++ddb--g++ddb",
,
"+ea-g--b++g++c#----b++g+cd#-g+cec",
"a#ga#g-a#+g-b+g",
"-a++c#-aae+e--a++c#-aae+e--a++c#",
"-fffeeed#d#dddc#c#c#",
"dddddedc#ded#fee",
"--ba#bb-a+a#-baaa+a#bb-a",
][z-14]}z${Z} o${o+4} x`+s.slice(c),c=0,T[99]=t,L[99]=u/2**12
):
z<24?(o=0,l=1):
z<31?l=2**(z-25):
z<32?(
T[Z]=t,L[Z]=l,
t=T[Z=E|0]||0,l=L[Z]||l,
c+=2
):
z<33?u=E+s[c+=2,c++]:
z<34?(v=E,c+=2):
(o=E-4,c+=2)
)z=`\n;-+.3cdefgabx012456789@jtsiqhwzuvo`.indexOf(C)
'>#play</button> <button onclick=f.A.close()>#stop</button>