for(_='[v[Bf[b]HH.NNpQ0,~2~E3ED=bV-.UioLseKreJ);Z";Y),X340+12*`a.width_.value=^](c[c.fRbnhfSe]="Z#&&(||(=>{or(1,atin0ao10~2*Mh.PIc.fill(~40~,Zvar )) PerLdicWave(;wdow.onkeydexaconnect(d.cJeFlo32Array.from(gb="1234567890qwertyuLpasdfghjkl;zxcvbnm,.?".Of(b.key)fv c)cB0]+B4]]+B8]]]=v;d=void 0;functLn e(){sky]="#a22YlWh]=4;mT~36~~DDDD46~24~5E20~5ED0Zsk6771)}f={},g=[~U6,.7,U.~U03,.03,U0.0~0],hdownVb.Jped=d||new AudLContext,hh=Ga(Xh.d.destLn ,,0<VHH=OscillXNfJquency^90+8*b,NKtX.map(()Jturn 0} ,NV,Nstart(0 ,QJsKdk=Q=!~Nh };k=x=0;KtInterval(()_=_;hh.ga^kZk=Mh.max(~kU1hsl("+3*++x+",75%,95%)Y~~8~720fd0Ye(stK54~360K-1tK-54~-360Ze(roa22Y2E335,5E502E36~5~000YfffYfb=0;4>b;b++)15~`b,59~2Zfb f)QJd",Xa300+N%*37.5,`(N/>>0X7,X },50)upV;0<V&&H&&QQ=!Ndis };';G=/[-^-`X-ZJ-LUVDE~QNHB]/.exec(_);)with(_.split(G))_=join(shift());eval(_)
var ac=void 0;
var rh = () => {
c.strokeStyle = '#a22'
c.lineWidth = 4
c.beginPath()
c.moveTo(100,360)
c.arcTo(100, 100, 320, 320, 100)
c.arcTo(320, 320, 460, 240, 100)
c.arcTo(520, 200, 520, 320, 100)
c.fill()
c.stroke()
c.beginPath()
c.arc(670, 400, 10, 0, 2 * Math.PI)
c.fill()
c.beginPath()
c.arc(710, 400, 10, 0, 2 * Math.PI)
c.fill()
}
var n = '1234567890qwertyuiopasdfghjkl;zxcvbnm,.?'
var s = {}
var w = [
0,
-0.6,
0.7,
-0.1,
0.1,
0,
-0.03,
0.03,
-0.01,
0.01,
0.0,
0.0,
]
var g
window.onkeydown = (evt) => {
if (evt.repeat) return;
ac = ac || new AudioContext()
if(!g) {
g = ac.createGain()
g.connect(ac.destination)
}
var f = n.indexOf(evt.key)
if (f >= 0) {
if (!s[f]) {
s[f] = ac.createOscillator()
s[f].frequency.value = 90 + (f * 8)
s[f].setPeriodicWave(ac.createPeriodicWave(Float32Array.from(w), Float32Array.from(w.map(a=>0))));
s[f].index = f
s[f].start(0)
}
if (!s[f].pressed) {
v = 1;
s[f].p = true
s[f].connect(g)
}
}
}
var v=x = 0
setInterval(()=> {
//if (++x % 0xff == 0) y = ++y%3
a.width=a.width
if(g) g.gain.value = v;
v = Math.max(0, v - 0.1)
c.fillStyle=`hsl(${++x*3},75%,95%)`
c.fillRect(0,0,1080,720)
c.fillStyle='#fd0'
rh()
c.save()
c.translate(540,360)
c.scale(1, -1)
c.translate(-540,-360)
rh()
c.restore()
c.fillStyle = '#a22'
c.fillRect(220, 335, 520, 50)
c.beginPath()
c.arc(220, 360, 50, 0, 2 * Math.PI)
c.fillStyle='#000'
c.fill()
c.fillStyle = '#fff'
for(var i=0;i<4;i++){
c.fillRect(150, 340+i*12, 590, 2)
}
for (i in s) {
if(s[i].p) {
c.fillStyle = 'red'
c.beginPath()
c.arc(300 + (s[i].index % 10) * (300/8), 340 + ((s[i].index/10) >> 0) * 12, 7, 0, 2 * Math.PI)
c.fill()
}
}
},50)
window.onkeyup = (evt) => {
var f = n.indexOf(evt.key)
if (f >= 0 && s[f] && s[f].p) {
s[f].p = false;
s[f].disconnect()
}
}