Last active
November 29, 2024 00:53
-
-
Save xem/670dec8e70815842eb95 to your computer and use it in GitHub Desktop.
beep boop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- solution 1, 117b, inspired by http://www.p01.org/releases/140bytes_music_softSynth/ --> | |
<button onclick="new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU'+Array(1e3).join(123)).play()">Beep</button> | |
<!-- Solution 2, 107b, inspired by http://xem.github.io/chip8/c8.html --> | |
<button onclick="o=(A=new AudioContext()).createOscillator();o.connect(A.destination);o.start(0);setTimeout('o.stop(0)',500)">Boop</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great (and weird), but sadly, only works on Opera 12. =(