u(t) is called 60 times per second.
t: Elapsed time in seconds.
S: Shorthand for Math.sin.
C: Shorthand for Math.cos.
T: Shorthand for Math.tan.
R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5)
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
You can use n(h) to play notes, h is half step offstep from middle C. Tetris Music = f=n([4,z,-1,0,2,z,0,-1,-3,z,-3,0,4,z,2,0,-1,z,-1,0,2,z,4,z,0,z,-3,z,-3,-3,-3,z][i/8%32|0])
Tetris with variation and notes drawn: f=n([4,z,-1,0,2,z,0,-1,-3,z,-3,0,4,z,2,0,-1,z,-1,0,2,z,4,z,0,z,-3,z,-3,-3,-3,z][i/8%32|0]);f*=-2^(i>>8);f<-9&&x.fillRect(i/8*9,800+f/6,9,20)
D-BOT MICRO (for real this time) Make beatbox music with your mouse onmousemove=E=>e=E;x.fillStyle="hsl("+(f=i&i<<(e.x>>6)%(1+e.y<<3))+" 99%50%";x.fillRect(3*e.x,e.y,f>>2,f>>2)
u(t) is called 60 times per second.
t: elapsed time in seconds.
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
S: Math.sin
C: Math.cos
T: Math.tan
R: Generates rgba-strings, ex.: R(255, 255, 255, 0.5)