18 lines
No EOL
452 B
HTML
18 lines
No EOL
452 B
HTML
<textarea onblur='
|
|
v=this.value.toLowerCase();
|
|
for(
|
|
c=t=o=0,l=2;C=v[c++];
|
|
z>9?l=1<<z-9:
|
|
z>1|C-3?1+C<9||(
|
|
O=new OscillatorNode(A=new AudioContext,{
|
|
type:`square`,
|
|
detune:100*(d?`0x`+d-(v[c]==`!`)+(v[c]==`#`)+o-9:-9e9)
|
|
}),
|
|
O.connect(A.destination),
|
|
O.start(t),
|
|
O.stop(t+=l*7/256)
|
|
):
|
|
z<0?o+=C+12|0:
|
|
l*=3/d
|
|
)d=`29024579b`[z=`.3cdefgabxtsiqhw`.indexOf(C)]
|
|
'></textarea> |