## Experimental music from very short C programs

**category:**code [glöplog]

Oh it's even better: Dead, Beef, b00b and 1337 ;)

I went and wrote a blogpost about it http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line- of.html

my first attempt

telephone-techno: (t&(-t>>4)) | ((t<<4)&(t>>8))

telephone-techno: (t&(-t>>4)) | ((t<<4)&(t>>8))

some fast repeating arpeggio: (t<<1&(-t>>4)) | ((t<<2)^(t>>4))

Don't you think Tonic's (t/4&0xf4)>>t/((t>>14&3)+4) sounds a bit like Chaos Theory?

So what, Chaos Theory in 1Kb?

So what, Chaos Theory in 1Kb?

tjoppen: I tried your VCS version (linked on page 2) on my real machine, but no sound output at all, just some strange diagonal lines (which I am guessing comes from the non-synced screen)

I made a quite complex one using conditionals. Hey but it's still one line! ;)

http://wurstcaptures.untergrund.net/music/?oneliner=(t%26t*5%7Ct%3E%3E6%20%7C%20 ((t%260xFFFF)%3E0x8000%3F%20(-6*t)%2F7%20%3A%20((t%260x1FFFF)%3E0x10000%20%3F%20- 9*t%26100%20%3A%20(-9*(t%26100)))%2F11))*10%20&rate=8000

http://wurstcaptures.untergrund.net/music/?oneliner=(t%26t*5%7Ct%3E%3E6%20%7C%20 ((t%260xFFFF)%3E0x8000%3F%20(-6*t)%2F7%20%3A%20((t%260x1FFFF)%3E0x10000%20%3F%20- 9*t%26100%20%3A%20(-9*(t%26100)))%2F11))*10%20&rate=8000

cracking fire [noise]: tan(t*t*t)/tan(77-t*t)

robot out of control

(t&64|t>>5)^(t&33|t>>8)^(t&14|t>>9|t&76)^(t| 187)^(t*(t>>8&838+t>>13)&644)

(t&64|t>>5)^(t&33|t>>8)^(t&14|t>>9|t&76)^(t| 187)^(t*(t>>8&838+t>>13)&644)

This is so much fun.

Disonant but somehow harmonic melody which falls and goes up with different voices (t ^ 13 | t ^ 15) * (t >> 12)

Disonant but somehow harmonic melody which falls and goes up with different voices (t ^ 13 | t ^ 15) * (t >> 12)

strangesome: (((t*0.1)-(t*0.5)+(t)) ^ (t<<4)/(t>>11)) * (0.99998)

weird: ((t*0.01)*(t*0.001)) ^ t

well, my first (very average) try:

t*((t<<3|t<<128)&4*t>>8&(t<<4&t>>7)& amp;2*t)*t/4

t*((t<<3|t<<128)&4*t>>8&(t<<4&t>>7)& amp;2*t)*t/4

Sdw: Are you using a Harmony cartridge? If so, then you must either program the cartridge itself with the ROM or create a 4k ROM by cat:ing together 32 copies of that file and put it on your SD card. This appears to be a known bug - see this thread on AA

i don't really know what i'm doing but i thought this was cool:

t * ((t>>16|t>>12)&t>>8)

t * ((t>>16|t>>12)&t>>8)

This is a really simple one that is able to produce lots of weird patterns. Try varying the two constants, each one sounds pretty cool.

http://wurstcaptures.untergrund.net/music/?oneliner=t*(t%3E%3E7)%26(t%3E%3E1)& amp;rate=8000

http://wurstcaptures.untergrund.net/music/?oneliner=t*(t%3E%3E7)%26(t%3E%3E1)& amp;rate=8000

Had to give this a shot too:

First attempt I have no clue what I'm doing, but it's fun as hell :-)

First attempt I have no clue what I'm doing, but it's fun as hell :-)

generic 3/4 buildup t&0x256?t>>4:t>>10

@216: That one kicks ass! Repost: t*(t^t+(t>>15|1)^(t-1280^t)>>10)