Experimental music from very short C programs

A few weeks ago I ran onto this thread on poet:
http://www.pouet.net/topic.php?which=8357&page=1&x=25&y=6 witch had links to the following youtube videos

and

and

That shows what these extremely small programs can accomplish. Then little scale got a hold of it and made some pretty awesome Arduino examples.

of course Viznut wrote a great article about it all:

You can experiment online at http://wurstcaptures.untergrund.net/music/ or http://entropedia.co.uk/generative_music/

or use this little program to write the data out

main()
{
int t;
for(t=0;;t++)
{
putchar( t * ((t>>12|t>>16)&127&t>>8));
}
}

That little song was written by burri and sounds like this:
Tjollebolle2 by burri123

I have it as a ring-signal for my phone.

here are a few I’ve been fiddling around with:

http://wurstcaptures.untergrund.net/music/?oneliner=((t*(t%3E%3E12)%26t*2.01%26t*1.99)%26(t*(t%3E%3E14)%26t*3.01%26t*3.99))%2B((t*(t%3E%3E16)%26t*2.02%26t*1.98)-(t*(t%3E%3E18)%26t*3.02%26t*2.98))&oneliner2=&t0=0&tmod=0&duration=60&separation=0&rate=8000

and

http://wurstcaptures.untergrund.net/music/?oneliner=%283*t%29%5E%28t%3E%3E6%29%25256&oneliner2=%283.0001*t%29%5E%28t%3E%3E6.001%29%25256&t0=0&tmod=0&duration=60&separation=0&rate=8000

and

http://wurstcaptures.untergrund.net/music/?oneliner=%28t%2F2%3E%3E%281%2B%28%28t%3E%3E2%29%264%29%29%29*%28t%2F400%3E%3E%281%2B%28%28t%3E%3E2%29%264%29%29%29&oneliner2=&t0=0&tmod=0&duration=60&separation=100&rate=8000

 

I usually let them generate to be ten minutes or so and listen to them in headphones.

 

I’ve also ported somewhat like that to an ATtiny13 and ATTiny85, the later running an Arduino core. I will use that for the throw synth’s in trees project. Wich needs a better name.

And I’ve also made an iPhone program using this technique, let’s see if that will ever be something that I can release.

 

I’m a few steps closer throwing synth’s into trees

First I found an excellent tutorial on how to program ATTiny45’s.
They are cheap and with a little luck I might even be able to move my code to an ATtiny13, cheaper 🙂

Then pure greatness struck with the whole 1 line of audio-generating struck. Loads of inspiration there.

I now have a small program that compiles to 930 bytes (room for optimization there is) that plays loads of different sounds.

The volume of the sound is not that loud. But with a pair of easy to drive speakers it will be enough for most environments.

With real prices on everything but the solar panels I’m up to 35 SEK.