You might be wondering - what is this and why are you making my ears bleed so? The inspiration
to do this started after I saw
this video
shared on YouTube. The idea is simple: find very short programs that generate interesting sounding
audio. For me at least, there is a certain beauty in discovering the complexity that can emerge from
such simple programs.
Thus inspired I went about making my own little web app for making these things. I ended up taking the
opportunity to have some fun playing with a few different bits of web tech. To start with I ended up
playing with a JavaScript parser
generator to support the parsing and compilation of these simple programs. Next, I decided I wanted people
to be able to submit these programs for sharing and to be able to vote on the shared programs - so I ended
up putting together a simple
server that interfaces
with
Redis in order to store the programs and push submissions to the client.
In the meantime, I have seen a couple other cool sites that serve much the same purpose, namely:
this one and
this one.
Usage should, I hope, be fairly straight forward. In the program box just type in your code and hit play. More
specifically, you need to enter one or more functions of the form
"let foo = (i rate) -> { ... }" in to
the box and then call the function
listen, passing in a function you wish to listen to as an argument. In
this case,
i is the current sample index to be returned and
rate is the sampling rate in hz. The language itself
is fairly simple, supporting a set of basic binary operators (
+,-,*,/,&,|,^,<<,>>), the unary operators
! and
~, functions and immutable arrays (
[0 1 2 3]). I might add support for conditionals
at some point as well. Once you have a program you like, you can enter your name and the name of the program
then click share and it should show up under the "Latest" tab at the bottom. Once submitted, anyone can hit
Play on the shared item to listen to it and see/modify the program. If you like a shared program then
you can hit the
+1 button - the most highly rated programs should show up under the "Top" tab.
I've seeded the database with a few different example programs that don't really sound like much but should
hopefully give people the idea. The
Arrays program does actually sound like something fairly cool though and
is a modification of
this program that
I have attributed to "Unknown" since, well, I don't know who originally made it.
So, please, have fun and make something cool. If you encounter issues with the functionality or interface don't be
shy - go ahead and
contact me.