Experimental music from very short C programs

category: code [glöplog]
Whipped together a 128 byte implementation of the first one for the Atari VCS in about 30 minutes. Due to the TIA being what it is, the output is limited to 5-bit PCM. Check it out:
Binary - works fine in Ubuntu's Stella and probably on the real thing, but not in the Windows version of Stella (it doesn't like programs omitting VSYNC)
added on the 2011-09-27 18:56:27 by Tjoppen Tjoppen
"music". right!
I thought that the demoscene is all about niche bullshit.
added on the 2011-09-27 19:23:07 by Preacher Preacher

one line of code

some crap music

oh well, wasted 5mins at work ;)))
added on the 2011-09-27 20:05:43 by frenzy frenzy
A message to Viznut and his noize-generator ref. http://countercomplex.blogspot.com/2011/06/16-byte-frontier-extreme-results-from .html. nice try! but i have a noize-generator that takes 13 bytes.
added on the 2011-09-27 22:27:45 by rudi rudi
actuall, i see that there are 4 bytes for the actual random generation routine, which is the same amount of bytes i have in mine. if anyone ever manage to reduce this to 3 bytes, i will buy you a beer!
added on the 2011-09-27 22:45:55 by rudi rudi
ooh hey. One of those one-liners is attributed to a "visy."

...Maybe it's our visy?
added on the 2011-09-28 05:11:45 by MidKnight MidKnight
added on the 2011-09-28 05:12:19 by MidKnight MidKnight
Oh, hello there.

I'm a little bit surprised that this video has already gathered 3500+ views in less than two days and has inspired people far beyond the demoscene to try something similar. Perhaps it was a good idea to publicize some unpolished preliminary experiments (blame Visy who originally shared the code fragments on Google+ the day after we played around with them on IRC).

One potentially fruitful path of future exploration would be softsynths that combine semi-chaotic math with some deliberately chosen synth functions. This would ideally allow for dramatically size-reduced executable songs that still sound good. Also, the same functions that generate rhythms and musical structures for a song could also be used to drive various parameters in visual effects. This could lead to e.g. <=256-byters with a lot of interesting audiovisual variance.
i was wrong, this is actually a bit fun.
added on the 2011-09-28 11:38:29 by superplek superplek
MidKnight: yes, it is indeed I.
added on the 2011-09-28 14:34:50 by visy visy
if you *really* want to dig into such music, I found it handy, to use that site here, that fills the waveout with javascript.

That means, you can build up a sine there and have full open source and can get the codes you need (for example for a a sqare or sabretooth sine)


in the end I turned back to 4klang :)
added on the 2011-09-28 15:29:47 by FeN FeN
Found this on twitter:


Online version to play with it :D

via @0xabad1dea
added on the 2011-09-28 17:51:18 by the_JinX the_JinX
Bird-techno: t * ((t>>11|t>>8)&92&t>>4)+sin(t>>6)
added on the 2011-09-28 18:31:45 by raer raer
20 byte symphony for c64. type this into your hex editor:

7C 00 45 A2 29 1F A8 65 A1 45 A2 05 A2 29 3F 99 00 D4 50 EE
added on the 2011-09-28 20:35:25 by 4mat 4mat
Oh men, i love you all! :)
added on the 2011-09-28 21:20:21 by baah baah

oh the joy!

added on the 2011-09-28 21:35:24 by red red

t * ((t>>12) & ((t>>6) | (t>>10) | (t>>2)) & (t>>8))
added on the 2011-09-28 22:35:46 by nystep nystep
(t >> 5) | (t << 3) + ( t * 12 * ( (t>>13) | ( (t>>1) | (t>>10) | (t>>2) ) & (t>>8) ) )
Oh the headaches.
added on the 2011-09-28 23:29:22 by sub sub
Nystep: great one, sound like Dig Dug arcade game :)
great stuff!

my try:
added on the 2011-09-29 02:00:57 by RufUsul RufUsul
(t*(t>>8|t>>9)&46&t>>8)*4|(t&t>>13|t>> 6)

I call it "Lost in Space"

And a small program for testing with BASS: http://pastebin.com/MRyf472f
added on the 2011-09-29 03:47:30 by xpansive xpansive
Cool stuff!

You can use inequalities to script in changes to the beat (even though that's kinda cheating).

My first attempt:
((t>>t%24>>t%12<<t%6)|t>>30)-4*sin(.2*t)-(t>65300)*50 00*cos(0.001*t)
added on the 2011-09-29 05:05:50 by MidKnight MidKnight
Sure, it wasn't the intended purpose, but...

Can you guess where this is from?

((t%40000)<5000)*(t%(8000/392))+((t%40000)>7000)*((t%40000)<12000)*((t% 40000)%(8000/523))+((t%40000)>14000)*((t%40000)<19000)*(t%(8000/555))+((t%4 0000)>21000)*((t%40000)<26000)*(t%(8000/420))
added on the 2011-09-29 05:22:39 by MidKnight MidKnight