My friend Danny introduced me to Bytebeat music. There’s a great introduction here. The short version of it is you write a function that given only ‘t’ as input produces music.
So, inspired by Mr.Doob’s GLSL Sandbox I whipped up a live editing HTML5 Beatbytes page.
A few options:
1) You can choose between floatbeat and bytebeat.
2) You can choose between infix and postfix expressions.
I don’t really know which is more common but since there are lots of samples in each I wanted it to be easy to copy and past them in regardless of where they came from.
3) Sharing beats.
The code is saved to the URL as you edit so you can copy the URL and send it to someone to share songs. Here’s a few to get you started.
So far it seems to work on Chrome and Firefox, even Firefox on Android although it probably needs some TLC to be usable on such a small screen.
This example shows that by using the comma operator you can pretty much write arbitrary code.
This example shows using the mouse position as input.
Sometimes just making noise can be fun
This example shows using the tilt as input though it only works if you have
a machine and browser that supports the device orientation API.
The project is hosted on github.