Audio from JS

generates a beep with just js, no audio file needed

by Stefano

HTML

<!-- 
here the tool to convert mp3 to base64 string:
http://codecontribution.blogspot.com/2013/06/a-while-ago-friend-of-mine-told-me-i-am.html
OR
https://github.com/dondido/MP3-to-Base64-Encoder-and-Decoder
-->
<button type="button">Beep!</button>

JavaScript

function beep() {
    // data:[<MIME-type>][;charset=<encoding>][;base64],<data>
    var snd = new ...