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. Danny also introduced me to glitch machine which is cool iOS app for playing with Bytebeat music. The article above also links to a couple of webpage versions, one in JavaScript and one in Flash. I like that you can edit in