HTML 5 offers a Web Audio API, to add synthesizing audio support in web applications.
Cody Lundquist, an Australian from Sidney, created a 8 bit music audio library built on the top of the Web Audio API, called 8Bit.js Audio Library.
You define a time (e.g. 4/4), a tempo, and you then the notes.
Submitted 2 days on Reddit, the library got a favorable reception, with some people adapting themes. There is even an original composition, rather nice, called Cities.
A LilyPond support is planned, so in the future there could be a possibility to implement this library into the MediaWiki score extension.
Not yet for every browser
- Safari 6 supports it, so only on iOS and Mac, not yet on Windows.
- Chrome 10+ supports it, and so Opera 15,
- Firefox, Internet Explorer and Opera 12 don’t support it.
[2020 edit: Firefox has added support for it in versions 25 (desktop) and 26 (mobile)]
Links
- Listen to Tetris with 8Bit.js
- 8-bit music on Wikipedia
- Web Audio API specifications
- AngularJS, the framework used by 8Bit.js
- Apple documentation about the Web Audio API
- Coming soon support on Firefox
Acknowledgment
Thanks to Linedwell for the help during browsers test.