smaller with more trickery
All checks were successful
/ build (push) Successful in 54s

This commit is contained in:
Nycki 2025-07-06 15:09:46 -07:00
parent 67a203d7ea
commit afeba7d643

View file

@ -1,22 +1,13 @@
<!doctype html> <html onclick="
<meta name="viewport" content="initial-scale=1.0"> c=new AudioContext();
<script> r=.08;
var m=[147, 2, 147, 2, 294, 4, 220, 6, 208, 4, 196, 4, 175, 4, 147, 2, 175, 2, 196, 2]; n=(f,t,u)=>{
var r=.08; o=c.createOscillator();
function n(c,f,t,u) { o.connect(c.destination);
var o=c.createOscillator(); o.frequency.value=f;
var g=c.createGain();
o.connect(g);
g.connect(c.destination);
o.frequency.value = f;
o.start(t*r); o.start(t*r);
o.stop(u*r-r); o.stop(u*r-r);
} };
function p() { m=[147, 2, 147, 2, 294, 4, 220, 6, 208, 4, 196, 4, 175, 4, 147, 2, 175, 2, 196, 2];
var c=new AudioContext(); for(i=0,t=0;i<m.length;i+=2)n(m[i],t,t+=m[i+1]);
for(i=0,t=0;i<m.length;i+=2) { ">click anywhere
n(c,m[i],t,t+=m[i+1]);
}
}
</script>
<button onclick="p()">play</button>