xinglinkedinenvelopebubblesgoogleplusfacebooktwitterfeedgithub

Generating sound effects with client side JavaScript

6th April 2014 | by Adam Beres-Deak | javascript, sound, client side

A few years ago I came across a simple library with which we can easily generate 8-bit sound effects for JavaScript games and apps. This library is very handy for hackathons or weekend coding sessions.

This small library is called jsfx. Info on usage and a demo site can be found on its GitHub page.

How does it work?

This lib generates wave files as data URIs and then feeds them to an <audio> element.

Demo

Just click on the buttons to play the corresponding sound effects.

by Adam Beres-Deak

| Share | Tweet | Share | Share

Latest blog posts

Better webfont loading with using localStorage and providing WOFF2 support 18th December 2014

Worth watching: Douglas Crockford speaking about the new good parts of JavaScript in 2014 20th October 2014

Automatically adjusting the height of a textarea to its content text 16th October 2014

Loading webfonts with high performance on responsive websites 8th October 2014

Loading web pages really fast - optimistic page loading with Instantclick.io 8th October 2014